Interface IPdfOptions
Namespace: Aspose.Slides.Export
Assembly: Aspose.Slides.dll (25.12.0)
Provides options that control how a presentation is saved in Pdf format.
[ComVisible(true)]
[Guid("42c93c3e-8e38-43d0-af5e-72af1701d0e3")]
public interface IPdfOptions : ISaveOptionsImplements
Properties
AccessPermissions
Contains a set of flags specifying which access permissions should be granted when the document is opened with user access. See Aspose.Slides.Export.PdfAccessPermissions.
PdfAccessPermissions AccessPermissions { get; set; }Property Value
Examples
var pdfOptions = new PdfOptions();
pdfOptions.Password = "my_password";
pdfOptions.AccessPermissions = PdfAccessPermissions.PrintDocument | PdfAccessPermissions.HighQualityPrint;
using (var presentation = new Presentation())
{
presentation.Save(pdfFilePath, SaveFormat.Pdf, pdfOptions);
}AdditionalCommonFontFamilies
Returns or sets an array of user-defined names of font families which Aspose.Slides should consider common. Read/write System.String[].
string[] AdditionalCommonFontFamilies { get; set; }Property Value
string []
ApplyImageTransparent
Applies the specified transparent color to an image if true.
bool ApplyImageTransparent { get; set; }Property Value
AsISaveOptions
Returns ISaveOptions interface. Read-only Aspose.Slides.Export.ISaveOptions.
ISaveOptions AsISaveOptions { get; }Property Value
Remarks
For COM compatibility.
BestImagesCompressionRatio
Indicates if the most effective compression (instead of the default one) for each image must be selected
automatically. If set to System.Boolean.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.
bool BestImagesCompressionRatio { get; set; }Property Value
Remarks
Default is System.Boolean.false.
Compliance
Desired conformance level for generated PDF document. Read/write Aspose.Slides.Export.PdfCompliance.
PdfCompliance Compliance { get; set; }Property Value
Remarks
Default is Aspose.Slides.Export.PdfCompliance.Pdf17.
DrawSlidesFrame
True to draw black frame around each slide. Read/write System.Boolean.
bool DrawSlidesFrame { get; set; }Property Value
Remarks
Default is false.
EmbedFullFonts
Determines if all characters of font should be embedded or only used subset. Read/write System.Boolean.
bool EmbedFullFonts { get; set; }Property Value
Remarks
Default is false.
EmbedTrueTypeFontsForASCII
True to embed true type fonts for ASCII characters 32-127. Fonts for character codes greater than 127 are always embedded. Read/write System.Boolean.
bool EmbedTrueTypeFontsForASCII { get; set; }Property Value
Remarks
Default is true.
ImageTransparentColor
Gets or sets the image transparent color.
Color ImageTransparentColor { get; set; }Property Value
IncludeOleData
True to convert all OLE data from the presentation to embedded files in the resulting PDF. Read/write System.Boolean.
bool IncludeOleData { get; set; }Property Value
Examples
Example:
using (Presentation pres = new Presentation("pres.pptx"))
{
PdfOptions options = new PdfOptions { IncludeOleData = true };
pres.Save("pres.pdf", SaveFormat.Pdf, options);
}Remarks
Default is false.
InkOptions
Provides options that control the look of Ink objects in exported document. Read-only Aspose.Slides.Export.IInkOptions
IInkOptions InkOptions { get; }Property Value
JpegQuality
Returns or sets a value determining the quality of the JPEG images inside PDF document. Read/write System.Byte.
byte JpegQuality { get; set; }Property Value
Remarks
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.
Password
Setting user password to protect the PDF document. Read/write System.String.
string Password { get; set; }Property Value
RasterizeUnsupportedFontStyles
Indicates whether text should be rasterized as a bitmap and saved to PDF when the font does not support bold styling. This approach can enhance the quality of text in the resulting PDF for certain fonts. Read/write System.Boolean.
bool RasterizeUnsupportedFontStyles { get; set; }Property Value
Remarks
Default is false.
SaveMetafilesAsPng
True to convert all metafiles used in a presentation to the PNG images. Read/write System.Boolean.
bool SaveMetafilesAsPng { get; set; }Property Value
Remarks
Default is true. Pdf document can contain vector graphics and raster images. If SaveMetafilesAsPng is set to true then source Metafile image is converted to Png format and saved to Pdf as a raster image. If SaveMetafilesAsPng is set to false then source Metafile is converted to Pdf vector graphics. Each approach has advantages and disadvantages. For example, if Metafile is converted to PNG, then some quality loss is possible during resulting document scaling. If Metafile is converted to Pdf vector graphics, then performance issues in Pdf viewing tool are possible.
ShowHiddenSlides
Specifies whether the generated document should include hidden slides or not.
Default is false.
bool ShowHiddenSlides { get; set; }Property Value
SlidesLayoutOptions
Gets or sets the mode in which slides are placed on the page when exporting a presentation Aspose.Slides.Export.ISlidesLayoutOptions.
ISlidesLayoutOptions SlidesLayoutOptions { get; set; }Property Value
Examples
Example:
using (Presentation pres = new Presentation("pres.pptx"))
{
PdfOptions options = new PdfOptions
{
SlidesLayoutOptions = new HandoutLayoutingOptions
{
Handout = HandoutType.Handouts4Horizontal
}
};
pres.Save("pres.pdf", SaveFormat.Pdf, options);
}SufficientResolution
Returns or sets a value determining resolution of images inside PDF document.
Property affects on file size, time of export and image quality. The default value is 96.
float SufficientResolution { get; set; }Property Value
TextCompression
Specifies compression type to be used for all textual content in the document. Read/write Aspose.Slides.Export.PdfTextCompression.
PdfTextCompression TextCompression { get; set; }Property Value
Remarks
Default is Aspose.Slides.Export.PdfTextCompression.Flate.