|
Foxit PDF SDK
|
此类可用于进行输出预览。输出预览是预览分色和测试不同色彩配置文件。 在使用此类之前,请确保函数 common::Library::SetDefaultICCProfilesPath 已被成功调用; 否则在使用此类进行输出预览时可能会出现意外错误或结果。 目前,此功能在Linux ARM和Mac ARM平台上不受支持。 更多...
Public 类型 | |
| enum | ColorantType { e_ColorantTypeProcess = 0, e_ColorantTypeSpot = 1 } |
| 着色剂类型的枚举。 更多... | |
| enum | ShowType { e_ShowAll = 0, e_ShowDeviceCMYK = 1, e_ShowNotDeviceCMYK = 2, e_ShowICCBasedCMYK = 3, e_ShowSpotColor = 4, e_ShowDeviceCMYKAndSpot = 5, e_ShowNotDeviceCMYKOrSpot = 6, e_ShowDeviceN = 7, e_ShowCMYK = 8, e_ShowRGB = 9, e_ShowDeviceRGB = 10, e_ShowICCBasedRGB = 11, e_ShowGray = 12, e_ShowDeviceGray = 13, e_ShowCalGray = 14, e_ShowCalibrated = 15, e_ShowLab = 16, e_ShowDevice = 17, e_ShowImages = 18, e_ShowSolidColor = 19, e_ShowSmoothShades = 20, e_ShowRegistrationColor = 21, e_ShowText = 22, e_ShowLineArt = 23 } |
| 显示类型的枚举。 更多... | |
Public 成员函数 | |
| OutputPreview (const PDFDoc &pdf_doc) | |
| 构造函数,带参数。 更多... | |
| OutputPreview (const OutputPreview &other) | |
| 构造函数,通过另一个输出预览对象。 更多... | |
| ~OutputPreview () | |
| 析构函数。 | |
| void | EnableSimulateOverprint (bool is_to_simulate_overprint) |
| 设置是否启用仿真叠印的标志。 更多... | |
| common::Bitmap | GeneratePreviewBitmap (const PDFPage &page, const Matrix &matrix, const common::Renderer &renderer) |
| 为PDF页面生成输出预览位图。 更多... | |
| StringArray | GetPlates (ColorantType colorant_type) |
| 获取分色版。 更多... | |
| RGB | GetSpotPlateColor (const char *plate_name) |
| 获取版的颜色值。 更多... | |
| bool | IsChecked (const String &plate_name) const |
| 检查版是否被选中。 更多... | |
| bool | IsEmpty () const |
| 检查当前对象是否为空。 更多... | |
| bool | operator != (const OutputPreview &other) const |
| 不等操作符。 更多... | |
| OutputPreview & | operator= (const OutputPreview &other) |
| 赋值操作符。 更多... | |
| bool | operator== (const OutputPreview &other) const |
| 相等操作符。 更多... | |
| void | SetCheckStatus (const String &plate_name, bool to_check) |
| 设置版的检查状态。 更多... | |
| void | SetShowType (ShowType show_type) |
| 设置显示类型。 更多... | |
| void | SetSimulationProfile (const WString &icc_profile_path) |
| 设置仿真ICC配置文件路径。 更多... | |
Public 成员函数 继承自 foxit::Base | |
| FS_HANDLE | Handle () const |
| 获取当前对象的句柄。 更多... | |
此类可用于进行输出预览。输出预览是预览分色和测试不同色彩配置文件。 在使用此类之前,请确保函数 common::Library::SetDefaultICCProfilesPath 已被成功调用; 否则在使用此类进行输出预览时可能会出现意外错误或结果。 目前,此功能在Linux ARM和Mac ARM平台上不受支持。
显示类型的枚举。
此枚举的值应单独使用。
| foxit::pdf::OutputPreview::OutputPreview | ( | const PDFDoc & | pdf_doc | ) |
构造函数,带参数。
| [in] | pdf_doc | 有效的PDF文档对象。 |
| foxit::pdf::OutputPreview::OutputPreview | ( | const OutputPreview & | other | ) |
构造函数,通过另一个输出预览对象。
| [in] | other | 另一个输出预览对象。 |
| void foxit::pdf::OutputPreview::EnableSimulateOverprint | ( | bool | is_to_simulate_overprint | ) |
设置是否启用仿真叠印的标志。
如果不调用此函数,将使用默认值 true。
| [in] | is_to_simulate_overprint | true 表示仿真叠印。 false 表示不仿真叠印。 |
| common::Bitmap foxit::pdf::OutputPreview::GeneratePreviewBitmap | ( | const PDFPage & | page, |
| const Matrix & | matrix, | ||
| const common::Renderer & | renderer | ||
| ) |
为PDF页面生成输出预览位图。
此函数将使用输入的 renderer 中指定的标志和选项以及当前输出预览对象的设置来渲染目标PDF页面, 然后返回最终的输出预览位图。此函数中的渲染过程不会影响输入的 renderer。
请确保函数 OutputPreview::SetSimulationProfile 已被成功调用;否则此函数将抛出 foxit::e_ErrUnsupported。
| [in] | page | 有效的PDF页面对象。此PDF页面应该已被解析。 |
| [in] | matrix | 用于渲染的变换矩阵,通常由函数 PDFPage::GetDisplayMatrix 返回。 |
| [in] | renderer | 有效的渲染器对象。 |
| StringArray foxit::pdf::OutputPreview::GetPlates | ( | ColorantType | colorant_type | ) |
获取分色版。
如果要获取印刷色着色剂类型的版,请确保函数 OutputPreview::SetSimulationProfile 已被成功调用; 否则不会检索到印刷色着色剂类型的版。
| [in] | colorant_type | 着色剂类型。请参考从 OutputPreview::e_ColorantTypeProcess 开始的值,这应该是其中的一个值。 |
| RGB foxit::pdf::OutputPreview::GetSpotPlateColor | ( | const char * | plate_name | ) |
获取版的颜色值。
此函数仅对专色着色剂类型的版有用。
| [in] | plate_name | 版名称。这可以从函数 OutputPreview::GetPlates 返回的字符串数组中检索。 |
| bool foxit::pdf::OutputPreview::IsChecked | ( | const String & | plate_name | ) | const |
检查版是否被选中。
对于新构造的输出预览对象,所有版都不被选中。
| [in] | plate_name | 版名称。这可以从函数 OutputPreview::GetPlates 返回的字符串数组中检索。 |
| bool foxit::pdf::OutputPreview::IsEmpty | ( | ) | const |
检查当前对象是否为空。
当前对象为空时,表示当前对象是无用的。
| bool foxit::pdf::OutputPreview::operator != | ( | const OutputPreview & | other | ) | const |
不等操作符。
| [in] | other | 另一个输出预览对象。此函数将检查当前对象是否不等于这个对象。 |
| OutputPreview& foxit::pdf::OutputPreview::operator= | ( | const OutputPreview & | other | ) |
赋值操作符。
| [in] | other | 另一个输出预览对象,其值将被赋给当前对象。 |
| bool foxit::pdf::OutputPreview::operator== | ( | const OutputPreview & | other | ) | const |
相等操作符。
| [in] | other | 另一个输出预览对象。此函数将检查当前对象是否等于这个对象。 |
| void foxit::pdf::OutputPreview::SetCheckStatus | ( | const String & | plate_name, |
| bool | to_check | ||
| ) |
设置版的检查状态。
| [in] | plate_name | 版名称。这可以从函数 OutputPreview::GetPlates 返回的字符串数组中检索。 |
| [in] | to_check | 检查状态:true 表示检查该版,false 表示不检查该版。 |
| void foxit::pdf::OutputPreview::SetShowType | ( | ShowType | show_type | ) |
设置显示类型。
如果没有为当前对象设置显示类型,在调用函数 OutputPreview::GeneratePreviewBitmap 时, 默认将使用值 OutputPreview::e_ShowAll。
| [in] | show_type | 显示类型。请参考从 OutputPreview::e_ShowAll 开始的值,这应该是其中的一个值。 |
| void foxit::pdf::OutputPreview::SetSimulationProfile | ( | const WString & | icc_profile_path | ) |
设置仿真ICC配置文件路径。
如果输入ICC配置文件的色彩空间不是RGB/Gray/CMYK之一,此函数将抛出 foxit::e_ErrUnsupported。
在调用函数 OutputPreview::GeneratePreviewBitmap 之前,应成功调用此函数。
| [in] | icc_profile_path | 用于输出预览仿真配置文件的ICC配置文件的文件路径。 |