PdfSaveOptions

Inheritance: java.lang.Object, com.aspose.words.SaveOptions, com.aspose.words.FixedPageSaveOptions

All Implemented Interfaces: java.lang.Cloneable

public class PdfSaveOptions extends FixedPageSaveOptions implements Cloneable

Can be used to specify additional options when saving a document into the SaveFormat.PDF format.

To learn more, visit the Specify Save Options documentation article.

Constructors

Constructor Description
PdfSaveOptions() Initializes a new instance of this class that can be used to save a document in the SaveFormat.PDF format.

Methods

Method Description
createSaveOptions(int saveFormat)
createSaveOptions(String fileName) Creates a save options object of a class suitable for the file extension specified in the given file name.
deepClone() Creates a deep clone of this object.
equals(Object obj) Determines whether the specified object is equal in value to the current object.
getAdditionalTextPositioning() A flag specifying whether to write additional text positioning operators or not.
getAllowEmbeddingPostScriptFonts() Gets a boolean value indicating whether to allow embedding fonts with PostScript outlines when embedding TrueType fonts in a document upon it is saved.
getCacheHeaderFooterShapes() Gets a value determining whether or not to cache shapes placed in header and footer of document.
getClass()
getColorMode() Gets a value determining how colors are rendered.
getCompliance() Specifies the PDF standards compliance level for output documents.
getCreateNoteHyperlinks() Specifies whether to convert footnote/endnote references in main text story into active hyperlinks.
getCustomPropertiesExport() Gets a value determining the way Document.getCustomDocumentProperties() are exported to PDF file.
getDefaultTemplate() Gets path to default template (including filename).
getDigitalSignatureDetails() Gets the details for signing the output PDF document.
getDisplayDocTitle() A flag specifying whether the window\u2019s title bar should display the document title taken from the Title entry of the document information dictionary.
getDml3DEffectsRenderingMode() Gets a value determining how 3D effects are rendered.
getDmlEffectsRenderingMode() Gets a value determining how DrawingML effects are rendered.
getDmlRenderingMode() Gets a value determining how DrawingML shapes are rendered.
getDownsampleOptions() Allows to specify downsample options.
getEmbedFullFonts() Controls how fonts are embedded into the resulting PDF documents.
getEncryptionDetails() Gets the details for encrypting the output PDF document.
getExportDocumentStructure() Gets a value determining whether or not to export document structure.
getExportGeneratorName() When true, causes the name and version of Aspose.Words to be embedded into produced files.
getExportLanguageToSpanTag() Gets a value determining whether or not to create a “Span” tag in the document structure to export the text language.
getFontEmbeddingMode() Specifies the font embedding mode.
getHeaderFooterBookmarksExportMode() Determines how bookmarks in headers/footers are exported.
getImageColorSpaceExportMode() Specifies how the color space will be selected for the images in PDF document.
getImageCompression() Specifies compression type to be used for all images in the document.
getImlRenderingMode() Gets a value determining how ink (InkML) objects are rendered.
getInterpolateImages() A flag indicating whether image interpolation shall be performed by a conforming reader.
getJpegQuality() Gets a value determining the quality of the JPEG images inside PDF document.
getMemoryOptimization() Gets value determining if memory optimization should be performed before saving the document.
getMetafileRenderingOptions() Allows to specify metafile rendering options.
getNumeralFormat() Gets NumeralFormat used for rendering of numerals.
getOpenHyperlinksInNewWindow() Gets a value determining whether hyperlinks in the output Pdf document are forced to be opened in a new window (or tab) of a browser.
getOptimizeOutput() Flag indicates whether it is required to optimize output.
getOutlineOptions() Allows to specify outline options.
getPageMode() Specifies how the PDF document should be displayed when opened in the PDF reader.
getPageSavingCallback() Allows to control how separate pages are saved when a document is exported to fixed page format.
getPageSet() Gets the pages to render.
getPreblendImages() Gets a value determining whether or not to preblend transparent images with black background color.
getPreserveFormFields() Specifies whether to preserve Microsoft Word form fields as form fields in PDF or convert them to text.
getPrettyFormat() When true , pretty formats output where applicable.
getProgressCallback() Called during saving a document and accepts data about saving progress.
getSaveFormat() Specifies the format in which the document will be saved if this save options object is used.
getTempFolder() Specifies the folder for temporary files used when saving to a DOC or DOCX file.
getTextCompression() Specifies compression type to be used for all textual content in the document.
getUpdateCreatedTimeProperty() Gets a value determining whether the BuiltInDocumentProperties.getCreatedTime() / BuiltInDocumentProperties.setCreatedTime(java.util.Date) property is updated before saving.
getUpdateFields() Gets a value determining if fields of certain types should be updated before saving the document to a fixed page format.
getUpdateLastPrintedProperty() Gets a value determining whether the BuiltInDocumentProperties.getLastPrinted() / BuiltInDocumentProperties.setLastPrinted(java.util.Date) property is updated before saving.
getUpdateLastSavedTimeProperty() Gets a value determining whether the BuiltInDocumentProperties.getLastSavedTime() / BuiltInDocumentProperties.setLastSavedTime(java.util.Date) property is updated before saving.
getUpdateSdtContent() Gets value determining whether content of StructuredDocumentTag is updated before saving.
getUseAntiAliasing() Gets a value determining whether or not to use anti-aliasing for rendering.
getUseBookFoldPrintingSettings() Gets a boolean value indicating whether the document should be saved using a booklet printing layout, if it is specified via PageSetup.getMultiplePages() / PageSetup.setMultiplePages(int).
getUseCoreFonts() Gets a value determining whether or not to substitute TrueType fonts Arial, Times New Roman, Courier New and Symbol with core PDF Type 1 fonts.
getUseHighQualityRendering() Gets a value determining whether or not to use high quality (i.e.
getZoomBehavior() Gets a value determining what type of zoom should be applied when a document is opened with a PDF viewer.
getZoomFactor() Gets a value determining zoom factor (in percentages) for a document.
hashCode()
notify()
notifyAll()
setAdditionalTextPositioning(boolean value) A flag specifying whether to write additional text positioning operators or not.
setAllowEmbeddingPostScriptFonts(boolean value) Sets a boolean value indicating whether to allow embedding fonts with PostScript outlines when embedding TrueType fonts in a document upon it is saved.
setCacheHeaderFooterShapes(boolean value) Sets a value determining whether or not to cache shapes placed in header and footer of document.
setColorMode(int value) Sets a value determining how colors are rendered.
setCompliance(int value) Specifies the PDF standards compliance level for output documents.
setCreateNoteHyperlinks(boolean value) Specifies whether to convert footnote/endnote references in main text story into active hyperlinks.
setCustomPropertiesExport(int value) Sets a value determining the way Document.getCustomDocumentProperties() are exported to PDF file.
setDefaultTemplate(String value) Sets path to default template (including filename).
setDigitalSignatureDetails(PdfDigitalSignatureDetails value) Sets the details for signing the output PDF document.
setDisplayDocTitle(boolean value) A flag specifying whether the window\u2019s title bar should display the document title taken from the Title entry of the document information dictionary.
setDml3DEffectsRenderingMode(int value) Sets a value determining how 3D effects are rendered.
setDmlEffectsRenderingMode(int value) Sets a value determining how DrawingML effects are rendered.
setDmlRenderingMode(int value) Sets a value determining how DrawingML shapes are rendered.
setDownsampleOptions(DownsampleOptions value) Allows to specify downsample options.
setEmbedFullFonts(boolean value) Controls how fonts are embedded into the resulting PDF documents.
setEncryptionDetails(PdfEncryptionDetails value) Sets the details for encrypting the output PDF document.
setExportDocumentStructure(boolean value) Sets a value determining whether or not to export document structure.
setExportGeneratorName(boolean value) When true, causes the name and version of Aspose.Words to be embedded into produced files.
setExportLanguageToSpanTag(boolean value) Sets a value determining whether or not to create a “Span” tag in the document structure to export the text language.
setFontEmbeddingMode(int value) Specifies the font embedding mode.
setHeaderFooterBookmarksExportMode(int value) Determines how bookmarks in headers/footers are exported.
setImageColorSpaceExportMode(int value) Specifies how the color space will be selected for the images in PDF document.
setImageCompression(int value) Specifies compression type to be used for all images in the document.
setImlRenderingMode(int value) Sets a value determining how ink (InkML) objects are rendered.
setInterpolateImages(boolean value) A flag indicating whether image interpolation shall be performed by a conforming reader.
setJpegQuality(int value) Sets a value determining the quality of the JPEG images inside PDF document.
setMemoryOptimization(boolean value) Sets value determining if memory optimization should be performed before saving the document.
setMetafileRenderingOptions(MetafileRenderingOptions value) Allows to specify metafile rendering options.
setNumeralFormat(int value) Sets NumeralFormat used for rendering of numerals.
setOpenHyperlinksInNewWindow(boolean value) Sets a value determining whether hyperlinks in the output Pdf document are forced to be opened in a new window (or tab) of a browser.
setOptimizeOutput(boolean value) Flag indicates whether it is required to optimize output.
setPageMode(int value) Specifies how the PDF document should be displayed when opened in the PDF reader.
setPageSavingCallback(IPageSavingCallback value) Allows to control how separate pages are saved when a document is exported to fixed page format.
setPageSet(PageSet value) Sets the pages to render.
setPreblendImages(boolean value) Sets a value determining whether or not to preblend transparent images with black background color.
setPreserveFormFields(boolean value) Specifies whether to preserve Microsoft Word form fields as form fields in PDF or convert them to text.
setPrettyFormat(boolean value) When true , pretty formats output where applicable.
setProgressCallback(IDocumentSavingCallback value) Called during saving a document and accepts data about saving progress.
setSaveFormat(int value) Specifies the format in which the document will be saved if this save options object is used.
setTempFolder(String value) Specifies the folder for temporary files used when saving to a DOC or DOCX file.
setTextCompression(int value) Specifies compression type to be used for all textual content in the document.
setUpdateCreatedTimeProperty(boolean value) Sets a value determining whether the BuiltInDocumentProperties.getCreatedTime() / BuiltInDocumentProperties.setCreatedTime(java.util.Date) property is updated before saving.
setUpdateFields(boolean value) Sets a value determining if fields of certain types should be updated before saving the document to a fixed page format.
setUpdateLastPrintedProperty(boolean value) Sets a value determining whether the BuiltInDocumentProperties.getLastPrinted() / BuiltInDocumentProperties.setLastPrinted(java.util.Date) property is updated before saving.
setUpdateLastSavedTimeProperty(boolean value) Sets a value determining whether the BuiltInDocumentProperties.getLastSavedTime() / BuiltInDocumentProperties.setLastSavedTime(java.util.Date) property is updated before saving.
setUpdateSdtContent(boolean value) Sets value determining whether content of StructuredDocumentTag is updated before saving.
setUseAntiAliasing(boolean value) Sets a value determining whether or not to use anti-aliasing for rendering.
setUseBookFoldPrintingSettings(boolean value) Sets a boolean value indicating whether the document should be saved using a booklet printing layout, if it is specified via PageSetup.getMultiplePages() / PageSetup.setMultiplePages(int).
setUseCoreFonts(boolean value) Sets a value determining whether or not to substitute TrueType fonts Arial, Times New Roman, Courier New and Symbol with core PDF Type 1 fonts.
setUseHighQualityRendering(boolean value) Sets a value determining whether or not to use high quality (i.e.
setZoomBehavior(int value) Sets a value determining what type of zoom should be applied when a document is opened with a PDF viewer.
setZoomFactor(int value) Sets a value determining zoom factor (in percentages) for a document.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

PdfSaveOptions()

public PdfSaveOptions()

Initializes a new instance of this class that can be used to save a document in the SaveFormat.PDF format.

createSaveOptions(int saveFormat)

public static SaveOptions createSaveOptions(int saveFormat)

Parameters:

Parameter Type Description
saveFormat int

Returns: SaveOptions

createSaveOptions(String fileName)

public static SaveOptions createSaveOptions(String fileName)

Creates a save options object of a class suitable for the file extension specified in the given file name.

Parameters:

Parameter Type Description
fileName java.lang.String The extension of this file name determines the class of the save options object to create.

Returns: SaveOptions - An object of a class that derives from SaveOptions.

deepClone()

public PdfSaveOptions deepClone()

Creates a deep clone of this object.

Returns: PdfSaveOptions

equals(Object obj)

public boolean equals(Object obj)

Determines whether the specified object is equal in value to the current object.

Parameters:

Parameter Type Description
obj java.lang.Object

Returns: boolean

getAdditionalTextPositioning()

public boolean getAdditionalTextPositioning()

A flag specifying whether to write additional text positioning operators or not.

If true , additional text positioning operators are written to the output PDF. This may help to overcome issues with inaccurate text positioning with some printers. The downside is the increased PDF document size.

The default value is false .

Returns: boolean - The corresponding boolean value.

getAllowEmbeddingPostScriptFonts()

public boolean getAllowEmbeddingPostScriptFonts()

Gets a boolean value indicating whether to allow embedding fonts with PostScript outlines when embedding TrueType fonts in a document upon it is saved. The default value is false.

Note, Word does not embed PostScript fonts, but can open documents with embedded fonts of this type.

This option only works when FontInfoCollection.getEmbedTrueTypeFonts() / FontInfoCollection.setEmbedTrueTypeFonts(boolean) of the DocumentBase.getFontInfos() property is set to true .

Returns: boolean - A boolean value indicating whether to allow embedding fonts with PostScript outlines when embedding TrueType fonts in a document upon it is saved.

getCacheHeaderFooterShapes()

public boolean getCacheHeaderFooterShapes()

Gets a value determining whether or not to cache shapes placed in header and footer of document.

Default value is false and shapes are not cached.

When the value is true shapes graphics are written to the PDF document as an xObject.

Some shapes are not supported for caching(shapes with fields, bookmarks, HRefs).

Returns: boolean - A value determining whether or not to cache shapes placed in header and footer of document.

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getColorMode()

public int getColorMode()

Gets a value determining how colors are rendered. The default value is ColorMode.NORMAL.

Returns: int - A value determining how colors are rendered. The returned value is one of ColorMode constants.

getCompliance()

public int getCompliance()

Specifies the PDF standards compliance level for output documents.

Default is PdfCompliance.PDF_17.

Returns: int - The corresponding int value. The returned value is one of PdfCompliance constants.

public boolean getCreateNoteHyperlinks()

Specifies whether to convert footnote/endnote references in main text story into active hyperlinks. When clicked the hyperlink will lead to the corresponding footnote/endnote. Default is false .

Returns: boolean - The corresponding boolean value.

getCustomPropertiesExport()

public int getCustomPropertiesExport()

Gets a value determining the way Document.getCustomDocumentProperties() are exported to PDF file.

Default value is PdfCustomPropertiesExport.NONE.

PdfCustomPropertiesExport.METADATA value is not supported when saving to PDF/A. PdfCustomPropertiesExport.STANDARD will be used instead for PDF/A-1 and PDF/A-2 and PdfCustomPropertiesExport.NONE for PDF/A-4.

PdfCustomPropertiesExport.STANDARD value is not supported when saving to PDF 2.0. PdfCustomPropertiesExport.METADATA will be used instead.

Returns: int - A value determining the way Document.getCustomDocumentProperties() are exported to PDF file. The returned value is one of PdfCustomPropertiesExport constants.

getDefaultTemplate()

public String getDefaultTemplate()

Gets path to default template (including filename). Default value for this property is empty string. If specified, this path is used to load template when Document.getAutomaticallyUpdateStyles() / Document.setAutomaticallyUpdateStyles(boolean) is true, but Document.getAttachedTemplate() / Document.setAttachedTemplate(java.lang.String) is empty.

Returns: java.lang.String - Path to default template (including filename).

getDigitalSignatureDetails()

public PdfDigitalSignatureDetails getDigitalSignatureDetails()

Gets the details for signing the output PDF document.

The default value is null and the output document will not be signed. When this property is set to a valid PdfDigitalSignatureDetails object, then the output PDF document will be digitally signed.

Returns: PdfDigitalSignatureDetails - The details for signing the output PDF document.

getDisplayDocTitle()

public boolean getDisplayDocTitle()

A flag specifying whether the window\u2019s title bar should display the document title taken from the Title entry of the document information dictionary.

If false , the title bar should instead display the name of the PDF file containing the document.

This flag is required by PDF/UA compliance. true value will be used automatically when saving to PDF/UA.

The default value is false .

Returns: boolean - The corresponding boolean value.

getDml3DEffectsRenderingMode()

public int getDml3DEffectsRenderingMode()

Gets a value determining how 3D effects are rendered. The default value is Dml3DEffectsRenderingMode.BASIC.

Returns: int - A value determining how 3D effects are rendered. The returned value is one of Dml3DEffectsRenderingMode constants.

getDmlEffectsRenderingMode()

public int getDmlEffectsRenderingMode()

Gets a value determining how DrawingML effects are rendered. The default value is DmlEffectsRenderingMode.SIMPLIFIED.

This property is used when the document is exported to fixed page formats.

If getCompliance() / setCompliance(int) is set to PdfCompliance.PDF_A_1_A or PdfCompliance.PDF_A_1_B, property always returns DmlEffectsRenderingMode.NONE.

Returns: int - A value determining how DrawingML effects are rendered. The returned value is one of DmlEffectsRenderingMode constants.

getDmlRenderingMode()

public int getDmlRenderingMode()

Gets a value determining how DrawingML shapes are rendered. The default value is DmlRenderingMode.FALLBACK.

This property is used when the document is exported to fixed page formats.

Returns: int - A value determining how DrawingML shapes are rendered. The returned value is one of DmlRenderingMode constants.

getDownsampleOptions()

public DownsampleOptions getDownsampleOptions()

Allows to specify downsample options.

Returns: DownsampleOptions - The corresponding DownsampleOptions value.

getEmbedFullFonts()

public boolean getEmbedFullFonts()

Controls how fonts are embedded into the resulting PDF documents.

The default value is false , which means the fonts are subsetted before embedding. Subsetting is useful if you want to keep the output file size smaller. Subsetting removes all unused glyphs from a font.

When this value is set to true , a complete font file is embedded into PDF without subsetting. This will result in larger output files, but can be a useful option when you want to edit the resulting PDF later (e.g. add more text).

Some fonts are large (several megabytes) and embedding them without subsetting will result in large output documents.

Returns: boolean - The corresponding boolean value.

getEncryptionDetails()

public PdfEncryptionDetails getEncryptionDetails()

Gets the details for encrypting the output PDF document.

The default value is null and the output document will not be encrypted. When this property is set to a valid PdfEncryptionDetails object, then the output PDF document will be encrypted.

AES-128 encryption algorithm is used when saving to PDF 1.7 based compliance (including PDF/UA-1). AES-256 encryption algorithm is used when saving to PDF 2.0 based compliance.

Encryption is prohibited by PDF/A compliance. This option will be ignored when saving to PDF/A.

PdfPermissions.CONTENT_COPY_FOR_ACCESSIBILITY permission is required by PDF/UA compliance if the output document is encrypted. This permission will automatically used when saving to PDF/UA.

PdfPermissions.CONTENT_COPY_FOR_ACCESSIBILITY permission is deprecated in PDF 2.0 format. This permission will be ignored when saving to PDF 2.0.

Returns: PdfEncryptionDetails - The details for encrypting the output PDF document.

getExportDocumentStructure()

public boolean getExportDocumentStructure()

Gets a value determining whether or not to export document structure.

This value is ignored when saving to PDF/A-1a, PDF/A-2a and PDF/UA-1 because document structure is required for this compliance.

Note that exporting the document structure significantly increases the memory consumption, especially for the large documents.

Returns: boolean - A value determining whether or not to export document structure.

getExportGeneratorName()

public boolean getExportGeneratorName()

When true, causes the name and version of Aspose.Words to be embedded into produced files. Default value is true.

Returns: boolean - The corresponding boolean value.

getExportLanguageToSpanTag()

public boolean getExportLanguageToSpanTag()

Gets a value determining whether or not to create a “Span” tag in the document structure to export the text language.

Default value is false and “Lang” attribute is attached to a marked-content sequence in a page content stream.

When the value is true “Span” tag is created for the text with non-default language and “Lang” attribute is attached to this tag.

This value is ignored when getExportDocumentStructure() / setExportDocumentStructure(boolean) is false .

Returns: boolean - A value determining whether or not to create a “Span” tag in the document structure to export the text language.

getFontEmbeddingMode()

public int getFontEmbeddingMode()

Specifies the font embedding mode.

The default value is PdfFontEmbeddingMode.EMBED_ALL.

This setting works only for the text in ANSI (Windows-1252) encoding. If the document contains non-ANSI text then corresponding fonts will be embedded regardless of this setting.

PDF/A and PDF/UA compliance requires all fonts to be embedded. PdfFontEmbeddingMode.EMBED_ALL value will be used automatically when saving to PDF/A and PDF/UA.

Returns: int - The corresponding int value. The returned value is one of PdfFontEmbeddingMode constants.

getHeaderFooterBookmarksExportMode()

public int getHeaderFooterBookmarksExportMode()

Determines how bookmarks in headers/footers are exported.

The default value is HeaderFooterBookmarksExportMode.ALL.

This property is used in conjunction with the getOutlineOptions() option.

Returns: int - The corresponding int value. The returned value is one of HeaderFooterBookmarksExportMode constants.

getImageColorSpaceExportMode()

public int getImageColorSpaceExportMode()

Specifies how the color space will be selected for the images in PDF document.

The default value is PdfImageColorSpaceExportMode.AUTO.

If PdfImageColorSpaceExportMode.SIMPLE_CMYK value is specified, getImageCompression() / setImageCompression(int) option is ignored and Flate compression is used for all images in the document.

PdfImageColorSpaceExportMode.SIMPLE_CMYK value is not supported when saving to PDF/A. PdfImageColorSpaceExportMode.AUTO value will be used instead.

Returns: int - The corresponding int value. The returned value is one of PdfImageColorSpaceExportMode constants.

getImageCompression()

public int getImageCompression()

Specifies compression type to be used for all images in the document.

Default is PdfImageCompression.AUTO.

Using PdfImageCompression.JPEG lets you control the quality of images in the output document through the getJpegQuality() / setJpegQuality(int) property.

Using PdfImageCompression.JPEG provides the fastest conversion speed when compared to the performance of other compression types, but in this case, there is lossy JPEG compression.

Using PdfImageCompression.AUTO lets to control the quality of Jpeg in the output document through the getJpegQuality() / setJpegQuality(int) property, but for other formats, raw pixel data is extracted and saved with Flate compression. This case is slower than Jpeg conversion but lossless.

Returns: int - The corresponding int value. The returned value is one of PdfImageCompression constants.

getImlRenderingMode()

public int getImlRenderingMode()

Gets a value determining how ink (InkML) objects are rendered. The default value is ImlRenderingMode.INK_ML.

This property is used when the document is exported to fixed page formats.

Returns: int - A value determining how ink (InkML) objects are rendered. The returned value is one of ImlRenderingMode constants.

getInterpolateImages()

public boolean getInterpolateImages()

A flag indicating whether image interpolation shall be performed by a conforming reader. When false is specified, the flag is not written to the output document and the default behaviour of reader is used instead.

When the resolution of a source image is significantly lower than that of the output device, each source sample covers many device pixels. As a result, images can appear jaggy or blocky. These visual artifacts can be reduced by applying an image interpolation algorithm during rendering. Instead of painting all pixels covered by a source sample with the same color, image interpolation attempts to produce a smooth transition between adjacent sample values.

A conforming Reader may choose to not implement this feature of PDF, or may use any specific implementation of interpolation that it wishes.

The default value is false .

Interpolation flag is prohibited by PDF/A compliance. false value will be used automatically when saving to PDF/A.

Returns: boolean - The corresponding boolean value.

getJpegQuality()

public int getJpegQuality()

Gets a value determining the quality of the JPEG images inside PDF document.

The default value is 100.

This property is used in conjunction with the getImageCompression() / setImageCompression(int) option.

Has effect only when a document contains JPEG images.

Use this property to get or set the quality of the images inside a document when saving in PDF format. The value may vary from 0 to 100 where 0 means worst quality but maximum compression and 100 means best quality but minimum compression. If quality is 100 and source image is JPEG, it means no compression - original bytes will be saved.

Returns: int - A value determining the quality of the JPEG images inside PDF document.

getMemoryOptimization()

public boolean getMemoryOptimization()

Gets value determining if memory optimization should be performed before saving the document. Default value for this property is false. Setting this option to true can significantly decrease memory consumption while saving large documents at the cost of slower saving time.

Returns: boolean - Value determining if memory optimization should be performed before saving the document.

getMetafileRenderingOptions()

public MetafileRenderingOptions getMetafileRenderingOptions()

Allows to specify metafile rendering options.

Returns: MetafileRenderingOptions - The corresponding MetafileRenderingOptions value.

getNumeralFormat()

public int getNumeralFormat()

Gets NumeralFormat used for rendering of numerals. European numerals are used by default. If the value of this property is changed and page layout is already built then Document.updatePageLayout() is invoked automatically to update any changes.

Returns: int - {NumeralFormat used for rendering of numerals. The returned value is one of NumeralFormat constants.

getOpenHyperlinksInNewWindow()

public boolean getOpenHyperlinksInNewWindow()

Gets a value determining whether hyperlinks in the output Pdf document are forced to be opened in a new window (or tab) of a browser.

The default value is false . When this value is set to true hyperlinks are saved using JavaScript code. JavaScript code is app.launchURL(“URL”, true); , where URL is a hyperlink.

Note that if this option is set to true hyperlinks can’t work in some PDF readers e.g. Chrome, Firefox.

JavaScript actions are prohibited by PDF/A-1 and PDF/A-2 compliance. false will be used automatically when saving to PDF/A-1 and PDF/A-2.

Returns: boolean - A value determining whether hyperlinks in the output Pdf document are forced to be opened in a new window (or tab) of a browser.

getOptimizeOutput()

public boolean getOptimizeOutput()

Flag indicates whether it is required to optimize output. If this flag is set redundant nested canvases and empty canvases are removed, also neighbor glyphs with the same formatting are concatenated. Note: The accuracy of the content display may be affected if this property is set to true. Default is false.

Returns: boolean - The corresponding boolean value.

getOutlineOptions()

public OutlineOptions getOutlineOptions()

Allows to specify outline options.

Outlines can be created from headings and bookmarks.

For headings outline level is determined by the heading level.

It is possible to set the max heading level to be included into outlines or disable heading outlines at all.

For bookmarks outline level may be set in options as a default value for all bookmarks or as individual values for particular bookmarks.

Also, outlines can be exported to XPS format by using the same getOutlineOptions() class.

Returns: OutlineOptions - The corresponding OutlineOptions value.

getPageMode()

public int getPageMode()

Specifies how the PDF document should be displayed when opened in the PDF reader. The default value is PdfPageMode.USE_OUTLINES.

Returns: int - The corresponding int value. The returned value is one of PdfPageMode constants.

getPageSavingCallback()

public IPageSavingCallback getPageSavingCallback()

Allows to control how separate pages are saved when a document is exported to fixed page format.

Returns: IPageSavingCallback - The corresponding IPageSavingCallback value.

getPageSet()

public PageSet getPageSet()

Gets the pages to render. Default is all the pages in the document.

Returns: PageSet - The pages to render.

getPreblendImages()

public boolean getPreblendImages()

Gets a value determining whether or not to preblend transparent images with black background color.

Preblending images may improve PDF document visual appearance in Adobe Reader and remove anti-aliasing artifacts.

In order to properly display preblended images, PDF viewer application must support /Matte entry in soft-mask image dictionary. Also preblending images may decrease PDF rendering performance.

The default value is false .

Returns: boolean - A value determining whether or not to preblend transparent images with black background color.

getPreserveFormFields()

public boolean getPreserveFormFields()

Specifies whether to preserve Microsoft Word form fields as form fields in PDF or convert them to text. Default is false .

Microsoft Word form fields include text input, drop down and check box controls.

When set to false , these fields will be exported as text to PDF. When set to true , these fields will be exported as PDF form fields.

When exporting form fields to PDF as form fields, some formatting loss might occur because PDF form fields do not support all features of Microsoft Word form fields.

Also, the output size depends on the content size because editable forms in Microsoft Word are inline objects.

Editable forms are prohibited by PDF/A compliance. false value will be used automatically when saving to PDF/A.

Form fields are not supported when saving to PDF/UA. false value will be used automatically.

Returns: boolean - The corresponding boolean value.

getPrettyFormat()

public boolean getPrettyFormat()

When true , pretty formats output where applicable. Default value is false.

Set to true to make HTML, MHTML, EPUB, WordML, RTF, DOCX and ODT output human readable. Useful for testing or debugging.

Returns: boolean - The corresponding boolean value.

getProgressCallback()

public IDocumentSavingCallback getProgressCallback()

Called during saving a document and accepts data about saving progress.

Progress is reported when saving to SaveFormat.DOCX, SaveFormat.FLAT_OPC, SaveFormat.DOCM, SaveFormat.DOTM, SaveFormat.DOTX, SaveFormat.HTML, SaveFormat.MHTML, SaveFormat.EPUB, SaveFormat.XAML_FLOW, or SaveFormat.XAML_FLOW_PACK.

Returns: IDocumentSavingCallback - The corresponding IDocumentSavingCallback value.

getSaveFormat()

public int getSaveFormat()

Specifies the format in which the document will be saved if this save options object is used. Can only be SaveFormat.PDF.

Returns: int - The corresponding int value. The returned value is one of SaveFormat constants.

getTempFolder()

public String getTempFolder()

Specifies the folder for temporary files used when saving to a DOC or DOCX file. By default this property is null and no temporary files are used.

When Aspose.Words saves a document, it needs to create temporary internal structures. By default, these internal structures are created in memory and the memory usage spikes for a short period while the document is being saved. When saving is complete, the memory is freed and reclaimed by the garbage collector.

If you are saving a very large document (thousands of pages) and/or processing many documents at the same time, then the memory spike during saving can be significant enough to cause the system to throw java.lang.IndexOutOfBoundsException. Specifying a temporary folder using getTempFolder() / setTempFolder(java.lang.String) will cause Aspose.Words to keep the internal structures in temporary files instead of memory. It reduces the memory usage during saving, but will decrease the save performance.

The folder must exist and be writable, otherwise an exception will be thrown.

Aspose.Words automatically deletes all temporary files when saving is complete.

Returns: java.lang.String - The corresponding java.lang.String value.

getTextCompression()

public int getTextCompression()

Specifies compression type to be used for all textual content in the document.

Default is PdfTextCompression.FLATE.

Significantly increases output size when saving a document without compression.

Returns: int - The corresponding int value. The returned value is one of PdfTextCompression constants.

getUpdateCreatedTimeProperty()

public boolean getUpdateCreatedTimeProperty()

Gets a value determining whether the BuiltInDocumentProperties.getCreatedTime() / BuiltInDocumentProperties.setCreatedTime(java.util.Date) property is updated before saving. Default value is false;

Returns: boolean - A value determining whether the BuiltInDocumentProperties.getCreatedTime() / BuiltInDocumentProperties.setCreatedTime(java.util.Date) property is updated before saving.

getUpdateFields()

public boolean getUpdateFields()

Gets a value determining if fields of certain types should be updated before saving the document to a fixed page format. Default value for this property is true. Allows to specify whether to mimic or not MS Word behavior.

Returns: boolean - A value determining if fields of certain types should be updated before saving the document to a fixed page format.

getUpdateLastPrintedProperty()

public boolean getUpdateLastPrintedProperty()

Gets a value determining whether the BuiltInDocumentProperties.getLastPrinted() / BuiltInDocumentProperties.setLastPrinted(java.util.Date) property is updated before saving.

Returns: boolean - A value determining whether the BuiltInDocumentProperties.getLastPrinted() / BuiltInDocumentProperties.setLastPrinted(java.util.Date) property is updated before saving.

getUpdateLastSavedTimeProperty()

public boolean getUpdateLastSavedTimeProperty()

Gets a value determining whether the BuiltInDocumentProperties.getLastSavedTime() / BuiltInDocumentProperties.setLastSavedTime(java.util.Date) property is updated before saving.

Returns: boolean - A value determining whether the BuiltInDocumentProperties.getLastSavedTime() / BuiltInDocumentProperties.setLastSavedTime(java.util.Date) property is updated before saving.

getUpdateSdtContent()

public boolean getUpdateSdtContent()

Gets value determining whether content of StructuredDocumentTag is updated before saving. The default value is false .

Returns: boolean - Value determining whether content of StructuredDocumentTag is updated before saving.

getUseAntiAliasing()

public boolean getUseAntiAliasing()

Gets a value determining whether or not to use anti-aliasing for rendering.

The default value is false . When this value is set to true anti-aliasing is used for rendering.

This property is used when the document is exported to the following formats: SaveFormat.TIFF, SaveFormat.PNG, SaveFormat.BMP, SaveFormat.JPEG, SaveFormat.EMF. When the document is exported to the SaveFormat.HTML, SaveFormat.MHTML, SaveFormat.EPUB and SaveFormat.AZW_3 formats this option is used for raster images.

Returns: boolean - A value determining whether or not to use anti-aliasing for rendering.

getUseBookFoldPrintingSettings()

public boolean getUseBookFoldPrintingSettings()

Gets a boolean value indicating whether the document should be saved using a booklet printing layout, if it is specified via PageSetup.getMultiplePages() / PageSetup.setMultiplePages(int).

If this option is specified, FixedPageSaveOptions.getPageSet() / FixedPageSaveOptions.setPageSet(com.aspose.words.PageSet) is ignored when saving. This behavior matches MS Word. If book fold printing settings are not specified in page setup, this option will have no effect.

Returns: boolean - A boolean value indicating whether the document should be saved using a booklet printing layout, if it is specified via PageSetup.getMultiplePages() / PageSetup.setMultiplePages(int).

getUseCoreFonts()

public boolean getUseCoreFonts()

Gets a value determining whether or not to substitute TrueType fonts Arial, Times New Roman, Courier New and Symbol with core PDF Type 1 fonts.

The default value is false . When this value is set to true Arial, Times New Roman, Courier New and Symbol fonts are replaced in PDF document with corresponding core Type 1 font.

Core PDF fonts, or their font metrics and suitable substitution fonts, are required to be available to any PDF viewer application.

This setting works only for the text in ANSI (Windows-1252) encoding. Non-ANSI text will be written with embedded TrueType font regardless of this setting.

PDF/A and PDF/UA compliance requires all fonts to be embedded. false value will be used automatically when saving to PDF/A and PDF/UA.

Core fonts are not supported when saving to PDF 2.0 format. false value will be used automatically when saving to PDF 2.0.

This option has a higher priority then getFontEmbeddingMode() / setFontEmbeddingMode(int) option.

Returns: boolean - A value determining whether or not to substitute TrueType fonts Arial, Times New Roman, Courier New and Symbol with core PDF Type 1 fonts.

getUseHighQualityRendering()

public boolean getUseHighQualityRendering()

Gets a value determining whether or not to use high quality (i.e. slow) rendering algorithms. The default value is false .

This property is used when the document is exported to image formats: SaveFormat.TIFF, SaveFormat.PNG, SaveFormat.BMP, SaveFormat.JPEG, SaveFormat.EMF.

Returns: boolean - A value determining whether or not to use high quality (i.e.

getZoomBehavior()

public int getZoomBehavior()

Gets a value determining what type of zoom should be applied when a document is opened with a PDF viewer. The default value is PdfZoomBehavior.NONE, i.e. no fit is applied.

Returns: int - A value determining what type of zoom should be applied when a document is opened with a PDF viewer. The returned value is one of PdfZoomBehavior constants.

getZoomFactor()

public int getZoomFactor()

Gets a value determining zoom factor (in percentages) for a document. This value is used only if getZoomBehavior() / setZoomBehavior(int) is set to PdfZoomBehavior.ZOOM_FACTOR.

Returns: int - A value determining zoom factor (in percentages) for a document.

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setAdditionalTextPositioning(boolean value)

public void setAdditionalTextPositioning(boolean value)

A flag specifying whether to write additional text positioning operators or not.

If true , additional text positioning operators are written to the output PDF. This may help to overcome issues with inaccurate text positioning with some printers. The downside is the increased PDF document size.

The default value is false .

Parameters:

Parameter Type Description
value boolean The corresponding boolean value.

setAllowEmbeddingPostScriptFonts(boolean value)

public void setAllowEmbeddingPostScriptFonts(boolean value)

Sets a boolean value indicating whether to allow embedding fonts with PostScript outlines when embedding TrueType fonts in a document upon it is saved. The default value is false.

Note, Word does not embed PostScript fonts, but can open documents with embedded fonts of this type.

This option only works when FontInfoCollection.getEmbedTrueTypeFonts() / FontInfoCollection.setEmbedTrueTypeFonts(boolean) of the DocumentBase.getFontInfos() property is set to true .

Parameters:

Parameter Type Description
value boolean A boolean value indicating whether to allow embedding fonts with PostScript outlines when embedding TrueType fonts in a document upon it is saved.

setCacheHeaderFooterShapes(boolean value)

public void setCacheHeaderFooterShapes(boolean value)

Sets a value determining whether or not to cache shapes placed in header and footer of document.

Default value is false and shapes are not cached.

When the value is true shapes graphics are written to the PDF document as an xObject.

Some shapes are not supported for caching(shapes with fields, bookmarks, HRefs).

Parameters:

Parameter Type Description
value boolean A value determining whether or not to cache shapes placed in header and footer of document.

setColorMode(int value)

public void setColorMode(int value)

Sets a value determining how colors are rendered. The default value is ColorMode.NORMAL.

Parameters:

Parameter Type Description
value int A value determining how colors are rendered. The value must be one of ColorMode constants.

setCompliance(int value)

public void setCompliance(int value)

Specifies the PDF standards compliance level for output documents.

Default is PdfCompliance.PDF_17.

Parameters:

Parameter Type Description
value int The corresponding int value. The value must be one of PdfCompliance constants.
public void setCreateNoteHyperlinks(boolean value)

Specifies whether to convert footnote/endnote references in main text story into active hyperlinks. When clicked the hyperlink will lead to the corresponding footnote/endnote. Default is false .

Parameters:

Parameter Type Description
value boolean The corresponding boolean value.

setCustomPropertiesExport(int value)

public void setCustomPropertiesExport(int value)

Sets a value determining the way Document.getCustomDocumentProperties() are exported to PDF file.

Default value is PdfCustomPropertiesExport.NONE.

PdfCustomPropertiesExport.METADATA value is not supported when saving to PDF/A. PdfCustomPropertiesExport.STANDARD will be used instead for PDF/A-1 and PDF/A-2 and PdfCustomPropertiesExport.NONE for PDF/A-4.

PdfCustomPropertiesExport.STANDARD value is not supported when saving to PDF 2.0. PdfCustomPropertiesExport.METADATA will be used instead.

Parameters:

Parameter Type Description
value int A value determining the way Document.getCustomDocumentProperties() are exported to PDF file. The value must be one of PdfCustomPropertiesExport constants.

setDefaultTemplate(String value)

public void setDefaultTemplate(String value)

Sets path to default template (including filename). Default value for this property is empty string. If specified, this path is used to load template when Document.getAutomaticallyUpdateStyles() / Document.setAutomaticallyUpdateStyles(boolean) is true, but Document.getAttachedTemplate() / Document.setAttachedTemplate(java.lang.String) is empty.

Parameters:

Parameter Type Description
value java.lang.String Path to default template (including filename).

setDigitalSignatureDetails(PdfDigitalSignatureDetails value)

public void setDigitalSignatureDetails(PdfDigitalSignatureDetails value)

Sets the details for signing the output PDF document.

The default value is null and the output document will not be signed. When this property is set to a valid PdfDigitalSignatureDetails object, then the output PDF document will be digitally signed.

Parameters:

Parameter Type Description
value PdfDigitalSignatureDetails The details for signing the output PDF document.

setDisplayDocTitle(boolean value)

public void setDisplayDocTitle(boolean value)

A flag specifying whether the window\u2019s title bar should display the document title taken from the Title entry of the document information dictionary.

If false , the title bar should instead display the name of the PDF file containing the document.

This flag is required by PDF/UA compliance. true value will be used automatically when saving to PDF/UA.

The default value is false .

Parameters:

Parameter Type Description
value boolean The corresponding boolean value.

setDml3DEffectsRenderingMode(int value)

public void setDml3DEffectsRenderingMode(int value)

Sets a value determining how 3D effects are rendered. The default value is Dml3DEffectsRenderingMode.BASIC.

Parameters:

Parameter Type Description
value int A value determining how 3D effects are rendered. The value must be one of Dml3DEffectsRenderingMode constants.

setDmlEffectsRenderingMode(int value)

public void setDmlEffectsRenderingMode(int value)

Sets a value determining how DrawingML effects are rendered. The default value is DmlEffectsRenderingMode.SIMPLIFIED.

This property is used when the document is exported to fixed page formats.

If getCompliance() / setCompliance(int) is set to PdfCompliance.PDF_A_1_A or PdfCompliance.PDF_A_1_B, property always returns DmlEffectsRenderingMode.NONE.

Parameters:

Parameter Type Description
value int A value determining how DrawingML effects are rendered. The value must be one of DmlEffectsRenderingMode constants.

setDmlRenderingMode(int value)

public void setDmlRenderingMode(int value)

Sets a value determining how DrawingML shapes are rendered. The default value is DmlRenderingMode.FALLBACK.

This property is used when the document is exported to fixed page formats.

Parameters:

Parameter Type Description
value int A value determining how DrawingML shapes are rendered. The value must be one of DmlRenderingMode constants.

setDownsampleOptions(DownsampleOptions value)

public void setDownsampleOptions(DownsampleOptions value)

Allows to specify downsample options.

Parameters:

Parameter Type Description
value DownsampleOptions The corresponding DownsampleOptions value.

setEmbedFullFonts(boolean value)

public void setEmbedFullFonts(boolean value)

Controls how fonts are embedded into the resulting PDF documents.

The default value is false , which means the fonts are subsetted before embedding. Subsetting is useful if you want to keep the output file size smaller. Subsetting removes all unused glyphs from a font.

When this value is set to true , a complete font file is embedded into PDF without subsetting. This will result in larger output files, but can be a useful option when you want to edit the resulting PDF later (e.g. add more text).

Some fonts are large (several megabytes) and embedding them without subsetting will result in large output documents.

Parameters:

Parameter Type Description
value boolean The corresponding boolean value.

setEncryptionDetails(PdfEncryptionDetails value)

public void setEncryptionDetails(PdfEncryptionDetails value)

Sets the details for encrypting the output PDF document.

The default value is null and the output document will not be encrypted. When this property is set to a valid PdfEncryptionDetails object, then the output PDF document will be encrypted.

AES-128 encryption algorithm is used when saving to PDF 1.7 based compliance (including PDF/UA-1). AES-256 encryption algorithm is used when saving to PDF 2.0 based compliance.

Encryption is prohibited by PDF/A compliance. This option will be ignored when saving to PDF/A.

PdfPermissions.CONTENT_COPY_FOR_ACCESSIBILITY permission is required by PDF/UA compliance if the output document is encrypted. This permission will automatically used when saving to PDF/UA.

PdfPermissions.CONTENT_COPY_FOR_ACCESSIBILITY permission is deprecated in PDF 2.0 format. This permission will be ignored when saving to PDF 2.0.

Parameters:

Parameter Type Description
value PdfEncryptionDetails The details for encrypting the output PDF document.

setExportDocumentStructure(boolean value)

public void setExportDocumentStructure(boolean value)

Sets a value determining whether or not to export document structure.

This value is ignored when saving to PDF/A-1a, PDF/A-2a and PDF/UA-1 because document structure is required for this compliance.

Note that exporting the document structure significantly increases the memory consumption, especially for the large documents.

Parameters:

Parameter Type Description
value boolean A value determining whether or not to export document structure.

setExportGeneratorName(boolean value)

public void setExportGeneratorName(boolean value)

When true, causes the name and version of Aspose.Words to be embedded into produced files. Default value is true.

Parameters:

Parameter Type Description
value boolean The corresponding boolean value.

setExportLanguageToSpanTag(boolean value)

public void setExportLanguageToSpanTag(boolean value)

Sets a value determining whether or not to create a “Span” tag in the document structure to export the text language.

Default value is false and “Lang” attribute is attached to a marked-content sequence in a page content stream.

When the value is true “Span” tag is created for the text with non-default language and “Lang” attribute is attached to this tag.

This value is ignored when getExportDocumentStructure() / setExportDocumentStructure(boolean) is false .

Parameters:

Parameter Type Description
value boolean A value determining whether or not to create a “Span” tag in the document structure to export the text language.

setFontEmbeddingMode(int value)

public void setFontEmbeddingMode(int value)

Specifies the font embedding mode.

The default value is PdfFontEmbeddingMode.EMBED_ALL.

This setting works only for the text in ANSI (Windows-1252) encoding. If the document contains non-ANSI text then corresponding fonts will be embedded regardless of this setting.

PDF/A and PDF/UA compliance requires all fonts to be embedded. PdfFontEmbeddingMode.EMBED_ALL value will be used automatically when saving to PDF/A and PDF/UA.

Parameters:

Parameter Type Description
value int The corresponding int value. The value must be one of PdfFontEmbeddingMode constants.

setHeaderFooterBookmarksExportMode(int value)

public void setHeaderFooterBookmarksExportMode(int value)

Determines how bookmarks in headers/footers are exported.

The default value is HeaderFooterBookmarksExportMode.ALL.

This property is used in conjunction with the getOutlineOptions() option.

Parameters:

Parameter Type Description
value int The corresponding int value. The value must be one of HeaderFooterBookmarksExportMode constants.

setImageColorSpaceExportMode(int value)

public void setImageColorSpaceExportMode(int value)

Specifies how the color space will be selected for the images in PDF document.

The default value is PdfImageColorSpaceExportMode.AUTO.

If PdfImageColorSpaceExportMode.SIMPLE_CMYK value is specified, getImageCompression() / setImageCompression(int) option is ignored and Flate compression is used for all images in the document.

PdfImageColorSpaceExportMode.SIMPLE_CMYK value is not supported when saving to PDF/A. PdfImageColorSpaceExportMode.AUTO value will be used instead.

Parameters:

Parameter Type Description
value int The corresponding int value. The value must be one of PdfImageColorSpaceExportMode constants.

setImageCompression(int value)

public void setImageCompression(int value)

Specifies compression type to be used for all images in the document.

Default is PdfImageCompression.AUTO.

Using PdfImageCompression.JPEG lets you control the quality of images in the output document through the getJpegQuality() / setJpegQuality(int) property.

Using PdfImageCompression.JPEG provides the fastest conversion speed when compared to the performance of other compression types, but in this case, there is lossy JPEG compression.

Using PdfImageCompression.AUTO lets to control the quality of Jpeg in the output document through the getJpegQuality() / setJpegQuality(int) property, but for other formats, raw pixel data is extracted and saved with Flate compression. This case is slower than Jpeg conversion but lossless.

Parameters:

Parameter Type Description
value int The corresponding int value. The value must be one of PdfImageCompression constants.

setImlRenderingMode(int value)

public void setImlRenderingMode(int value)

Sets a value determining how ink (InkML) objects are rendered. The default value is ImlRenderingMode.INK_ML.

This property is used when the document is exported to fixed page formats.

Parameters:

Parameter Type Description
value int A value determining how ink (InkML) objects are rendered. The value must be one of ImlRenderingMode constants.

setInterpolateImages(boolean value)

public void setInterpolateImages(boolean value)

A flag indicating whether image interpolation shall be performed by a conforming reader. When false is specified, the flag is not written to the output document and the default behaviour of reader is used instead.

When the resolution of a source image is significantly lower than that of the output device, each source sample covers many device pixels. As a result, images can appear jaggy or blocky. These visual artifacts can be reduced by applying an image interpolation algorithm during rendering. Instead of painting all pixels covered by a source sample with the same color, image interpolation attempts to produce a smooth transition between adjacent sample values.

A conforming Reader may choose to not implement this feature of PDF, or may use any specific implementation of interpolation that it wishes.

The default value is false .

Interpolation flag is prohibited by PDF/A compliance. false value will be used automatically when saving to PDF/A.

Parameters:

Parameter Type Description
value boolean The corresponding boolean value.

setJpegQuality(int value)

public void setJpegQuality(int value)

Sets a value determining the quality of the JPEG images inside PDF document.

The default value is 100.

This property is used in conjunction with the getImageCompression() / setImageCompression(int) option.

Has effect only when a document contains JPEG images.

Use this property to get or set the quality of the images inside a document when saving in PDF format. The value may vary from 0 to 100 where 0 means worst quality but maximum compression and 100 means best quality but minimum compression. If quality is 100 and source image is JPEG, it means no compression - original bytes will be saved.

Parameters:

Parameter Type Description
value int A value determining the quality of the JPEG images inside PDF document.

setMemoryOptimization(boolean value)

public void setMemoryOptimization(boolean value)

Sets value determining if memory optimization should be performed before saving the document. Default value for this property is false. Setting this option to true can significantly decrease memory consumption while saving large documents at the cost of slower saving time.

Parameters:

Parameter Type Description
value boolean Value determining if memory optimization should be performed before saving the document.

setMetafileRenderingOptions(MetafileRenderingOptions value)

public void setMetafileRenderingOptions(MetafileRenderingOptions value)

Allows to specify metafile rendering options.

Parameters:

Parameter Type Description
value MetafileRenderingOptions The corresponding MetafileRenderingOptions value.

setNumeralFormat(int value)

public void setNumeralFormat(int value)

Sets NumeralFormat used for rendering of numerals. European numerals are used by default. If the value of this property is changed and page layout is already built then Document.updatePageLayout() is invoked automatically to update any changes.

Parameters:

Parameter Type Description
value int {NumeralFormat used for rendering of numerals. The value must be one of NumeralFormat constants.

setOpenHyperlinksInNewWindow(boolean value)

public void setOpenHyperlinksInNewWindow(boolean value)

Sets a value determining whether hyperlinks in the output Pdf document are forced to be opened in a new window (or tab) of a browser.

The default value is false . When this value is set to true hyperlinks are saved using JavaScript code. JavaScript code is app.launchURL(“URL”, true); , where URL is a hyperlink.

Note that if this option is set to true hyperlinks can’t work in some PDF readers e.g. Chrome, Firefox.

JavaScript actions are prohibited by PDF/A-1 and PDF/A-2 compliance. false will be used automatically when saving to PDF/A-1 and PDF/A-2.

Parameters:

Parameter Type Description
value boolean A value determining whether hyperlinks in the output Pdf document are forced to be opened in a new window (or tab) of a browser.

setOptimizeOutput(boolean value)

public void setOptimizeOutput(boolean value)

Flag indicates whether it is required to optimize output. If this flag is set redundant nested canvases and empty canvases are removed, also neighbor glyphs with the same formatting are concatenated. Note: The accuracy of the content display may be affected if this property is set to true. Default is false.

Parameters:

Parameter Type Description
value boolean The corresponding boolean value.

setPageMode(int value)

public void setPageMode(int value)

Specifies how the PDF document should be displayed when opened in the PDF reader. The default value is PdfPageMode.USE_OUTLINES.

Parameters:

Parameter Type Description
value int The corresponding int value. The value must be one of PdfPageMode constants.

setPageSavingCallback(IPageSavingCallback value)

public void setPageSavingCallback(IPageSavingCallback value)

Allows to control how separate pages are saved when a document is exported to fixed page format.

Parameters:

Parameter Type Description
value IPageSavingCallback The corresponding IPageSavingCallback value.

setPageSet(PageSet value)

public void setPageSet(PageSet value)

Sets the pages to render. Default is all the pages in the document.

Parameters:

Parameter Type Description
value PageSet The pages to render.

setPreblendImages(boolean value)

public void setPreblendImages(boolean value)

Sets a value determining whether or not to preblend transparent images with black background color.

Preblending images may improve PDF document visual appearance in Adobe Reader and remove anti-aliasing artifacts.

In order to properly display preblended images, PDF viewer application must support /Matte entry in soft-mask image dictionary. Also preblending images may decrease PDF rendering performance.

The default value is false .

Parameters:

Parameter Type Description
value boolean A value determining whether or not to preblend transparent images with black background color.

setPreserveFormFields(boolean value)

public void setPreserveFormFields(boolean value)

Specifies whether to preserve Microsoft Word form fields as form fields in PDF or convert them to text. Default is false .

Microsoft Word form fields include text input, drop down and check box controls.

When set to false , these fields will be exported as text to PDF. When set to true , these fields will be exported as PDF form fields.

When exporting form fields to PDF as form fields, some formatting loss might occur because PDF form fields do not support all features of Microsoft Word form fields.

Also, the output size depends on the content size because editable forms in Microsoft Word are inline objects.

Editable forms are prohibited by PDF/A compliance. false value will be used automatically when saving to PDF/A.

Form fields are not supported when saving to PDF/UA. false value will be used automatically.

Parameters:

Parameter Type Description
value boolean The corresponding boolean value.

setPrettyFormat(boolean value)

public void setPrettyFormat(boolean value)

When true , pretty formats output where applicable. Default value is false.

Set to true to make HTML, MHTML, EPUB, WordML, RTF, DOCX and ODT output human readable. Useful for testing or debugging.

Parameters:

Parameter Type Description
value boolean The corresponding boolean value.

setProgressCallback(IDocumentSavingCallback value)

public void setProgressCallback(IDocumentSavingCallback value)

Called during saving a document and accepts data about saving progress.

Progress is reported when saving to SaveFormat.DOCX, SaveFormat.FLAT_OPC, SaveFormat.DOCM, SaveFormat.DOTM, SaveFormat.DOTX, SaveFormat.HTML, SaveFormat.MHTML, SaveFormat.EPUB, SaveFormat.XAML_FLOW, or SaveFormat.XAML_FLOW_PACK.

Parameters:

Parameter Type Description
value IDocumentSavingCallback The corresponding IDocumentSavingCallback value.

setSaveFormat(int value)

public void setSaveFormat(int value)

Specifies the format in which the document will be saved if this save options object is used. Can only be SaveFormat.PDF.

Parameters:

Parameter Type Description
value int The corresponding int value. The value must be one of SaveFormat constants.

setTempFolder(String value)

public void setTempFolder(String value)

Specifies the folder for temporary files used when saving to a DOC or DOCX file. By default this property is null and no temporary files are used.

When Aspose.Words saves a document, it needs to create temporary internal structures. By default, these internal structures are created in memory and the memory usage spikes for a short period while the document is being saved. When saving is complete, the memory is freed and reclaimed by the garbage collector.

If you are saving a very large document (thousands of pages) and/or processing many documents at the same time, then the memory spike during saving can be significant enough to cause the system to throw java.lang.IndexOutOfBoundsException. Specifying a temporary folder using getTempFolder() / setTempFolder(java.lang.String) will cause Aspose.Words to keep the internal structures in temporary files instead of memory. It reduces the memory usage during saving, but will decrease the save performance.

The folder must exist and be writable, otherwise an exception will be thrown.

Aspose.Words automatically deletes all temporary files when saving is complete.

Parameters:

Parameter Type Description
value java.lang.String The corresponding java.lang.String value.

setTextCompression(int value)

public void setTextCompression(int value)

Specifies compression type to be used for all textual content in the document.

Default is PdfTextCompression.FLATE.

Significantly increases output size when saving a document without compression.

Parameters:

Parameter Type Description
value int The corresponding int value. The value must be one of PdfTextCompression constants.

setUpdateCreatedTimeProperty(boolean value)

public void setUpdateCreatedTimeProperty(boolean value)

Sets a value determining whether the BuiltInDocumentProperties.getCreatedTime() / BuiltInDocumentProperties.setCreatedTime(java.util.Date) property is updated before saving. Default value is false;

Parameters:

Parameter Type Description
value boolean A value determining whether the BuiltInDocumentProperties.getCreatedTime() / BuiltInDocumentProperties.setCreatedTime(java.util.Date) property is updated before saving.

setUpdateFields(boolean value)

public void setUpdateFields(boolean value)

Sets a value determining if fields of certain types should be updated before saving the document to a fixed page format. Default value for this property is true. Allows to specify whether to mimic or not MS Word behavior.

Parameters:

Parameter Type Description
value boolean A value determining if fields of certain types should be updated before saving the document to a fixed page format.

setUpdateLastPrintedProperty(boolean value)

public void setUpdateLastPrintedProperty(boolean value)

Sets a value determining whether the BuiltInDocumentProperties.getLastPrinted() / BuiltInDocumentProperties.setLastPrinted(java.util.Date) property is updated before saving.

Parameters:

Parameter Type Description
value boolean A value determining whether the BuiltInDocumentProperties.getLastPrinted() / BuiltInDocumentProperties.setLastPrinted(java.util.Date) property is updated before saving.

setUpdateLastSavedTimeProperty(boolean value)

public void setUpdateLastSavedTimeProperty(boolean value)

Sets a value determining whether the BuiltInDocumentProperties.getLastSavedTime() / BuiltInDocumentProperties.setLastSavedTime(java.util.Date) property is updated before saving.

Parameters:

Parameter Type Description
value boolean A value determining whether the BuiltInDocumentProperties.getLastSavedTime() / BuiltInDocumentProperties.setLastSavedTime(java.util.Date) property is updated before saving.

setUpdateSdtContent(boolean value)

public void setUpdateSdtContent(boolean value)

Sets value determining whether content of StructuredDocumentTag is updated before saving. The default value is false .

Parameters:

Parameter Type Description
value boolean Value determining whether content of StructuredDocumentTag is updated before saving.

setUseAntiAliasing(boolean value)

public void setUseAntiAliasing(boolean value)

Sets a value determining whether or not to use anti-aliasing for rendering.

The default value is false . When this value is set to true anti-aliasing is used for rendering.

This property is used when the document is exported to the following formats: SaveFormat.TIFF, SaveFormat.PNG, SaveFormat.BMP, SaveFormat.JPEG, SaveFormat.EMF. When the document is exported to the SaveFormat.HTML, SaveFormat.MHTML, SaveFormat.EPUB and SaveFormat.AZW_3 formats this option is used for raster images.

Parameters:

Parameter Type Description
value boolean A value determining whether or not to use anti-aliasing for rendering.

setUseBookFoldPrintingSettings(boolean value)

public void setUseBookFoldPrintingSettings(boolean value)

Sets a boolean value indicating whether the document should be saved using a booklet printing layout, if it is specified via PageSetup.getMultiplePages() / PageSetup.setMultiplePages(int).

If this option is specified, FixedPageSaveOptions.getPageSet() / FixedPageSaveOptions.setPageSet(com.aspose.words.PageSet) is ignored when saving. This behavior matches MS Word. If book fold printing settings are not specified in page setup, this option will have no effect.

Parameters:

Parameter Type Description
value boolean A boolean value indicating whether the document should be saved using a booklet printing layout, if it is specified via PageSetup.getMultiplePages() / PageSetup.setMultiplePages(int).

setUseCoreFonts(boolean value)

public void setUseCoreFonts(boolean value)

Sets a value determining whether or not to substitute TrueType fonts Arial, Times New Roman, Courier New and Symbol with core PDF Type 1 fonts.

The default value is false . When this value is set to true Arial, Times New Roman, Courier New and Symbol fonts are replaced in PDF document with corresponding core Type 1 font.

Core PDF fonts, or their font metrics and suitable substitution fonts, are required to be available to any PDF viewer application.

This setting works only for the text in ANSI (Windows-1252) encoding. Non-ANSI text will be written with embedded TrueType font regardless of this setting.

PDF/A and PDF/UA compliance requires all fonts to be embedded. false value will be used automatically when saving to PDF/A and PDF/UA.

Core fonts are not supported when saving to PDF 2.0 format. false value will be used automatically when saving to PDF 2.0.

This option has a higher priority then getFontEmbeddingMode() / setFontEmbeddingMode(int) option.

Parameters:

Parameter Type Description
value boolean A value determining whether or not to substitute TrueType fonts Arial, Times New Roman, Courier New and Symbol with core PDF Type 1 fonts.

setUseHighQualityRendering(boolean value)

public void setUseHighQualityRendering(boolean value)

Sets a value determining whether or not to use high quality (i.e. slow) rendering algorithms. The default value is false .

This property is used when the document is exported to image formats: SaveFormat.TIFF, SaveFormat.PNG, SaveFormat.BMP, SaveFormat.JPEG, SaveFormat.EMF.

Parameters:

Parameter Type Description
value boolean A value determining whether or not to use high quality (i.e.

setZoomBehavior(int value)

public void setZoomBehavior(int value)

Sets a value determining what type of zoom should be applied when a document is opened with a PDF viewer. The default value is PdfZoomBehavior.NONE, i.e. no fit is applied.

Parameters:

Parameter Type Description
value int A value determining what type of zoom should be applied when a document is opened with a PDF viewer. The value must be one of PdfZoomBehavior constants.

setZoomFactor(int value)

public void setZoomFactor(int value)

Sets a value determining zoom factor (in percentages) for a document. This value is used only if getZoomBehavior() / setZoomBehavior(int) is set to PdfZoomBehavior.ZOOM_FACTOR.

Parameters:

Parameter Type Description
value int A value determining zoom factor (in percentages) for a document.

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

Parameter Type Description
arg0 long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

Parameter Type Description
arg0 long
arg1 int