Foxit PDF SDK
|
Public Member Functions | |
OutputPreview (PDFDoc pdf_doc) | |
Constructor, with parameters. More... | |
OutputPreview (OutputPreview other) | |
Constructor, with another output preview object. More... | |
synchronized void | delete () |
Clean up related resources immediately. More... | |
void | enableSimulateOverprint (boolean is_to_simulate_overprint) throws com.foxit.sdk.PDFException |
Set the flag to decide whether to enable simulate overprint. More... | |
Bitmap | generatePreviewBitmap (PDFPage page, Matrix2D matrix, Renderer renderer) throws com.foxit.sdk.PDFException |
Generate the output preview bitmap for a PDF page. More... | |
java.util.ArrayList< java.lang.String > | getPlates (int colorant_type) throws com.foxit.sdk.PDFException |
Get Separations plates. More... | |
long | getSpotPlateColor (String plate_name) throws com.foxit.sdk.PDFException |
Get the color value of a plate. More... | |
boolean | isChecked (String plate_name) throws com.foxit.sdk.PDFException |
Check whether a plate is checked or not. More... | |
boolean | isEmpty () |
Check whether current object is empty or not. More... | |
void | setCheckStatus (String plate_name, boolean to_check) throws com.foxit.sdk.PDFException |
Set the check status for a plate. More... | |
void | setShowType (int show_type) throws com.foxit.sdk.PDFException |
Set show type. More... | |
void | setSimulationProfile (String icc_profile_path) throws com.foxit.sdk.PDFException |
Set simulation ICC profile file path. More... | |
![]() | |
synchronized void | delete () |
Clean up related resources immediately. More... | |
Static Public Attributes | |
static final int | e_ColorantTypeProcess = 0 |
Colorant type: process. | |
static final int | e_ColorantTypeSpot = 1 |
Colorant type: spot. | |
static final int | e_ShowAll = 0 |
If set, show all. | |
static final int | e_ShowCalGray = 14 |
If set, only show with CalGray. | |
static final int | e_ShowCalibrated = 15 |
If set, only show with Calibrated. | |
static final int | e_ShowCMYK = 8 |
If set, only show with CMYK. | |
static final int | e_ShowDevice = 17 |
If set, only show with Device. | |
static final int | e_ShowDeviceCMYK = 1 |
If set, only show with DeviceCMYK. | |
static final int | e_ShowDeviceCMYKAndSpot = 5 |
If set, only show with DeviceCMYK and spot. | |
static final int | e_ShowDeviceGray = 13 |
If set, only show with DeviceGray. | |
static final int | e_ShowDeviceN = 7 |
If set, only show with DeviceN. | |
static final int | e_ShowDeviceRGB = 10 |
If set, only show with DeviceRGB. | |
static final int | e_ShowGray = 12 |
If set, only show with Gray. | |
static final int | e_ShowICCBasedCMYK = 3 |
If set, only show with ICCBased CMYK. | |
static final int | e_ShowICCBasedRGB = 11 |
If set, only show with ICCBased RGB. | |
static final int | e_ShowImages = 18 |
If set, only show images. | |
static final int | e_ShowLab = 16 |
If set, only show with Lab. | |
static final int | e_ShowLineArt = 23 |
If set, only show line art. | |
static final int | e_ShowNotDeviceCMYK = 2 |
If set, only show without DeviceCMYK. | |
static final int | e_ShowNotDeviceCMYKOrSpot = 6 |
If set, only show with DeviceCMYK or spot. | |
static final int | e_ShowRegistrationColor = 21 |
If set, only show registration color. | |
static final int | e_ShowRGB = 9 |
If set, only show with RGB. | |
static final int | e_ShowSmoothShades = 20 |
If set, only show smooth shades. | |
static final int | e_ShowSolidColor = 19 |
If set, only show solid color. | |
static final int | e_ShowSpotColor = 4 |
If set, only show with spot color. | |
static final int | e_ShowText = 22 |
If set, only show text. | |
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.
com.foxit.sdk.pdf.OutputPreview.OutputPreview | ( | PDFDoc | pdf_doc | ) |
Constructor, with parameters.
[in] | pdf_doc | A valid PDF document object. |
com.foxit.sdk.pdf.OutputPreview.OutputPreview | ( | OutputPreview | other | ) |
Constructor, with another output preview object.
[in] | other | Another output preview object. |
synchronized void com.foxit.sdk.pdf.OutputPreview.delete | ( | ) |
Clean up related resources immediately.
void com.foxit.sdk.pdf.OutputPreview.enableSimulateOverprint | ( | boolean | is_to_simulate_overprint | ) | throws com.foxit.sdk.PDFException |
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. |
Bitmap com.foxit.sdk.pdf.OutputPreview.generatePreviewBitmap | ( | PDFPage | page, |
Matrix2D | matrix, | ||
Renderer | renderer | ||
) | throws com.foxit.sdk.PDFException |
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 com.foxit.sdk.common.Constants.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. |
java.util.ArrayList< java.lang.String > com.foxit.sdk.pdf.OutputPreview.getPlates | ( | int | colorant_type | ) | throws com.foxit.sdk.PDFException |
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 com.foxit.sdk.pdf.OutputPreview.e_ColorantTypeProcess and this should be one of these values. |
long com.foxit.sdk.pdf.OutputPreview.getSpotPlateColor | ( | String | plate_name | ) | throws com.foxit.sdk.PDFException |
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 . |
boolean com.foxit.sdk.pdf.OutputPreview.isChecked | ( | String | plate_name | ) | throws com.foxit.sdk.PDFException |
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 . |
boolean com.foxit.sdk.pdf.OutputPreview.isEmpty | ( | ) |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
void com.foxit.sdk.pdf.OutputPreview.setCheckStatus | ( | String | plate_name, |
boolean | to_check | ||
) | throws com.foxit.sdk.PDFException |
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 com.foxit.sdk.pdf.OutputPreview.setShowType | ( | int | show_type | ) | throws com.foxit.sdk.PDFException |
Set show type.
If no show type is set to current object, value com.foxit.sdk.pdf.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 com.foxit.sdk.pdf.OutputPreview.e_ShowAll and this should be one of these values. |
void com.foxit.sdk.pdf.OutputPreview.setSimulationProfile | ( | String | icc_profile_path | ) | throws com.foxit.sdk.PDFException |
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 com.foxit.sdk.common.Constants.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. |