Foxit PDF SDK
com.foxit.sdk.pdf.OutputPreview类 参考

此类可用于进行输出预览。输出预览是预览分色和测试不同色彩配置文件。 在使用此类之前,请确保函数 common.Library.setDefaultICCProfilesPath 已被成功调用; 否则在使用此类进行输出预览时可能会出现意外错误或结果。 目前,此功能在Linux ARM和Mac ARM平台上不受支持。
更多...

类 com.foxit.sdk.pdf.OutputPreview 继承关系图:
com.foxit.sdk.common.Base

Public 成员函数

 OutputPreview (OutputPreview other)
 构造函数,通过另一个输出预览对象。
更多...
 
 OutputPreview (PDFDoc pdf_doc)
 构造函数,带参数。
更多...
 
synchronized void delete ()
 直接清除C++相关资源。 更多...
 
void enableSimulateOverprint (boolean is_to_simulate_overprint) throws com.foxit.sdk.PDFException
 设置是否启用仿真叠印的标志。
更多...
 
Bitmap generatePreviewBitmap (PDFPage page, Matrix2D matrix, Renderer renderer) throws com.foxit.sdk.PDFException
 为PDF页面生成输出预览位图。
更多...
 
java.util.ArrayList< java.lang.String > getPlates (int colorant_type) throws com.foxit.sdk.PDFException
 获取分色版。
更多...
 
long getSpotPlateColor (String plate_name) throws com.foxit.sdk.PDFException
 获取版的颜色值。
更多...
 
boolean isChecked (String plate_name) throws com.foxit.sdk.PDFException
 检查版是否被选中。
更多...
 
boolean isEmpty ()
 检查当前对象是否为空。
更多...
 
void setCheckStatus (String plate_name, boolean to_check) throws com.foxit.sdk.PDFException
 设置版的检查状态。
更多...
 
void setShowType (int show_type) throws com.foxit.sdk.PDFException
 设置显示类型。
更多...
 
void setSimulationProfile (String icc_profile_path) throws com.foxit.sdk.PDFException
 设置仿真ICC配置文件路径。
更多...
 

静态 Public 属性

static final int e_ColorantTypeProcess = 0
 着色剂类型:印刷色。

 
static final int e_ColorantTypeSpot = 1
 着色剂类型:专色。

 
static final int e_ShowAll = 0
 如果设置,显示全部。

 
static final int e_ShowCalGray = 14
 如果设置,仅显示CalGray。

 
static final int e_ShowCalibrated = 15
 如果设置,仅显示校准色彩。

 
static final int e_ShowCMYK = 8
 如果设置,仅显示CMYK。

 
static final int e_ShowDevice = 17
 如果设置,仅显示设备色彩。

 
static final int e_ShowDeviceCMYK = 1
 如果设置,仅显示DeviceCMYK。

 
static final int e_ShowDeviceCMYKAndSpot = 5
 如果设置,仅显示DeviceCMYK和专色。

 
static final int e_ShowDeviceGray = 13
 如果设置,仅显示DeviceGray。

 
static final int e_ShowDeviceN = 7
 如果设置,仅显示DeviceN。

 
static final int e_ShowDeviceRGB = 10
 如果设置,仅显示DeviceRGB。

 
static final int e_ShowGray = 12
 如果设置,仅显示灰度。

 
static final int e_ShowICCBasedCMYK = 3
 如果设置,仅显示ICCBased CMYK。

 
static final int e_ShowICCBasedRGB = 11
 如果设置,仅显示ICCBased RGB。

 
static final int e_ShowImages = 18
 如果设置,仅显示图像。

 
static final int e_ShowLab = 16
 如果设置,仅显示Lab。

 
static final int e_ShowLineArt = 23
 如果设置,仅显示线条艺术。

 
static final int e_ShowNotDeviceCMYK = 2
 如果设置,仅显示非DeviceCMYK。

 
static final int e_ShowNotDeviceCMYKOrSpot = 6
 如果设置,仅显示DeviceCMYK或专色。

 
static final int e_ShowRegistrationColor = 21
 如果设置,仅显示套版色。

 
static final int e_ShowRGB = 9
 如果设置,仅显示RGB。

 
static final int e_ShowSmoothShades = 20
 如果设置,仅显示平滑渐变。

 
static final int e_ShowSolidColor = 19
 如果设置,仅显示纯色。

 
static final int e_ShowSpotColor = 4
 如果设置,仅显示专色。

 
static final int e_ShowText = 22
 如果设置,仅显示文本。

 

详细描述

此类可用于进行输出预览。输出预览是预览分色和测试不同色彩配置文件。 在使用此类之前,请确保函数 common.Library.setDefaultICCProfilesPath 已被成功调用; 否则在使用此类进行输出预览时可能会出现意外错误或结果。 目前,此功能在Linux ARM和Mac ARM平台上不受支持。

构造及析构函数说明

◆ OutputPreview() [1/2]

com.foxit.sdk.pdf.OutputPreview.OutputPreview ( PDFDoc  pdf_doc)

构造函数,带参数。

参数
[in]pdf_doc有效的PDF文档对象。

