HtmlPrintDocumentSource HtmlPrintDocumentSource HtmlPrintDocumentSource HtmlPrintDocumentSource Class

Manages the document source for app printing.

Syntax

Declaration

public sealed class HtmlPrintDocumentSourcepublic sealed class HtmlPrintDocumentSourcePublic NotInheritable Class HtmlPrintDocumentSourcepublic sealed class HtmlPrintDocumentSource

Remarks

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

Properties summary

Gets and sets the bottom margin of the document source.

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

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

Gets and sets the left margin of the document source.

Gets the range of pages that prints.

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

Gets and sets the right margin of the document source.

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

Gets and sets the top margin of the document source.

Methods summary

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

Tries to set the page range of the document source.

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 floatpublic float BottomMargin { get; set; }

    Property 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 PrintContentpublic PrintContent Content { get; set; }

    Property Value

  • EnableHeaderFooter
    EnableHeaderFooter
    EnableHeaderFooter
    EnableHeaderFooter

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

    public bool EnableHeaderFooter { get; set; }public bool EnableHeaderFooter { get; set; }Public ReadWrite Property EnableHeaderFooter As boolpublic bool EnableHeaderFooter { get; set; }

    Property Value

    • bool
      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 floatpublic float LeftMargin { get; set; }

    Property Value

    • float
      float
      float
      float

      The left margin of the document source.

  • PageRange
    PageRange
    PageRange
    PageRange

    Gets the range of pages that prints.

    public string PageRange { get; }public string PageRange { get; }Public ReadOnly Property PageRange As stringpublic string PageRange { get; }

    Property Value

    • 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 floatpublic float PercentScale { get; set; }

    Property 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 floatpublic float RightMargin { get; set; }

    Property 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 bool ShrinkToFit { get; set; }public bool ShrinkToFit { get; set; }Public ReadWrite Property ShrinkToFit As boolpublic bool ShrinkToFit { get; set; }

    Property Value

    • bool
      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 floatpublic float TopMargin { get; set; }

    Property 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()public void Close()Public Function Close() As voidpublic void Close()
  • TrySetPageRange(String)
    TrySetPageRange(String)
    TrySetPageRange(String)
    TrySetPageRange(String)

    Tries to set the page range of the document source.

    public bool TrySetPageRange(String strPageRange)public bool TrySetPageRange(String strPageRange)Public Function TrySetPageRange(strPageRange As String) As boolpublic bool TrySetPageRange(String strPageRange)

    Parameters

    • strPageRange
      System.String
      System.String
      System.String
      System.String

      The page range to set.

    Returns

    • bool
      bool
      bool
      bool

      A Boolean value that indicates whether TrySetPageRange(String) set the page range in strPageRange. TRUE indicates the page range was set and FALSE otherwise.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute

Details

Assembly

Windows.UI.WebUI.dll