public class PdfFormatConversionOptions extends Object
represents set of options for convert PDF document
Modifier and Type | Class and Description |
---|---|
class |
PdfFormatConversionOptions.PdfANonSpecificationFlags |
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.
|
PdfFormatConversionOptions.PdfANonSpecificationFlags |
getNonSpecificationCases()
Holds flags to control PDF/A conversion process for cases when source document
doesn't correspond to PDF/A specification.
|
boolean |
getOptimizeFileSize()
Gets 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)
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
,
ConvertErrorAction
public PdfFormatConversionOptions(String outputLogFileName, int format)
Constructor
outputLogFileName
- Path to file where comments will be stored.format
- The pdf format.PdfFormat
public PdfFormatConversionOptions(int format)
Constructor
format
- The pdf format.PdfFormat
public PdfFormatConversionOptions(int format, int action)
Constructor
format
- The pdf format.action
- Action for objects that can not be convertedPdfFormat
,
ConvertErrorAction
public 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
,
ConvertTransparencyAction
public 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
,
ConvertErrorAction
public 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.
PdfFormat
public void setFormat(int value)
PDF format.
value
- PdfFormat elementPdfFormat
public 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
ConvertErrorAction
public void setErrorAction(int value)
Action for objects that can not be converted
value
- ConvertErrorAction elementConvertErrorAction
public int getTransparencyAction()
Action for image masked objects
ConvertTransparencyAction
public void setTransparencyAction(int value)
Action for image masked objects
value
- ConvertTransparencyAction elementConvertTransparencyAction
public static PdfFormatConversionOptions getDefault()
Gets PdfFormatConversionOptions object with default parameters
public PdfFormatConversionOptions.PdfANonSpecificationFlags getNonSpecificationCases()
Holds flags to control PDF/A conversion process for cases when source document doesn't correspond to PDF/A specification.
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.PuaProcessingStrategy
public void setPuaTextProcessingStrategy(int value)
Strategy to process symbols from unicode Private Use Area (PUA).
value
- PuaProcessingStrategy elementPdfFormatConversionOptions.PuaProcessingStrategy
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.
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.
value
- boolean valuepublic 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.
RemoveFontsStrategy
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.
value
- boolean valueCopyright © 2017 Aspose. All Rights Reserved.