Delen via


HtmlPrintDocumentSource Class

Definition

Manages the document source for app printing.

public ref class HtmlPrintDocumentSource sealed : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class HtmlPrintDocumentSource final : IClosable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class HtmlPrintDocumentSource : System.IDisposable
Public NotInheritable Class HtmlPrintDocumentSource
Implements IDisposable
Inheritance
Object Platform::Object IInspectable HtmlPrintDocumentSource
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

To get an instance of HtmlPrintDocumentSource, call the getHtmlPrintDocumentSourceMSApp method.

Properties

BottomMargin

Gets and sets the bottom margin of the document source.

Content

Gets and sets the content of the document source to print.

EnableHeaderFooter

Gets and sets a value that controls whether header and footer are enabled in the document source.

LeftMargin

Gets and sets the left margin of the document source.

PageRange

Gets the range of pages that prints.

PercentScale

Gets and sets the size of the document source by percentage.

RightMargin

Gets and sets the right margin of the document source.

ShrinkToFit

Gets and sets a value that controls whether content shrinks to fit the document source.

TopMargin

Gets and sets the top margin of the document source.

Methods

Close()

Performs app-defined tasks that are associated with freeing, releasing, or resetting resources that were allocated for the document source.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

TrySetPageRange(String)

Tries to set the page range of the document source.

Applies to

See also