PdfFormatConversionOptions

Inheritance: java.lang.Object

public class PdfFormatConversionOptions

represents set of options for convert PDF document

Constructors

ConstructorDescription
PdfFormatConversionOptions(String outputLogFileName, PdfFormat format, int action)Constructor
PdfFormatConversionOptions(String outputLogFileName, PdfFormat format)Constructor
PdfFormatConversionOptions(PdfFormat format)Constructor
PdfFormatConversionOptions(PdfFormat format, int action)Constructor
PdfFormatConversionOptions(String outputLogFileName, PdfFormat format, int action, int transparencyAction)Constructor
PdfFormatConversionOptions(OutputStream outputLogStream, PdfFormat format, int action)Constructor

Methods

MethodDescription
isAsyncImageStreamsConversionMode()Gets/sets run of image streams in async mode.
setAsyncImageStreamsConversionMode(boolean value)Gets/sets run of image streams in async mode.
isLowMemoryMode()Is low memory conversion mode enabled
setLowMemoryMode(boolean value)Is low memory conversion mode enabled
getFormat()PDF format.
setFormat(PdfFormat value)PDF format.
getLogFileName()Path to file where comments will be stored.
setLogFileName(String value)Path to file where comments will be stored.
getLogStream()Stream where comments will be stored.
setLogStream(OutputStream value)Stream where comments will be stored.
getErrorAction()Action for objects that can not be converted
setErrorAction(int value)Action for objects that can not be converted
getTransparencyAction()Action for image masked objects
setTransparencyAction(int value)Action for image masked objects
isTransparencyIgnore()Default value FALSE and transparency color will be proceed to keep document appearance.
setTransparencyIgnore(boolean value)Default value FALSE and transparency color will be proceed to keep document appearance.
getConvertSoftMaskAction()Action for images with soft mask.
setConvertSoftMaskAction(int value)Action for images with soft mask.
getDefault()Gets PdfFormatConversionOptions object with default parameters
getNonSpecificationCases()Holds flags to control PDF/A conversion process for cases when source document doesn’t correspond to PDF/A specification.
getSymbolicFontEncodingStrategy()Strategy to copy encoding data for symbolic fonts if symbolic TrueType font has more than one encoding subtable.
setSymbolicFontEncodingStrategy(PdfASymbolicFontEncodingStrategy value)Strategy to copy encoding data for symbolic fonts if symbolic TrueType font has more than one encoding subtable.
getAlignText()This flag controls text alignment in converted document.
setAlignText(boolean value)This flag controls text alignment in converted document.
getPuaTextProcessingStrategy()Strategy to process symbols from unicode Private Use Area (PUA).
setPuaTextProcessingStrategy(int value)Strategy to process symbols from unicode Private Use Area (PUA).
getOptimizeFileSize()Gets a flag which enables/disables special conversion mode to get PDF/A document with reduced file size.
setOptimizeFileSize(boolean value)Sets a flag which enables/disables special conversion mode to get PDF/A document with reduced file size.
getExcludeFontsStrategy()Strategy(ies) to exclude superfluous fonts and reduce document file size.
setExcludeFontsStrategy(byte value)Strategy(ies) to exclude superfluous fonts and reduce document file size.
getFontEmbeddingOptions()Options for cases when it’s not possible to embed some fonts into PDF document.
getUnicodeProcessingRules()Rules to solve problems with unicode mapping.
setUnicodeProcessingRules(ToUnicodeProcessingRules value)Rules to solve problems with unicode mapping.
getIccProfileFileName()Gets the filename of icc profile name.
setIccProfileFileName(String value)Sets the filename of icc profile name.
getNotAccessibleFonts()This property is out-property.
isTransferInfo()Gets or sets whether to pass data from Info to Metadata when converted to PDF 2.0.
setTransferInfo(boolean value)Gets or sets whether to pass data from Info to Metadata when converted to PDF 2.0.
getTransparencyResolution()Sets resolution during converting transparent images.
setTransparencyResolution(int dpi)Sets resolution during converting transparent images.
setPageByPageFontProcess(boolean b)Set font analyse on page by page basis mode enabled
isPageByPageFontProcess()Is font analyse on page by page basis mode enabled
getAlignStrategy()Strategy to align text.
setAlignStrategy(byte alignStrategy)Strategy to align text.
addNotAccessibleFont(String fontName)

