public class PdfSaveOptions extends SaveOptions implements IMultiPageSaveOptions, IXpsTextConversionOptions, IPipelineOptions, IEventBasedModificationOptions
Class for XPS-as-PDF saving options.
| Constructor and Description |
|---|
PdfSaveOptions()
Creates new instance of options.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getBatchSize()
Returns the size of a portion of pages to pass from node to node.
|
List<BeforePageSavingEventHandler> |
getBeforePageSavingEventHandlers()
Returns the collection of event handlers that performs modifications to an XPS page just before it is saved.
|
PdfEncryptionDetails |
getEncryptionDetails()
Returns the encryption details.
|
PdfImageCompression |
getImageCompression()
Returns the compression type to be used for all images in the document.
|
int |
getOutlineTreeExpansionLevel()
Gets up to what level the document outline should be expanded when the PDF file is opened in a viewer.
1 - only the first level outline items are shown,
2 - only the first and second level outline items are shown,
and so on.
|
int |
getOutlineTreeHeight()
Gets the height of the document outline tree to save.
0 - the outline tree will not be converted,
1 - only the first level outline items will be converted,
and so on.
|
int[] |
getPageNumbers()
Gets the array of numbers of pages to render.
|
PdfTextCompression |
getTextCompression()
Returns the compression type to be used for all content streams except images.
|
boolean |
preserveText()
In XPS, some text elements may contain references to alternate glyph forms
that do not correspond to any character code in the font.
|
void |
preserveText(boolean value)
In XPS, some text elements may contain references to alternate glyph forms
that do not correspond to any character code in the font.
|
void |
setBatchSize(int value)
Sets the size of a portion of pages to pass from node to node.
|
void |
setEncryptionDetails(PdfEncryptionDetails value)
Sets the encryption details.
|
void |
setImageCompression(PdfImageCompression value)
Sets the compression type to be used for all images in the document.
|
void |
setOutlineTreeExpansionLevel(int value)
Sets up to what level the document outline should be expanded when the PDF file is opened in a viewer.
1 - only the first level outline items are shown,
2 - only the first and second level outline items are shown,
and so on.
|
void |
setOutlineTreeHeight(int value)
Sets the height of the document outline tree to save.
0 - the outline tree will not be converted,
1 - only the first level outline items will be converted,
and so on.
|
void |
setPageNumbers(int[] value)
Sets the array of numbers of pages to render.
|
void |
setTextCompression(PdfTextCompression value)
Sets the compression type to be used for all content streams except images.
|
getAdditionalFontsFolders, getConvertFontsToTTF, getExceptions, getJpegQualityLevel, getSize, isDebug, isSupressErrors, setAdditionalFontsFolders, setConvertFontsToTTF, setDebug, setJpegQualityLevel, setSize, setSupressErrorspublic int[] getPageNumbers()
Gets the array of numbers of pages to render.
getPageNumbers in interface IMultiPageSaveOptionspublic void setPageNumbers(int[] value)
Sets the array of numbers of pages to render.
setPageNumbers in interface IMultiPageSaveOptionsvalue - Numbers of pages.public int getOutlineTreeHeight()
Gets the height of the document outline tree to save. 0 - the outline tree will not be converted, 1 - only the first level outline items will be converted, and so on. Default is 10.
public void setOutlineTreeHeight(int value)
Sets the height of the document outline tree to save. 0 - the outline tree will not be converted, 1 - only the first level outline items will be converted, and so on.
value - The outline tree height.public int getOutlineTreeExpansionLevel()
Gets up to what level the document outline should be expanded when the PDF file is opened in a viewer. 1 - only the first level outline items are shown, 2 - only the first and second level outline items are shown, and so on.
public void setOutlineTreeExpansionLevel(int value)
Sets up to what level the document outline should be expanded when the PDF file is opened in a viewer. 1 - only the first level outline items are shown, 2 - only the first and second level outline items are shown, and so on.
value - The outline tree expansion level.public PdfTextCompression getTextCompression()
Returns the compression type to be used for all content streams except images.
Default is PdfTextCompression.Flate.
public void setTextCompression(PdfTextCompression value)
Sets the compression type to be used for all content streams except images.
Default is PdfTextCompression.Flate.
value - The compression type.public PdfImageCompression getImageCompression()
Returns the compression type to be used for all images in the document.
Default is PdfImageCompression.Auto.
public void setImageCompression(PdfImageCompression value)
Sets the compression type to be used for all images in the document.
Default is PdfImageCompression.Auto.
value - The compression type.public PdfEncryptionDetails getEncryptionDetails()
Returns the encryption details. If not set, then no encryption will be performed.
public void setEncryptionDetails(PdfEncryptionDetails value)
Sets the encryption details. If not set, then no encryption will be performed.
value - The encryption details.public boolean preserveText()
In XPS, some text elements may contain references to alternate glyph forms that do not correspond to any character code in the font. If this flag is set to true, the text from such XPS elements is converted to graphic shapes. Then the text itself appears transparent on top. This leaves the text of such elements selectable. But the side effect is that the output file may be much larger than the original. If this flag is set to false, the characters that should be displayed as alternate forms are replaced with some other characters that become mapped to the alternate glyph forms. Therefore the text, although still selectable, will be modified and likely become unreadable.
preserveText in interface IXpsTextConversionOptionspublic void preserveText(boolean value)
In XPS, some text elements may contain references to alternate glyph forms that do not correspond to any character code in the font. If this flag is set to true, the text from such XPS elements is converted to graphic shapes. Then the text itself appears transparent on top. This leaves the text of such elements selectable. But the side effect is that the output file may be much larger than the original. If this flag is set to false, the characters that should be displayed as alternate forms are replaced with some other characters that become mapped to the alternate glyph forms. Therefore the text, although still selectable, will be modified and likely become unreadable.
preserveText in interface IXpsTextConversionOptionsvalue - The flag value.public int getBatchSize()
Returns the size of a portion of pages to pass from node to node.
getBatchSize in interface IPipelineOptionspublic void setBatchSize(int value)
Sets the size of a portion of pages to pass from node to node.
setBatchSize in interface IPipelineOptionsvalue - The size of a portion of pages to pass from node to node.public List<BeforePageSavingEventHandler> getBeforePageSavingEventHandlers()
Returns the collection of event handlers that performs modifications to an XPS page just before it is saved.
getBeforePageSavingEventHandlers in interface IEventBasedModificationOptionsCopyright © 2025 Aspose. All Rights Reserved.