Edit

SKDocumentXpsOptions Struct

Definition

Options for creating an XPS document with SKDocument.

public struct SKDocumentXpsOptions : IEquatable<SkiaSharp.SKDocumentXpsOptions>
Inheritance
SKDocumentXpsOptions
Implements

Examples

Creating an XPS document at 96 DPI:

using var stream = File.OpenWrite("output.xps");
var opts = new SKDocumentXpsOptions { Dpi = 96f };
using var doc = SKDocument.CreateXps(stream, opts);
using var page = doc.BeginPage(800, 600);
// ... draw ...
doc.EndPage();
doc.Close();

Remarks

`SKDocumentXpsOptions` controls how an XPS document is created by <xref:SkiaSharp.SKDocument.CreateXps*>. Pass an instance of this struct to specify custom DPI or PNG-embedding behavior.

All fields are zero-initialized by default; a `Dpi` of `0` lets the XPS writer choose its own default resolution.

Properties

Name Description
AllowNoPngs

Gets or sets a value indicating whether the XPS encoder may omit PNG image data.

Dpi

Gets or sets the dots-per-inch resolution of the XPS document.

Methods

Name Description
Equals(Object)

Indicates whether these options are equal to the specified object.

Equals(SKDocumentXpsOptions)

Indicates whether these options are equal to another SKDocumentXpsOptions.

GetHashCode()

Returns a hash code for these XPS options.

Operators

Name Description
Equality(SKDocumentXpsOptions, SKDocumentXpsOptions)

Determines whether two SKDocumentXpsOptions values are equal.

Inequality(SKDocumentXpsOptions, SKDocumentXpsOptions)

Determines whether two SKDocumentXpsOptions values are not equal.

Applies to