PdfFormatConversionOptions(String outputLogFileName, PdfFormat format, int action)

public PdfFormatConversionOptions(String outputLogFileName, PdfFormat format, int action)

Constructor

Parameters:

ParameterTypeDescription
outputLogFileNamejava.lang.StringPath to file where comments will be stored.
formatPdfFormatThe pdf format.
actionintAction for objects that can not be converted

PdfFormatConversionOptions(String outputLogFileName, PdfFormat format)

public PdfFormatConversionOptions(String outputLogFileName, PdfFormat format)

Constructor

Parameters:

ParameterTypeDescription
outputLogFileNamejava.lang.StringPath to file where comments will be stored.
formatPdfFormatThe pdf format.

PdfFormatConversionOptions(PdfFormat format)

public PdfFormatConversionOptions(PdfFormat format)

Constructor

Parameters:

ParameterTypeDescription
formatPdfFormatThe pdf format.

PdfFormatConversionOptions(PdfFormat format, int action)

public PdfFormatConversionOptions(PdfFormat format, int action)

Constructor

Parameters:

ParameterTypeDescription
formatPdfFormatThe pdf format.
actionintAction for objects that can not be converted

PdfFormatConversionOptions(String outputLogFileName, PdfFormat format, int action, int transparencyAction)

public PdfFormatConversionOptions(String outputLogFileName, PdfFormat format, int action, int transparencyAction)

Constructor

Parameters:

ParameterTypeDescription
outputLogFileNamejava.lang.StringPath to file where comments will be stored.
formatPdfFormatThe pdf format.
actionintAction for objects that can not be converted
transparencyActionintAction for image masked objects

PdfFormatConversionOptions(OutputStream outputLogStream, PdfFormat format, int action)

public PdfFormatConversionOptions(OutputStream outputLogStream, PdfFormat format, int action)

Constructor

Parameters:

ParameterTypeDescription
outputLogStreamjava.io.OutputStreamStream where comments will be stored
formatPdfFormatThe pdf format
actionintAction for objects that can not be converted

isAsyncImageStreamsConversionMode()

public final boolean isAsyncImageStreamsConversionMode()

Gets/sets run of image streams in async mode.

Returns: boolean - boolean value

setAsyncImageStreamsConversionMode(boolean value)

public final void setAsyncImageStreamsConversionMode(boolean value)

Gets/sets run of image streams in async mode.

Parameters:

ParameterTypeDescription
valuebooleanboolean value

isLowMemoryMode()

public final boolean isLowMemoryMode()

Is low memory conversion mode enabled

Returns: boolean - boolean value

setLowMemoryMode(boolean value)

public void setLowMemoryMode(boolean value)

Is low memory conversion mode enabled

Parameters:

ParameterTypeDescription
valuebooleanboolean value

getFormat()

public PdfFormat getFormat()

PDF format.

Returns: PdfFormat - PdfFormat element

setFormat(PdfFormat value)

public void setFormat(PdfFormat value)

PDF format.

Parameters:

ParameterTypeDescription
valuePdfFormatPdfFormat element

getLogFileName()

public String getLogFileName()

Path to file where comments will be stored.

Returns: java.lang.String - String object

setLogFileName(String value)

public void setLogFileName(String value)

Path to file where comments will be stored.

Parameters:

ParameterTypeDescription
valuejava.lang.StringString object

getLogStream()

public OutputStream getLogStream()

Stream where comments will be stored.

Returns: java.io.OutputStream - OutputStream object

setLogStream(OutputStream value)

public void setLogStream(OutputStream value)

Stream where comments will be stored.

Parameters:

ParameterTypeDescription
valuejava.io.OutputStreamOutputStream object

getErrorAction()

public int getErrorAction()

Action for objects that can not be converted

Returns: int - ConvertErrorAction element

setErrorAction(int value)

public void setErrorAction(int value)

Action for objects that can not be converted

Parameters:

ParameterTypeDescription
valueintConvertErrorAction element

getTransparencyAction()

public int getTransparencyAction()

Action for image masked objects

Returns: int - ConvertTransparencyAction element

setTransparencyAction(int value)

public void setTransparencyAction(int value)

