Foxit PDF SDK
|
Public Types | |
enum | ColorantType { e_ColorantTypeProcess = 0, e_ColorantTypeSpot = 1 } |
Enumeration for colorant type. More... | |
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 } |
Enumeration for show type. More... | |
Public Member Functions | |
OutputPreview (const PDFDoc &pdf_doc) | |
Constructor, with parameters. More... | |
OutputPreview (const OutputPreview &other) | |
Constructor, with another output preview object. More... | |
~OutputPreview () | |
Destructor. | |
void | EnableSimulateOverprint (bool is_to_simulate_overprint) |
Set the flag to decide whether to enable simulate overprint. More... | |
common::Bitmap | GeneratePreviewBitmap (const PDFPage &page, const Matrix &matrix, const common::Renderer &renderer) |
Generate the output preview bitmap for a PDF page. More... | |
StringArray | GetPlates (ColorantType colorant_type) |
Get Separations plates. More... | |
RGB | GetSpotPlateColor (const char *plate_name) |
Get the color value of a plate. More... | |
bool | IsChecked (const String &plate_name) const |
Check whether a plate is checked or not. More... | |
bool | IsEmpty () const |
Check whether current object is empty or not. More... | |
bool | operator != (const OutputPreview &other) const |
Not equal operator. More... | |
OutputPreview & | operator= (const OutputPreview &other) |
Assign operator. More... | |
bool | operator== (const OutputPreview &other) const |
Equal operator. More... | |
void | SetCheckStatus (const String &plate_name, bool to_check) |
Set the check status for a plate. More... | |
void | SetShowType (ShowType show_type) |
Set show type. More... | |
void | SetSimulationProfile (const WString &icc_profile_path) |
Set simulation ICC profile file path. More... | |
![]() | |
FS_HANDLE | Handle () const |
Get the handle of current object. More... | |
This class can be used to do output preview. Output preview is to preview color separations and test different color profiles. Before use this class, please ensure function common::Library::SetDefaultICCProfilesPath has been called successfully; otherwise unexpcted error or result may occur when this class is being used to do output preview. Currently, this feature is not supported on the Linux ARM and Mac ARM platform.
Enumeration for show type.
Values of this enumeration should be used alone.
foxit::pdf::OutputPreview::OutputPreview | ( | const PDFDoc & | pdf_doc | ) |
Constructor, with parameters.
[in] | pdf_doc | A valid PDF document object. |
foxit::pdf::OutputPreview::OutputPreview | ( | const OutputPreview & | other | ) |
Constructor, with another output preview object.
[in] | other | Another output preview object. |
void foxit::pdf::OutputPreview::EnableSimulateOverprint | ( | bool | is_to_simulate_overprint | ) |
Set the flag to decide whether to enable simulate overprint.
If this function is not called, default value true will be used.
[in] | is_to_simulate_overprint | true means to simulate overprinting. false means not to simulate overprinting. |
common::Bitmap foxit::pdf::OutputPreview::GeneratePreviewBitmap | ( | const PDFPage & | page, |
const Matrix & | matrix, | ||
const common::Renderer & | renderer | ||
) |
Generate the output preview bitmap for a PDF page.
This function will render target PDF page with flags and options specified in input renderer and settings of current output preview object, and then return the final output preview bitmap. Rendering process in this function will not affect input renderer.
Please ensure function OutputPreview::SetSimulationProfile has been called successfully; otherwise this function will throw foxit::e_ErrUnsupported.
[in] | page | A valid PDF page object. This PDF page should have been parsed. |
[in] | matrix | The transformation matrix used for rendering, which is usually returned by function PDFPage::GetDisplayMatrix. |
[in] | renderer | A valid renderer object. |
StringArray foxit::pdf::OutputPreview::GetPlates | ( | ColorantType | colorant_type | ) |
Get Separations plates.
If to get plates of process colorant type, please ensure function OutputPreview::SetSimulationProfile has been called successfully; otherwise no plate of process colorant type will be retrieved.
[in] | colorant_type | Colorant type. Please refer to values starting from OutputPreview::e_ColorantTypeProcess and this should be one of these values. |
RGB foxit::pdf::OutputPreview::GetSpotPlateColor | ( | const char * | plate_name | ) |
Get the color value of a plate.
This function is only useful for a plate in spot colorant type.
[in] | plate_name | Plate name. This can be retrieved form the returned string array of function OutputPreview::GetPlates. |
bool foxit::pdf::OutputPreview::IsChecked | ( | const String & | plate_name | ) | const |
Check whether a plate is checked or not.
For a newly constructed output preview object, all the plates are not checked.
[in] | plate_name | Plate name. This can be retrieved from the returned string array of function OutputPreview::GetPlates. |
bool foxit::pdf::OutputPreview::IsEmpty | ( | ) | const |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
bool foxit::pdf::OutputPreview::operator != | ( | const OutputPreview & | other | ) | const |
Not equal operator.
[in] | other | Another output preview object. This function will check if current object is not equal to this one. |
OutputPreview& foxit::pdf::OutputPreview::operator= | ( | const OutputPreview & | other | ) |
Assign operator.
[in] | other | Another output preview object, whose value would be assigned to current object. |
bool foxit::pdf::OutputPreview::operator== | ( | const OutputPreview & | other | ) | const |
Equal operator.
[in] | other | Another output preview object. This function will check if current object is equal to this one. |
void foxit::pdf::OutputPreview::SetCheckStatus | ( | const String & | plate_name, |
bool | to_check | ||
) |
Set the check status for a plate.
[in] | plate_name | Plate name. This can be retrieved from the returned string array of function OutputPreview::GetPlates. |
[in] | to_check | Check status: true means to check the plate, while false means not to check the plate. |
void foxit::pdf::OutputPreview::SetShowType | ( | ShowType | show_type | ) |
Set show type.
If no show type is set to current object, value OutputPreview::e_ShowAll will be used by default when function OutputPreview::GeneratePreviewBitmap is called.
[in] | show_type | Show type. Please refer to values starting from OutputPreview::e_ShowAll and this should be one of these values. |
void foxit::pdf::OutputPreview::SetSimulationProfile | ( | const WString & | icc_profile_path | ) |
Set simulation ICC profile file path.
If the color space of input ICC profile file is not one of RGB/Gray/CMYK, this function will throw foxit::e_ErrUnsupported.
This function should be called successfully before calling function OutputPreview::GeneratePreviewBitmap.
[in] | icc_profile_path | File path for an ICC profile which is to be used as simulation profile for output preview. |