PdfSaveOptions

Inheritance: java.lang.Object, com.aspose.page.SaveOptions

All Implemented Interfaces: com.aspose.page.IMultiPageSaveOptions, com.aspose.xps.rendering.IXpsTextConversionOptions, com.aspose.xps.rendering.IPipelineOptions, com.aspose.xps.rendering.IEventBasedModificationOptions

public class PdfSaveOptions extends SaveOptions implements IMultiPageSaveOptions, IXpsTextConversionOptions, IPipelineOptions, IEventBasedModificationOptions

Class for XPS-as-PDF saving options.

Constructors

ConstructorDescription
PdfSaveOptions()Creates new instance of options.

Methods

MethodDescription
equals(Object arg0)
getAdditionalFontsFolders()Returns additional fonts folders where converter should find fonts for input document.
getBatchSize()Returns the size of a portion of pages to pass from node to node.
getBeforePageSavingEventHandlers()Returns the collection of event handlers that performs modifications to an XPS page just before it is saved.
getClass()
getEncryptionDetails()Returns the encryption details.
getExceptions()Returns a list of non-critical errors.
getImageCompression()Returns the compression type to be used for all images in the document.
getJpegQualityLevel()Returns the value specifying the level of compression for an image.
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.
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.
getPageNumbers()Gets the array of numbers of pages to render.
getSize()Gets a size of the page or image.
getTextCompression()Returns the compression type to be used for all content streams except images.
hashCode()
isDebug()Gets the flag that allows output of warnings and messages during conversion.
isSupressErrors()Returns a value indicating whether errors will be suppressed during conversion.
notify()
notifyAll()
preserveText()In XPS, some text elements may contain references to alternate glyph forms that do not correspond to any character code in the font.
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.
setAdditionalFontsFolders(String[] fontsFolders)Specifies additional fonts folders where converter should find fonts for input document.
setBatchSize(int value)Sets the size of a portion of pages to pass from node to node.
setDebug(boolean debug)Specifies the flag that allows output of warnings and messages during conversion.
setEncryptionDetails(PdfEncryptionDetails value)Sets the encryption details.
setImageCompression(PdfImageCompression value)Sets the compression type to be used for all images in the document.
setJpegQualityLevel(int value)Sets the value specifying the level of compression for an image.
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.
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.
setPageNumbers(int[] value)Sets the array of numbers of pages to render.
setSize(Dimension size)Specifies a size of the page or image.
setSupressErrors(boolean supressErrors)Specifies the flag that indicates whether errors will be suppressed during conversion.
setTextCompression(PdfTextCompression value)Sets the compression type to be used for all content streams except images.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

PdfSaveOptions()

public PdfSaveOptions()

Creates new instance of options.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getAdditionalFontsFolders()

public String[] getAdditionalFontsFolders()

Returns additional fonts folders where converter should find fonts for input document. Default folder is standard fonts folder where OS finds fonts for internal needs.

Returns: java.lang.String[] - An array of fonts folders.

getBatchSize()

public int getBatchSize()

Returns the size of a portion of pages to pass from node to node.

Returns: int - The size of a portion of pages to pass from node to node.

getBeforePageSavingEventHandlers()

public List<EventBasedModifications.BeforePageSavingEventHandler> getBeforePageSavingEventHandlers()

Returns the collection of event handlers that performs modifications to an XPS page just before it is saved.

Returns: java.util.List<com.aspose.xps.features.EventBasedModifications.BeforePageSavingEventHandler> - The collection of event handlers that performs modifications to an XPS page just before it is saved.

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getEncryptionDetails()

public PdfEncryptionDetails getEncryptionDetails()

Returns the encryption details. If not set, then no encryption will be performed.

Returns: PdfEncryptionDetails - The encryption details.

getExceptions()

public List<Exception> getExceptions()

Returns a list of non-critical errors.

Returns: java.util.List<java.lang.Exception> - Exceptions list

getImageCompression()

public PdfImageCompression getImageCompression()

Returns the compression type to be used for all images in the document. Default is PdfImageCompression.Auto .

Returns: PdfImageCompression - The compression type.

getJpegQualityLevel()

public int getJpegQualityLevel()

