public class PdfOptions extends SaveOptions implements IPdfOptions
Provides options that control how a presentation is saved in Pdf format.
| Constructor and Description |
|---|
PdfOptions()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getAccessPermissions()
Contains a set of flags specifying which access permissions should be granted when the document is opened
with user access.
|
java.lang.String[] |
getAdditionalCommonFontFamilies()
Returns or sets an array of user-defined names of font families which Aspose.Slides should consider common.
|
boolean |
getApplyImageTransparent()
Applies the specified transparent color to an image if true.
|
boolean |
getBestImagesCompressionRatio()
Indicates if the most effective compression (instead of the default one) for each image must be selected
automatically.
|
int |
getCompliance()
Desired conformance level for generated PDF document.
|
boolean |
getDrawSlidesFrame()
True to draw black frame around each slide.
|
boolean |
getEmbedFullFonts()
Determines if all characters of font should be embedded or only used subset.
|
boolean |
getEmbedTrueTypeFontsForASCII()
Determines if Aspose.Slides will embed common fonts for ASCII (33..127 code range) text.
|
java.awt.Color |
getImageTransparentColor()
Gets or sets the image transparent color.
|
byte |
getJpegQuality()
Returns or sets a value determining the quality of the JPEG images inside PDF document.
|
INotesCommentsLayoutingOptions |
getNotesCommentsLayouting()
Provides options that control how notes and comments is placed in exported document.
|
java.lang.String |
getPassword()
Setting user password to protect the PDF document.
|
boolean |
getSaveMetafilesAsPng()
True to convert all metafiles used in a presentation to the PNG images.
|
boolean |
getShowHiddenSlides()
Specifies whether the generated document should include hidden slides or not.
|
float |
getSufficientResolution()
Returns or sets a value determining resolution of images inside PDF document.
|
int |
getTextCompression()
Specifies compression type to be used for all textual content in the document.
|
void |
setAccessPermissions(int value)
Contains a set of flags specifying which access permissions should be granted when the document is opened
with user access.
|
void |
setAdditionalCommonFontFamilies(java.lang.String[] value)
Returns or sets an array of user-defined names of font families which Aspose.Slides should consider common.
|
void |
setApplyImageTransparent(boolean value)
Applies the specified transparent color to an image if true.
|
void |
setBestImagesCompressionRatio(boolean value)
Indicates if the most effective compression (instead of the default one) for each image must be selected
automatically.
|
void |
setCompliance(int value)
Desired conformance level for generated PDF document.
|
void |
setDrawSlidesFrame(boolean value)
True to draw black frame around each slide.
|
void |
setEmbedFullFonts(boolean value)
Determines if all characters of font should be embedded or only used subset.
|
void |
setEmbedTrueTypeFontsForASCII(boolean value)
Determines if Aspose.Slides will embed common fonts for ASCII (33..127 code range) text.
|
void |
setImageTransparentColor(java.awt.Color value)
Gets or sets the image transparent color.
|
void |
setJpegQuality(byte value)
Returns or sets a value determining the quality of the JPEG images inside PDF document.
|
void |
setPassword(java.lang.String value)
Setting user password to protect the PDF document.
|
void |
setSaveMetafilesAsPng(boolean value)
True to convert all metafiles used in a presentation to the PNG images.
|
void |
setShowHiddenSlides(boolean value)
Specifies whether the generated document should include hidden slides or not.
|
void |
setSufficientResolution(float value)
Returns or sets a value determining resolution of images inside PDF document.
|
void |
setTextCompression(int value)
Specifies compression type to be used for all textual content in the document.
|
getDefaultRegularFont, getProgressCallback, getWarningCallback, setDefaultRegularFont, setProgressCallback, setWarningCallbackequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDefaultRegularFont, getProgressCallback, getWarningCallback, setDefaultRegularFont, setProgressCallback, setWarningCallbackpublic final INotesCommentsLayoutingOptions getNotesCommentsLayouting()
Provides options that control how notes and comments is placed in exported document.
getNotesCommentsLayouting in interface IPdfOptionspublic final boolean getShowHiddenSlides()
Specifies whether the generated document should include hidden slides or not. Default is false.
getShowHiddenSlides in interface IPdfOptionspublic final void setShowHiddenSlides(boolean value)
Specifies whether the generated document should include hidden slides or not. Default is false.
setShowHiddenSlides in interface IPdfOptionspublic final int getTextCompression()
Specifies compression type to be used for all textual content in the document.
Read/write PdfTextCompression.
PdfTextCompression.Flate.
getTextCompression in interface IPdfOptionspublic final void setTextCompression(int value)
Specifies compression type to be used for all textual content in the document.
Read/write PdfTextCompression.
PdfTextCompression.Flate.
setTextCompression in interface IPdfOptionspublic final boolean getBestImagesCompressionRatio()
Indicates if the most effective compression (instead of the default one) for each image must be selected automatically. If set to true, for every image in presentation the most appropriate compression algorithm will be chosen, what will lead to the smaller size of the resulting PDF document.
getBestImagesCompressionRatio in interface IPdfOptionspublic final void setBestImagesCompressionRatio(boolean value)
Indicates if the most effective compression (instead of the default one) for each image must be selected automatically. If set to true, for every image in presentation the most appropriate compression algorithm will be chosen, what will lead to the smaller size of the resulting PDF document.
setBestImagesCompressionRatio in interface IPdfOptionspublic final boolean getEmbedTrueTypeFontsForASCII()
Determines if Aspose.Slides will embed common fonts for ASCII (33..127 code range) text.
Fonts for character codes greater than 127 are always embedded.
Common fonts list includes PDF's base 14 fonts and additional user specified fonts.
Read/write boolean.
getEmbedTrueTypeFontsForASCII in interface IPdfOptionspublic final void setEmbedTrueTypeFontsForASCII(boolean value)
Determines if Aspose.Slides will embed common fonts for ASCII (33..127 code range) text.
Fonts for character codes greater than 127 are always embedded.
Common fonts list includes PDF's base 14 fonts and additional user specified fonts.
Read/write boolean.
setEmbedTrueTypeFontsForASCII in interface IPdfOptionspublic final java.lang.String[] getAdditionalCommonFontFamilies()
Returns or sets an array of user-defined names of font families which Aspose.Slides should consider common.
Read/write String[].
getAdditionalCommonFontFamilies in interface IPdfOptionspublic final void setAdditionalCommonFontFamilies(java.lang.String[] value)
Returns or sets an array of user-defined names of font families which Aspose.Slides should consider common.
Read/write String[].
setAdditionalCommonFontFamilies in interface IPdfOptionspublic final boolean getEmbedFullFonts()
Determines if all characters of font should be embedded or only used subset.
Read/write boolean.
getEmbedFullFonts in interface IPdfOptionspublic final void setEmbedFullFonts(boolean value)
Determines if all characters of font should be embedded or only used subset.
Read/write boolean.
setEmbedFullFonts in interface IPdfOptionspublic final byte getJpegQuality()
Returns or sets a value determining the quality of the JPEG images inside PDF document.
Read/write byte.
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.
The default value is 100.
getJpegQuality in interface IPdfOptionspublic final void setJpegQuality(byte value)
Returns or sets a value determining the quality of the JPEG images inside PDF document.
Read/write byte.
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.
The default value is 100.
setJpegQuality in interface IPdfOptionspublic final int getCompliance()
Desired conformance level for generated PDF document.
Read/write PdfCompliance.
PdfCompliance.Pdf15.
getCompliance in interface IPdfOptionspublic final void setCompliance(int value)
Desired conformance level for generated PDF document.
Read/write PdfCompliance.
PdfCompliance.Pdf15.
setCompliance in interface IPdfOptionspublic final java.lang.String getPassword()
Setting user password to protect the PDF document.
Read/write String.
getPassword in interface IPdfOptionspublic final void setPassword(java.lang.String value)
Setting user password to protect the PDF document.
Read/write String.
setPassword in interface IPdfOptionspublic final int getAccessPermissions()
Contains a set of flags specifying which access permissions should be granted when the document is opened
with user access. See PdfAccessPermissions.
PdfOptions pdfOptions = new PdfOptions(); pdfOptions.setPassword("my_password"); pdfOptions.setAccessPermissions(PdfAccessPermissions.PrintDocument | PdfAccessPermissions.HighQualityPrint); Presentation presentation = new Presentation(); try { presentation.save(pdfFilePath, SaveFormat.Pdf, pdfOptions); } finally { if (presentation != null) presentation.dispose(); }
getAccessPermissions in interface IPdfOptionspublic final void setAccessPermissions(int value)
Contains a set of flags specifying which access permissions should be granted when the document is opened
with user access. See PdfAccessPermissions.
PdfOptions pdfOptions = new PdfOptions(); pdfOptions.setPassword("my_password"); pdfOptions.setAccessPermissions(PdfAccessPermissions.PrintDocument | PdfAccessPermissions.HighQualityPrint); Presentation presentation = new Presentation(); try { presentation.save(pdfFilePath, SaveFormat.Pdf, pdfOptions); } finally { if (presentation != null) presentation.dispose(); }
setAccessPermissions in interface IPdfOptionspublic final boolean getSaveMetafilesAsPng()
True to convert all metafiles used in a presentation to the PNG images.
Read/write boolean.
getSaveMetafilesAsPng in interface IPdfOptionspublic final void setSaveMetafilesAsPng(boolean value)
True to convert all metafiles used in a presentation to the PNG images.
Read/write boolean.
setSaveMetafilesAsPng in interface IPdfOptionspublic final float getSufficientResolution()
Returns or sets a value determining resolution of images inside PDF document.
Read/write float.
Property affects on file size, time of export and image quality.
The default value is 96.
getSufficientResolution in interface IPdfOptionspublic final void setSufficientResolution(float value)
Returns or sets a value determining resolution of images inside PDF document.
Read/write float.
Property affects on file size, time of export and image quality.
The default value is 96.
setSufficientResolution in interface IPdfOptionspublic final boolean getDrawSlidesFrame()
True to draw black frame around each slide.
Read/write boolean.
getDrawSlidesFrame in interface IPdfOptionspublic final void setDrawSlidesFrame(boolean value)
True to draw black frame around each slide.
Read/write boolean.
setDrawSlidesFrame in interface IPdfOptionspublic final java.awt.Color getImageTransparentColor()
Gets or sets the image transparent color.
Value: The color of the image transparent.getImageTransparentColor in interface IPdfOptionspublic final void setImageTransparentColor(java.awt.Color value)
Gets or sets the image transparent color.
Value: The color of the image transparent.setImageTransparentColor in interface IPdfOptionspublic final boolean getApplyImageTransparent()
Applies the specified transparent color to an image if true.
getApplyImageTransparent in interface IPdfOptionspublic final void setApplyImageTransparent(boolean value)
Applies the specified transparent color to an image if true.
setApplyImageTransparent in interface IPdfOptionsCopyright © 2004-2022 Aspose Pty Ltd. All Rights Reserved.