HtmlPrintDocumentSource HtmlPrintDocumentSource HtmlPrintDocumentSource HtmlPrintDocumentSource Class

Definition

Manages the document source for app printing.

public : sealed class HtmlPrintDocumentSource : IClosable, IPrintDocumentSource, IHtmlPrintDocumentSourcepublic sealed class HtmlPrintDocumentSource : IDisposable, IPrintDocumentSource, IHtmlPrintDocumentSourcePublic NotInheritable Class HtmlPrintDocumentSource Implements IDisposable, IPrintDocumentSource, IHtmlPrintDocumentSource// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

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

Properties

BottomMargin BottomMargin BottomMargin BottomMargin

Gets and sets the bottom margin of the document source.

public : float BottomMargin { get; set; }public float BottomMargin { get; set; }Public ReadWrite Property BottomMargin As float// You can use this property in JavaScript.
Value
float float float float

The bottom margin of the document source.

Content Content Content Content

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

public : PrintContent Content { get; set; }public PrintContent Content { get; set; }Public ReadWrite Property Content As PrintContent// You can use this property in JavaScript.
Value
PrintContent PrintContent PrintContent PrintContent

The content of the document source to print.

See Also

EnableHeaderFooter EnableHeaderFooter EnableHeaderFooter EnableHeaderFooter

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

public : PlatForm::Boolean EnableHeaderFooter { get; set; }public bool EnableHeaderFooter { get; set; }Public ReadWrite Property EnableHeaderFooter As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

A Boolean value that indicates whether header and footer are enabled in the document source. TRUE indicates enabled and FALSE indicates disabled.

LeftMargin LeftMargin LeftMargin LeftMargin

Gets and sets the left margin of the document source.

public : float LeftMargin { get; set; }public float LeftMargin { get; set; }Public ReadWrite Property LeftMargin As float// You can use this property in JavaScript.
Value
float float float float

The left margin of the document source.

PageRange PageRange PageRange PageRange

Gets the range of pages that prints.

public : PlatForm::String PageRange { get; }public string PageRange { get; }Public ReadOnly Property PageRange As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The range of pages that prints.

PercentScale PercentScale PercentScale PercentScale

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

public : float PercentScale { get; set; }public float PercentScale { get; set; }Public ReadWrite Property PercentScale As float// You can use this property in JavaScript.
Value
float float float float

The size of the document source by percentage.

RightMargin RightMargin RightMargin RightMargin

Gets and sets the right margin of the document source.

public : float RightMargin { get; set; }public float RightMargin { get; set; }Public ReadWrite Property RightMargin As float// You can use this property in JavaScript.
Value
float float float float

The right margin of the document source.

ShrinkToFit ShrinkToFit ShrinkToFit ShrinkToFit

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

public : PlatForm::Boolean ShrinkToFit { get; set; }public bool ShrinkToFit { get; set; }Public ReadWrite Property ShrinkToFit As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

A Boolean value that indicates whether content shrinks to fit the document source. TRUE indicates content shrinks to fit and FALSE otherwise. This property is ignored if the PercentScale property is set.

TopMargin TopMargin TopMargin TopMargin

Gets and sets the top margin of the document source.

public : float TopMargin { get; set; }public float TopMargin { get; set; }Public ReadWrite Property TopMargin As float// You can use this property in JavaScript.
Value
float float float float

The top margin of the document source.

Methods

Close() Close() Close() Close()

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

public : void Close()This member is not implemented in C#This member is not implemented in VB.Net// You can use this method in JavaScript.

Dispose() Dispose() Dispose() Dispose()

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

This member is not implemented in C++void Dispose()Sub Disposevoid Dispose()

TrySetPageRange(String) TrySetPageRange(String) TrySetPageRange(String) TrySetPageRange(String)

Tries to set the page range of the document source.

public : PlatForm::Boolean TrySetPageRange(PlatForm::String strPageRange)public bool TrySetPageRange(String strPageRange)Public Function TrySetPageRange(strPageRange As String) As bool// You can use this method in JavaScript.
Parameters
strPageRange
PlatForm::String String String String

The page range to set.

Returns
PlatForm::Boolean bool bool bool

A Boolean value that indicates whether trySetPageRange set the page range in strPageRange. TRUE indicates the page range was set and FALSE otherwise.