GemBox.Pdf
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    PrintOptions Class

    Namespace:
    GemBox.Pdf
    Assembly:
    GemBox.Pdf.dll

    Specifies information about how a document is printed.

    • C#
    • VB.NET
    public sealed class PrintOptions
    Public NotInheritable Class PrintOptions
    Inheritance:
    Object
    PrintOptions

    Constructors

    PrintOptions()

    Initializes a new instance of the PrintOptions class.

    • C#
    • VB.NET
    public PrintOptions()
    Public Sub New

    PrintOptions(Stream)

    Initializes a new instance of the PrintOptions class.

    • C#
    • VB.NET
    public PrintOptions(Stream xmlStream)
    Public Sub New(xmlStream As Stream)
    Parameters
    xmlStream
    Stream

    Initializes a new instance of the PrintOptions class by using an XML stream (that contains a PrintTicket document) that complies with the XML Print Schema.

    Properties

    CopyCount

    Gets or sets the number of copies of the document to print.

    • C#
    • VB.NET
    public int CopyCount { get; set; }
    Public Property CopyCount As Integer
    Property Value
    Int32

    The number of copies of the document to print.

    Exceptions
    ArgumentException

    Value must be positive.

    DocumentName

    Gets or sets the name of the printed document in the print queue.

    Default value is 'Pdf'.

    • C#
    • VB.NET
    public string DocumentName { get; set; }
    Public Property DocumentName As String
    Property Value
    String

    The name of the printed document in the print queue.

    FromPage

    Gets or sets the page index of the first page to print.

    • C#
    • VB.NET
    public int FromPage { get; set; }
    Public Property FromPage As Integer
    Property Value
    Int32

    The page index of the first page to print.

    Remarks

    Document pages are zero-indexed meaning that first page in the document has index 0 (zero).

    Exceptions
    ArgumentException

    Value cannot be negative.

    ToPage

    Gets or sets the index of the last page to print.

    • C#
    • VB.NET
    public int ToPage { get; set; }
    Public Property ToPage As Integer
    Property Value
    Int32

    The index of the last page to print.

    Remarks

    Use MaxValue value to print to the last page.

    Exceptions
    ArgumentException

    Value cannot be lower than FromPage.

    Examples

    Print example
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.