HtmlPrintDocumentSource HtmlPrintDocumentSource HtmlPrintDocumentSource HtmlPrintDocumentSource Class

Definition

Manages the document source for app printing.

public : sealed class HtmlPrintDocumentSource : IClosable, IPrintDocumentSource, IHtmlPrintDocumentSource
public sealed class HtmlPrintDocumentSource : IDisposable, IPrintDocumentSource, IHtmlPrintDocumentSource
Public NotInheritable Class HtmlPrintDocumentSource Implements IDisposable, IPrintDocumentSource, IHtmlPrintDocumentSource
// This class does not provide a public constructor.
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
var float = htmlPrintDocumentSource.bottomMargin;
htmlPrintDocumentSource.bottomMargin = float;
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
var printContent = htmlPrintDocumentSource.content;
htmlPrintDocumentSource.content = printContent;
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
var bool = htmlPrintDocumentSource.enableHeaderFooter;
htmlPrintDocumentSource.enableHeaderFooter = bool;
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
var float = htmlPrintDocumentSource.leftMargin;
htmlPrintDocumentSource.leftMargin = float;
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
var string = htmlPrintDocumentSource.pageRange;
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
var float = htmlPrintDocumentSource.percentScale;
htmlPrintDocumentSource.percentScale = float;
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
var float = htmlPrintDocumentSource.rightMargin;
htmlPrintDocumentSource.rightMargin = float;
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
var bool = htmlPrintDocumentSource.shrinkToFit;
htmlPrintDocumentSource.shrinkToFit = bool;
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
var float = htmlPrintDocumentSource.topMargin;
htmlPrintDocumentSource.topMargin = float;
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
htmlPrintDocumentSource.close();

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 Dispose
void 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
var bool = htmlPrintDocumentSource.trySetPageRange(strPageRange);
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.