Foxit PDF SDK
FSOutputPreview Class Reference
Inheritance diagram for FSOutputPreview:
FSBase

Instance Methods

(void) - enableSimulateOverprint:
 Set the flag to decide whether to enable simulate overprint.
More...
 
(FSBitmap *) - generatePreviewBitmap:matrix:renderer:
 Generate the output preview bitmap for a PDF page.
More...
 
(NSArray< NSString * > *) - getPlates:
 Get Separations plates.
More...
 
(unsigned int) - getSpotPlateColor:
 Get the color value of a plate.
More...
 
(id) - initWithOther:
 Constructor, with another output preview object.
More...
 
(id) - initWithPdf_doc:
 Constructor, with parameters.
More...
 
(BOOL) - isChecked:
 Check whether a plate is checked or not.
More...
 
(BOOL) - isEmpty
 Check whether current object is empty or not.
More...
 
(void) - setCheckStatus:to_check:
 Set the check status for a plate.
More...
 
(void) - setShowType:
 Set show type.
More...
 
(void) - setSimulationProfile:
 Set simulation ICC profile file path.
More...
 

Detailed Description

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.

Method Documentation

◆ enableSimulateOverprint:()

- (void) enableSimulateOverprint: (BOOL)  is_to_simulate_overprint

Set the flag to decide whether to enable simulate overprint.

If this function is not called, default value YES will be used.

Parameters
[in]is_to_simulate_overprintYES means to simulate overprinting. NO means not to simulate overprinting.
Returns
None.

◆ generatePreviewBitmap:matrix:renderer:()

- (FSBitmap *) generatePreviewBitmap: (FSPDFPage*)  page
matrix: (FSMatrix2D*)  matrix
renderer: (FSRenderer*)  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 FSErrUnsupported.

Parameters
[in]pageA valid PDF page object. This PDF page should have been parsed.
[in]matrixThe transformation matrix used for rendering, which is usually returned by function PDFPage::getDisplayMatrix:top:width:height:rotate:.
[in]rendererA valid renderer object.
Returns
A bitmap which represents the output preview result.

◆ getPlates:()

- (NSArray< NSString * > *) getPlates: (FSOutputPreviewColorantType 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.

Parameters
[in]colorant_typeColorant type. Please refer to values starting from FSOutputPreviewColorantTypeProcess and this should be one of these values.
Returns
A string array which represents plate names.

◆ getSpotPlateColor:()

- (unsigned int) getSpotPlateColor: (NSString *)  plate_name

Get the color value of a plate.

This function is only useful for a plate in spot colorant type.

Parameters
[in]plate_namePlate name. This can be retrieved form the returned string array of function OutputPreview::getPlates:.
Returns
RGB color of the specified plate.

◆ initWithOther:()

- (id) initWithOther: (FSOutputPreview*)  other

Constructor, with another output preview object.

Parameters
[in]otherAnother output preview object.

◆ initWithPdf_doc:()

- (id) initWithPdf_doc: (FSPDFDoc*)  pdf_doc

Constructor, with parameters.

Parameters
[in]pdf_docA valid PDF document object.

◆ isChecked:()

- (BOOL) isChecked: (NSString *)  plate_name

Check whether a plate is checked or not.

For a newly constructed output preview object, all the plates are not checked.

Parameters
[in]plate_namePlate name. This can be retrieved from the returned string array of function OutputPreview::getPlates:.
Returns
YES means the plate is checked, while NO means the plate is not checked.

◆ isEmpty()

- (BOOL) isEmpty

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
YES means current object is empty, while NO means not.

◆ setCheckStatus:to_check:()

- (void) setCheckStatus: (NSString *)  plate_name
to_check: (BOOL)  to_check 

Set the check status for a plate.

Parameters
[in]plate_namePlate name. This can be retrieved from the returned string array of function OutputPreview::getPlates:.
[in]to_checkCheck status: YES means to check the plate, while NO means not to check the plate.
Returns
None.

◆ setShowType:()

- (void) setShowType: (FSOutputPreviewShowType show_type

Set show type.

If no show type is set to current object, value FSOutputPreviewShowAll will be used by default when function OutputPreview::generatePreviewBitmap:matrix:renderer: is called.

Parameters
[in]show_typeShow type. Please refer to values starting from FSOutputPreviewShowAll and this should be one of these values.
Returns
None.

◆ setSimulationProfile:()

- (void) setSimulationProfile: (NSString *)  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 FSErrUnsupported.
This function should be called successfully before calling function OutputPreview::generatePreviewBitmap:matrix:renderer:.

Parameters
[in]icc_profile_pathFile path for an ICC profile which is to be used as simulation profile for output preview.
Returns
None.