PptxSaveOptions Class
Represents a class that stores saving options for PowerPoint Presentation file.
public sealed class PptxSaveOptions : SaveOptions
Public NotInheritable Class PptxSaveOptions
Inherits SaveOptions
- Inheritance:
- System.ObjectPptxSaveOptions
Remarks
To save a presentation as a slide show or a template, set PresentationType property to appropriate value.
To enable macros (embedded code written in a Visual Basic for Applications), set IsMacroEnabled property to true.
Constructors
PptxSaveOptions()
Initializes a new instance of the PptxSaveOptions class.
Properties
ContentType
Gets the content-type for PPTX file format: application/vnd.openxmlformats.
public override string ContentType { get; }
Public Overrides ReadOnly Property ContentType As String
Property Value
- System.String
The content-type for PPTX file format.
Overrides
DigitalSignatures
Gets the digital signature options.
public IList<PptxDigitalSignatureSaveOptions> DigitalSignatures { get; }
Public ReadOnly Property DigitalSignatures As IList(Of PptxDigitalSignatureSaveOptions)
Property Value
- System.Collections.Generic.IList<PptxDigitalSignatureSaveOptions>
The digital signature options.
ImageDpi
Gets or sets the saved images DPI.
Property Value
- System.Int32
The saved images DPI.
Remarks
This property controls the image quality for all images in the file. Larger value results in better-quality images but increases the file size. Setting this property to 0 will disable image optimization. Standard DPI values are:
- 330 - Good quality for HD displays
- 220 - Good quality for most printers and displays
- 150 - Good quality for web pages and projectors
- 96 - Good quality for smaller file sizes
Using this property you basically specify the DPI of the display device on which the file will be viewed and for which the images in the file should be optimized without losing any perceived quality because images go through the same resampling (reduction of pixel count) as they would in the viewer application if viewing the file using the default (100%) zoom factor on that display device.
For example, if an image whose pixel size is 600px × 400px
is shown on page where it occupies a slot whose physical size is 150pt × 100pt
, then if the display device DPI is 144px/inch
, the viewer application will show the image in a display slot whose pixel size is 300px × 200px
if the default (100%) zoom factor is used (Rationale: there are always 72 points per inch and for the DPI of 144, there are 144 pixels per inch, so 150[pt] = 150[pt] × 144[px/inch] / 72[pt/inch] = 300[px]
).
So the viewer application has to fit an image into a smaller display slot and it will do so by resampling the image from 600px × 400px
to 300px × 200px
.
Reducing the total number of pixels 4 times (from 240000 to 60000) would also reduce the image file size, so GemBox component can do this instead of the viewer application, thus achieving the overall smaller file size without any perceived loss of quality since the same image resampling would have been done by the viewer application anyway if the default (100%) zoom factor is used.
Instructing the GemBox component to perform image resampling (by setting the ImageDpi property to the DPI of the display device on which the file is going to be viewed) has two effects:
- Major benefit: output file size will be smaller if there are images whose pixel size is greater than their display size because those images are resampled to a smaller number of pixels without any perceived loss of quality since the same resampling would have been done by the viewer application anyway.
- Minor benefit: viewer application will be able to present the image faster because it needs to decode a fewer number of pixels and because the display slot size will be exactly equal to the image pixel size so it doesn't have to perform any resampling if the default (100%) zoom factor is used.
IsMacroEnabled
Gets or sets a value indicating whether the PresentationDocument instance that will be saved contains any macro (embedded code written in a Visual Basic for Applications).
Property Value
- System.Boolean
true if the PresentationDocument instance that will be saved contains any macro (embedded code written in a Visual Basic for Applications); otherwise, false.
Password
Gets or sets the password used to protect / encrypt the presentation.
Property Value
- System.String
The password used to protect / encrypt the presentation.
PresentationType
Gets or sets the PowerPoint Presentation type of the PresentationDocument instance that will be saved.
public PowerPointPresentationType PresentationType { get; set; }
Public Property PresentationType As PowerPointPresentationType
Property Value
The PowerPoint Presentation type of the PresentationDocument instance that will be saved.
Inherited Properties
Image | Gets the default saving options for image file format. Image will be saved in Bmp format. (Inherited from SaveOptions) |
Gets the default saving options for Portable Document Format (PDF). (Inherited from SaveOptions) | |
Pptx | Gets the default saving options for PowerPoint Presentation (PPTX) format. (Inherited from SaveOptions) |
Xps | Gets the default saving options for XML Paper Specification (XPS) format. (Inherited from SaveOptions) |