Action for image masked objects

Parameters:

ParameterTypeDescription
valueintConvertTransparencyAction element

isTransparencyIgnore()

public boolean isTransparencyIgnore()

Default value FALSE and transparency color will be proceed to keep document appearance. With value TRUE transparency color will be converted into non-transparency, some objects could be covered.

Returns: boolean - boolean value

setTransparencyIgnore(boolean value)

public void setTransparencyIgnore(boolean value)

Default value FALSE and transparency color will be proceed to keep document appearance. With value TRUE transparency color will be converted into non-transparency, some objects could be covered.

Parameters:

ParameterTypeDescription
valuebooleanboolean value

getConvertSoftMaskAction()

public final int getConvertSoftMaskAction()

Action for images with soft mask.

Returns: int - int value

setConvertSoftMaskAction(int value)

public final void setConvertSoftMaskAction(int value)

Action for images with soft mask.

Parameters:

ParameterTypeDescription
valueintint value

getDefault()

public static PdfFormatConversionOptions getDefault()

Gets PdfFormatConversionOptions object with default parameters

Returns: PdfFormatConversionOptions - PdfFormatConversionOptions object

getNonSpecificationCases()

public PdfFormatConversionOptions.PdfANonSpecificationFlags getNonSpecificationCases()

Holds flags to control PDF/A conversion process for cases when source document doesn’t correspond to PDF/A specification.

Returns: PdfANonSpecificationFlags - PdfANonSpecificationFlags object

getSymbolicFontEncodingStrategy()

public PdfASymbolicFontEncodingStrategy getSymbolicFontEncodingStrategy()

Strategy to copy encoding data for symbolic fonts if symbolic TrueType font has more than one encoding subtable.

Returns: PdfASymbolicFontEncodingStrategy - PdfASymbolicFontEncodingStrategy object

setSymbolicFontEncodingStrategy(PdfASymbolicFontEncodingStrategy value)

public void setSymbolicFontEncodingStrategy(PdfASymbolicFontEncodingStrategy value)

Strategy to copy encoding data for symbolic fonts if symbolic TrueType font has more than one encoding subtable.

Parameters:

ParameterTypeDescription
valuePdfASymbolicFontEncodingStrategyPdfASymbolicFontEncodingStrategy object

getAlignText()

public boolean getAlignText()

This flag controls text alignment in converted document. By default document conversion doesn’t affect text alignment and leave text as is. But in some cases font substitution causes text overlapping or extra spaces in converted document. When this flag is set special alignment operations will be performed. This flag should be set only for documents which have problems with overlapped text or extra text spaces cause using of this flag decrease performance and in some cases could corrupt text content.

Returns: boolean - boolean value

setAlignText(boolean value)

public void setAlignText(boolean value)

This flag controls text alignment in converted document. By default document conversion doesn’t affect text alignment and leave text as is. But in some cases font substitution causes text overlapping or extra spaces in converted document. When this flag is set special alignment operations will be performed. This flag should be set only for documents which have problems with overlapped text or extra text spaces cause using of this flag decrease performance and in some cases could corrupt text content.

Parameters:

ParameterTypeDescription
valuebooleanboolean value

getPuaTextProcessingStrategy()

public int getPuaTextProcessingStrategy()

Strategy to process symbols from unicode Private Use Area (PUA).

Returns: int - PuaProcessingStrategy element

setPuaTextProcessingStrategy(int value)

public void setPuaTextProcessingStrategy(int value)

Strategy to process symbols from unicode Private Use Area (PUA).

Parameters:

ParameterTypeDescription
valueintPuaProcessingStrategy element

getOptimizeFileSize()

public boolean getOptimizeFileSize()

Gets a flag which enables/disables special conversion mode to get PDF/A document with reduced file size.

Now this flag impacts on optimization of fonts used in PDF document, possibly, in future, this flag also will be used to switch on optimization for another data structures, such as graphic.

Set of this flag and mode could significantly reduce file size but at the same time it could significantly decrease performance of conversion.

Returns: boolean - boolean value

setOptimizeFileSize(boolean value)

public void setOptimizeFileSize(boolean value)

Sets a flag which enables/disables special conversion mode to get PDF/A document with reduced file size.