◆ OutputPreview() [2/2]

com.foxit.sdk.pdf.OutputPreview.OutputPreview ( OutputPreview  other)

构造函数,通过另一个输出预览对象。

参数
[in]other另一个输出预览对象。

成员函数说明

◆ delete()

synchronized void com.foxit.sdk.pdf.OutputPreview.delete ( )

直接清除C++相关资源。

返回
无。
注解
一旦这个接口被调用,这个对象将不能再被使用。

重载 com.foxit.sdk.common.Base .

◆ enableSimulateOverprint()

void com.foxit.sdk.pdf.OutputPreview.enableSimulateOverprint ( boolean  is_to_simulate_overprint) throws com.foxit.sdk.PDFException

设置是否启用仿真叠印的标志。

如果不调用此函数,将使用默认值 true

参数
[in]is_to_simulate_overprinttrue 表示仿真叠印。 false 表示不仿真叠印。
返回
无。

◆ generatePreviewBitmap()

Bitmap com.foxit.sdk.pdf.OutputPreview.generatePreviewBitmap ( PDFPage  page,
Matrix2D  matrix,
Renderer  renderer 
) throws com.foxit.sdk.PDFException

为PDF页面生成输出预览位图。

此函数将使用输入的 renderer 中指定的标志和选项以及当前输出预览对象的设置来渲染目标PDF页面, 然后返回最终的输出预览位图。此函数中的渲染过程不会影响输入的 renderer
请确保函数 OutputPreview.setSimulationProfile 已被成功调用;否则此函数将抛出 com.foxit.sdk.common.Constants.e_ErrUnsupported

参数
[in]page有效的PDF页面对象。此PDF页面应该已被解析。
[in]matrix用于渲染的变换矩阵,通常由函数 PDFPage.getDisplayMatrix 返回。
[in]renderer有效的渲染器对象。
返回
代表输出预览结果的位图。

◆ getPlates()

java.util.ArrayList< java.lang.String > com.foxit.sdk.pdf.OutputPreview.getPlates ( int  colorant_type) throws com.foxit.sdk.PDFException

获取分色版。

如果要获取印刷色着色剂类型的版,请确保函数 OutputPreview.setSimulationProfile 已被成功调用; 否则不会检索到印刷色着色剂类型的版。

参数
[in]colorant_type着色剂类型。请参考从 com.foxit.sdk.pdf.OutputPreview.e_ColorantTypeProcess 开始的值,这应该是其中的一个值。
返回
代表版名称的字符串数组。

◆ getSpotPlateColor()

long com.foxit.sdk.pdf.OutputPreview.getSpotPlateColor ( String  plate_name) throws com.foxit.sdk.PDFException

获取版的颜色值。

此函数仅对专色着色剂类型的版有用。

参数
[in]plate_name版名称。这可以从函数 OutputPreview.getPlates 返回的字符串数组中检索。
返回
指定版的RGB颜色。

◆ isChecked()

boolean com.foxit.sdk.pdf.OutputPreview.isChecked ( String  plate_name) throws com.foxit.sdk.PDFException

检查版是否被选中。

对于新构造的输出预览对象,所有版都不被选中。

参数
[in]plate_name版名称。这可以从函数 OutputPreview.getPlates 返回的字符串数组中检索。
返回
true 表示该版被选中,false 表示该版未被选中。

◆ isEmpty()

boolean com.foxit.sdk.pdf.OutputPreview.isEmpty ( )

检查当前对象是否为空。

当前对象为空时,表示当前对象是无用的。

返回
true 表示当前对象为空,false 表示不为空。

◆ setCheckStatus()

void com.foxit.sdk.pdf.OutputPreview.setCheckStatus ( String  plate_name,
boolean  to_check 
) throws com.foxit.sdk.PDFException

设置版的检查状态。

参数
[in]plate_name版名称。这可以从函数 OutputPreview.getPlates 返回的字符串数组中检索。
[in]to_check检查状态:true 表示检查该版,false 表示不检查该版。
返回
无。

◆ setShowType()

void com.foxit.sdk.pdf.OutputPreview.setShowType ( int  show_type) throws com.foxit.sdk.PDFException

设置显示类型。

如果没有为当前对象设置显示类型,在调用函数 OutputPreview.generatePreviewBitmap 时, 默认将使用值 com.foxit.sdk.pdf.OutputPreview.e_ShowAll

参数
[in]show_type显示类型。请参考从 com.foxit.sdk.pdf.OutputPreview.e_ShowAll 开始的值,这应该是其中的一个值。
返回
无。

◆ setSimulationProfile()

void com.foxit.sdk.pdf.OutputPreview.setSimulationProfile ( String  icc_profile_path) throws com.foxit.sdk.PDFException

设置仿真ICC配置文件路径。

如果输入ICC配置文件的色彩空间不是RGB/Gray/CMYK之一,此函数将抛出 com.foxit.sdk.common.Constants.e_ErrUnsupported
在调用函数 OutputPreview.generatePreviewBitmap 之前,应成功调用此函数。

参数
[in]icc_profile_path用于输出预览仿真配置文件的ICC配置文件的文件路径。
返回
无。