XpsOptions

XpsOptions class

Provides options that control how a presentation is saved in XPS format.

public class XpsOptions : SaveOptions, IXpsOptions

Constructors

NameDescription
XpsOptions()Default constructor.

Properties

NameDescription
DefaultRegularFont { get; set; }Returns or sets font used in case source font is not found. Read-write String.
DrawSlidesFrame { get; set; }True to draw black frame around each slide. Read/write Boolean.
ProgressCallback { get; set; }Represents a callback object for saving progress updates in percentage. See IProgressCallback.
SaveMetafilesAsPng { get; set; }True to convert all metafiles used in a presentation to the PNG images. Read/write Boolean.
ShowHiddenSlides { get; set; }Specifies whether the generated document should include hidden slides or not. Default is false.
WarningCallback { get; set; }Returns of sets an object which receives warnings and decides whether loading process will continue or will be aborted. Read/write IWarningCallback.

Examples

The following example shows how to converting presentations to XPS using default settings.

[C#]
// Instantiate a Presentation object that represents a presentation file
using (Presentation pres = new Presentation("Convert_XPS.pptx"))
{
    // Saving the presentation to XPS document
    pres.Save("XPS_Output_Without_XPSOption_out.xps", SaveFormat.Xps);
}

The following example shows how to converting presentations to XPS using custom settings.

[C#]
// Instantiate a Presentation object that represents a presentation file
using (Presentation pres = new Presentation("Convert_XPS_Options.pptx"))
{
    // Instantiate the TiffOptions class
    XpsOptions options = new XpsOptions();
    // Save MetaFiles as PNG
    options.SaveMetafilesAsPng = true;
    // Save the presentation to XPS document
    pres.Save("XPS_With_Options_out.xps", SaveFormat.Xps, options);
}

See Also