public class PdfFormatConversionOptions extends Object
represents set of options for convert PDF document
| Modifier and Type | Class and Description |
|---|---|
static class |
PdfFormatConversionOptions.PuaProcessingStrategy
Some PDF documents have special unicode symbols, which are belonged to Private Use Area (PUA),
see description at https://en.wikipedia.org/wiki/Private_Use_Areas.
|
static class |
PdfFormatConversionOptions.RemoveFontsStrategy
Some documens have large size after converison into PDF/A format.
|
static class |
PdfFormatConversionOptions.SegmentAlignStrategy
Describes strategies used to align document text segments.
|
| Modifier and Type | Field and Description |
|---|---|
byte |
AlignStrategy
Strategy to align text.
|
| Constructor and Description |
|---|
PdfFormatConversionOptions(int format)
Constructor
|
PdfFormatConversionOptions(int format,
int action)
Constructor
|
PdfFormatConversionOptions(OutputStream outputLogStream,
int format,
int action)
Constructor
|
PdfFormatConversionOptions(String outputLogFileName,
int format)
Constructor
|
PdfFormatConversionOptions(String outputLogFileName,
int format,
int action)
Constructor
|
PdfFormatConversionOptions(String outputLogFileName,
int format,
int action,
int transparencyAction)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getAlignText()
This flag controls text alignment in converted document.
|
static PdfFormatConversionOptions |
getDefault()
Gets PdfFormatConversionOptions object with default parameters
|
int |
getErrorAction()
Action for objects that can not be converted
|
byte |
getExcludeFontsStrategy()
Strategy(ies) to exclude superfluous fonts and reduce document file size.
|
int |
getFormat()
PDF format.
|
String |
getLogFileName()
Path to file where comments will be stored.
|
OutputStream |
getLogStream()
Stream where comments will be stored.
|
boolean |
getOptimizeFileSize()
Gets or sets a flag which enables/disables special conversion mode to get PDF/A document with reduced file size.
|
int |
getPuaTextProcessingStrategy()
Strategy to process symbols from unicode Private Use Area (PUA).
|
int |
getTransparencyAction()
Action for image masked objects
|
boolean |
isLowMemoryMode()
Is low memory conversion mode enabled
|
void |
setAlignText(boolean value)
This flag controls text alignment in converted document.
|
void |
setErrorAction(int value)
Action for objects that can not be converted
|
void |
setExcludeFontsStrategy(byte value)
Strategy(ies) to exclude superfluous fonts and reduce document file size.
|
void |
setFormat(int value)
PDF format.
|
void |
setLogFileName(String value)
Path to file where comments will be stored.
|
void |
setLogStream(OutputStream value)
Stream where comments will be stored.
|
void |
setLowMemoryMode(boolean value)
Is low memory conversion mode enabled
|
void |
setOptimizeFileSize(boolean value)
Gets or sets a flag which enables/disables special conversion mode to get PDF/A document with reduced file size.
|
void |
setPuaTextProcessingStrategy(int value)
Strategy to process symbols from unicode Private Use Area (PUA).
|
void |
setTransparencyAction(int value)
Action for image masked objects
|
public byte AlignStrategy
Strategy to align text. This parameter has sense only when flag AlignText is set to true.
public PdfFormatConversionOptions(String outputLogFileName, int format, int action)
Constructor
outputLogFileName - Path to file where comments will be stored.format - The pdf format.action - Action for objects that can not be convertedPdfFormat,
ConvertErrorActionpublic PdfFormatConversionOptions(String outputLogFileName, int format)
Constructor
outputLogFileName - Path to file where comments will be stored.format - The pdf format.PdfFormatpublic PdfFormatConversionOptions(int format)
Constructor
format - The pdf format.PdfFormatpublic PdfFormatConversionOptions(int format,
int action)
Constructor
format - The pdf format.action - Action for objects that can not be convertedPdfFormat,
ConvertErrorActionpublic PdfFormatConversionOptions(String outputLogFileName, int format, int action, int transparencyAction)
Constructor
outputLogFileName - Path to file where comments will be stored.format - The pdf format.action - Action for objects that can not be convertedtransparencyAction - Action for image masked objectsPdfFormat,
ConvertErrorAction,
ConvertTransparencyActionpublic PdfFormatConversionOptions(OutputStream outputLogStream, int format, int action)
Constructor
outputLogStream - Stream where comments will be storedformat - The pdf formataction - Action for objects that can not be convertedPdfFormat,
ConvertErrorActionpublic boolean isLowMemoryMode()
Is low memory conversion mode enabled
public void setLowMemoryMode(boolean value)
Is low memory conversion mode enabled
value - boolean valuepublic int getFormat()
PDF format.
PdfFormatpublic void setFormat(int value)
PDF format.
value - PdfFormat elementPdfFormatpublic String getLogFileName()
Path to file where comments will be stored.
public void setLogFileName(String value)
Path to file where comments will be stored.
value - String objectpublic OutputStream getLogStream()
Stream where comments will be stored.
public void setLogStream(OutputStream value)
Stream where comments will be stored.
value - OutputStream objectpublic int getErrorAction()
Action for objects that can not be converted
ConvertErrorActionpublic void setErrorAction(int value)
Action for objects that can not be converted
value - ConvertErrorAction elementConvertErrorActionpublic int getTransparencyAction()
Action for image masked objects
ConvertTransparencyActionpublic void setTransparencyAction(int value)
Action for image masked objects
value - ConvertTransparencyAction elementConvertTransparencyActionpublic static PdfFormatConversionOptions getDefault()
Gets PdfFormatConversionOptions object with default parameters
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.
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.
value - boolean valuepublic int getPuaTextProcessingStrategy()
Strategy to process symbols from unicode Private Use Area (PUA).
PdfFormatConversionOptions.PuaProcessingStrategypublic void setPuaTextProcessingStrategy(int value)
Strategy to process symbols from unicode Private Use Area (PUA).
value - PuaProcessingStrategy elementPdfFormatConversionOptions.PuaProcessingStrategypublic boolean getOptimizeFileSize()
Gets or sets a flag which enables/disables special conversion mode to get PDF/A document with reduced file size. Set of this flag and mode could significantly reduce file size but at the same time it could significantly decrease performance of conversion.
public void setOptimizeFileSize(boolean value)
Gets or sets a flag which enables/disables special conversion mode to get PDF/A document with reduced file size. Set of this flag and mode could significantly reduce file size but at the same time it could significantly decrease performance of conversion.
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.
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.
Copyright © 2016 Aspose. All Rights Reserved.