Returns the value specifying the level of compression for an image. Available values are 0 to 100. The lower the number specified, the higher the compression and therefore the lower the quality of the image. 0 value results in lowest quality image, while 100 results in highest.

Returns: int - The value specifying the level of compression for an image.

getOutlineTreeExpansionLevel()

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.

Returns: int - The outline tree expansion level.

getOutlineTreeHeight()

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.

Returns: int - The outline tree height.

getPageNumbers()

public int[] getPageNumbers()

Gets the array of numbers of pages to render.

Returns: int[] - Numbers of pages.

getSize()

public Dimension getSize()

Gets a size of the page or image.

Returns: java.awt.Dimension - A size of the page or image.

getTextCompression()

public PdfTextCompression getTextCompression()

Returns the compression type to be used for all content streams except images. Default is PdfTextCompression.Flate .

Returns: PdfTextCompression - The compression type.

hashCode()

public native int hashCode()

Returns: int

isDebug()

public boolean isDebug()

Gets the flag that allows output of warnings and messages during conversion.

Returns: boolean - debug value.

isSupressErrors()

public boolean isSupressErrors()

Returns a value indicating whether errors will be suppressed during conversion.

Returns: boolean - boolean value

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

preserveText()

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.

Returns: boolean - The flag value.

preserveText(boolean value)

public 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.

Parameters:

ParameterTypeDescription
valuebooleanThe flag value.

setAdditionalFontsFolders(String[] fontsFolders)

public void setAdditionalFontsFolders(String[] fontsFolders)

Specifies additional fonts folders where converter should find fonts for input document. Default folder is standard fonts folder where OS finds fonts for internal needs.

Parameters:

ParameterTypeDescription
fontsFoldersjava.lang.String[]An array of fonts folders.

setBatchSize(int value)

public void setBatchSize(int value)

Sets the size of a portion of pages to pass from node to node.

Parameters:

ParameterTypeDescription
valueintThe size of a portion of pages to pass from node to node.

setDebug(boolean debug)

public void setDebug(boolean debug)

Specifies the flag that allows output of warnings and messages during conversion.

Parameters:

ParameterTypeDescription
debugbooleanBoolean value.

setEncryptionDetails(PdfEncryptionDetails value)

public void setEncryptionDetails(PdfEncryptionDetails value)

Sets the encryption details. If not set, then no encryption will be performed.

Parameters:

ParameterTypeDescription
valuePdfEncryptionDetailsThe encryption details.

setImageCompression(PdfImageCompression value)

public void setImageCompression(PdfImageCompression value)

Sets the compression type to be used for all images in the document. Default is PdfImageCompression.Auto .

Parameters:

ParameterTypeDescription
valuePdfImageCompressionThe compression type.

setJpegQualityLevel(int value)

public void setJpegQualityLevel(int value)

Sets the value specifying the level of compression for an image. Available values are 0 to 100. The lower the number specified, the higher the compression and therefore the lower the quality of the image. 0 value results in lowest quality image, while 100 results in highest.

Parameters:

ParameterTypeDescription
valueintThe value specifying the level of compression for an image.

setOutlineTreeExpansionLevel(int value)

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.

Parameters:

ParameterTypeDescription
valueintThe outline tree expansion level.

setOutlineTreeHeight(int value)

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.

Parameters:

ParameterTypeDescription
valueintThe outline tree height.

setPageNumbers(int[] value)

public void setPageNumbers(int[] value)

Sets the array of numbers of pages to render.

Parameters:

ParameterTypeDescription
valueint[]Numbers of pages.

setSize(Dimension size)

public void setSize(Dimension size)

Specifies a size of the page or image.

Parameters:

ParameterTypeDescription
sizejava.awt.DimensionSize of the page or image.

setSupressErrors(boolean supressErrors)

public void setSupressErrors(boolean supressErrors)

Specifies the flag that indicates whether errors will be suppressed during conversion.

Parameters:

ParameterTypeDescription
supressErrorsbooleanBoolean value.

setTextCompression(PdfTextCompression value)

public void setTextCompression(PdfTextCompression value)

Sets the compression type to be used for all content streams except images. Default is PdfTextCompression.Flate .

Parameters:

ParameterTypeDescription
valuePdfTextCompressionThe compression type.

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int