Now this flag impacts on optimization of fonts used in PDF document, possibly, in future, this flag also will be used to switch on optimization for another data structures, such as graphic.

Set of this flag and mode could significantly reduce file size but at the same time it could significantly decrease performance of conversion.

Parameters:

ParameterTypeDescription
valuebooleanboolean value

getExcludeFontsStrategy()

public byte getExcludeFontsStrategy()

Strategy(ies) to exclude superfluous fonts and reduce document file size. This parameter has sense only when flag OptimizeFileSize is set to true. By default combination of strategies SubsetFonts and RemoveDuplicatedFonts is used.

Returns: byte - byte value

setExcludeFontsStrategy(byte value)

public void setExcludeFontsStrategy(byte value)

Strategy(ies) to exclude superfluous fonts and reduce document file size. This parameter has sense only when flag OptimizeFileSize is set to true. By default combination of strategies SubsetFonts and RemoveDuplicatedFonts is used.

Parameters:

ParameterTypeDescription
valuebyteboolean value

getFontEmbeddingOptions()

public FontEmbeddingOptions getFontEmbeddingOptions()

Options for cases when it’s not possible to embed some fonts into PDF document.

Returns: FontEmbeddingOptions - FontEmbeddingOptions object

getUnicodeProcessingRules()

public ToUnicodeProcessingRules getUnicodeProcessingRules()

Rules to solve problems with unicode mapping. Can be null.

Returns: ToUnicodeProcessingRules - ToUnicodeProcessingRules object

setUnicodeProcessingRules(ToUnicodeProcessingRules value)

public void setUnicodeProcessingRules(ToUnicodeProcessingRules value)

Rules to solve problems with unicode mapping. Can be null.

Parameters:

ParameterTypeDescription
valueToUnicodeProcessingRulesToUnicodeProcessingRules object

getIccProfileFileName()

public String getIccProfileFileName()

Gets the filename of icc profile name. In case of null the default icc profile used.

Returns: java.lang.String - String object

setIccProfileFileName(String value)

public void setIccProfileFileName(String value)

Sets the filename of icc profile name. In case of null the default icc profile used.

Parameters:

ParameterTypeDescription
valuejava.lang.StringString object

getNotAccessibleFonts()

public String[] getNotAccessibleFonts()

This property is out-property. It holds all the fonts(font names) which were not found on computer at last PDF/A conversion.

Returns: java.lang.String[] - Array of Strings

isTransferInfo()

public final boolean isTransferInfo()

Gets or sets whether to pass data from Info to Metadata when converted to PDF 2.0. True by default.

Returns: boolean - boolean value

setTransferInfo(boolean value)

public final void setTransferInfo(boolean value)

Gets or sets whether to pass data from Info to Metadata when converted to PDF 2.0. True by default.

Parameters:

ParameterTypeDescription
valuebooleanboolean value

getTransparencyResolution()

public int getTransparencyResolution()

Sets resolution during converting transparent images. The higher resolution, the slower converting speed. The default value is 300.

Returns: int - Resolution value

setTransparencyResolution(int dpi)

public void setTransparencyResolution(int dpi)

Sets resolution during converting transparent images. The higher resolution, the slower converting speed. The default value is 300.

Parameters:

ParameterTypeDescription
dpiintResolution value

setPageByPageFontProcess(boolean b)

public void setPageByPageFontProcess(boolean b)

Set font analyse on page by page basis mode enabled

Default value = false

Parameters:

ParameterTypeDescription
bbooleanboolean value

isPageByPageFontProcess()

public boolean isPageByPageFontProcess()

Is font analyse on page by page basis mode enabled

Default value = false

Returns: boolean - boolean value

getAlignStrategy()

public byte getAlignStrategy()

Strategy to align text. This parameter has sense only when flag AlignText is set to true.

Returns: byte - SegmentAlignStrategy element

setAlignStrategy(byte alignStrategy)

public void setAlignStrategy(byte alignStrategy)

Strategy to align text. This parameter has sense only when flag AlignText is set to true.

Parameters:

ParameterTypeDescription
alignStrategybyteSegmentAlignStrategy element

addNotAccessibleFont(String fontName)

public void addNotAccessibleFont(String fontName)

Parameters:

ParameterTypeDescription
fontNamejava.lang.String