PdfFormatConversionOptions
Inheritance: java.lang.Object
public class PdfFormatConversionOptions
represents set of options for convert PDF document
Constructors
Methods
Method | Description |
---|---|
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:
Parameter | Type | Description |
---|---|---|
outputLogFileName | java.lang.String | Path to file where comments will be stored. |
format | PdfFormat | The pdf format. |
action | int | Action for objects that can not be converted |
PdfFormatConversionOptions(String outputLogFileName, PdfFormat format)
public PdfFormatConversionOptions(String outputLogFileName, PdfFormat format)
Constructor
Parameters:
Parameter | Type | Description |
---|---|---|
outputLogFileName | java.lang.String | Path to file where comments will be stored. |
format | PdfFormat | The pdf format. |
PdfFormatConversionOptions(PdfFormat format)
public PdfFormatConversionOptions(PdfFormat format)
Constructor
Parameters:
Parameter | Type | Description |
---|---|---|
format | PdfFormat | The pdf format. |
PdfFormatConversionOptions(PdfFormat format, int action)
public PdfFormatConversionOptions(PdfFormat format, int action)
Constructor
Parameters:
Parameter | Type | Description |
---|---|---|
format | PdfFormat | The pdf format. |
action | int | Action 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:
Parameter | Type | Description |
---|---|---|
outputLogFileName | java.lang.String | Path to file where comments will be stored. |
format | PdfFormat | The pdf format. |
action | int | Action for objects that can not be converted |
transparencyAction | int | Action for image masked objects |
PdfFormatConversionOptions(OutputStream outputLogStream, PdfFormat format, int action)
public PdfFormatConversionOptions(OutputStream outputLogStream, PdfFormat format, int action)
Constructor
Parameters:
Parameter | Type | Description |
---|---|---|
outputLogStream | java.io.OutputStream | Stream where comments will be stored |
format | PdfFormat | The pdf format |
action | int | Action 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:
Parameter | Type | Description |
---|---|---|
value | boolean | boolean 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:
Parameter | Type | Description |
---|---|---|
value | boolean | boolean value |
getFormat()
public PdfFormat getFormat()
PDF format.
Returns: PdfFormat - PdfFormat element
setFormat(PdfFormat value)
public void setFormat(PdfFormat value)
PDF format.
Parameters:
Parameter | Type | Description |
---|---|---|
value | PdfFormat | PdfFormat 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:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | String 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:
Parameter | Type | Description |
---|---|---|
value | java.io.OutputStream | OutputStream 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:
Parameter | Type | Description |
---|---|---|
value | int | ConvertErrorAction 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:
Parameter | Type | Description |
---|---|---|
value | int | ConvertTransparencyAction 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:
Parameter | Type | Description |
---|---|---|
value | boolean | boolean 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:
Parameter | Type | Description |
---|---|---|
value | int | int 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:
Parameter | Type | Description |
---|---|---|
value | PdfASymbolicFontEncodingStrategy | PdfASymbolicFontEncodingStrategy 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:
Parameter | Type | Description |
---|---|---|
value | boolean | boolean 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:
Parameter | Type | Description |
---|---|---|
value | int | PuaProcessingStrategy 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:
Parameter | Type | Description |
---|---|---|
value | boolean | boolean 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:
Parameter | Type | Description |
---|---|---|
value | byte | boolean 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:
Parameter | Type | Description |
---|---|---|
value | ToUnicodeProcessingRules | ToUnicodeProcessingRules 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:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | String 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:
Parameter | Type | Description |
---|---|---|
value | boolean | boolean 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:
Parameter | Type | Description |
---|---|---|
dpi | int | Resolution value |
setPageByPageFontProcess(boolean b)
public void setPageByPageFontProcess(boolean b)
Set font analyse on page by page basis mode enabled
Default value = false
Parameters:
Parameter | Type | Description |
---|---|---|
b | boolean | boolean 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:
Parameter | Type | Description |
---|---|---|
alignStrategy | byte | SegmentAlignStrategy element |
addNotAccessibleFont(String fontName)
public void addNotAccessibleFont(String fontName)
Parameters:
Parameter | Type | Description |
---|---|---|
fontName | java.lang.String |