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

    Show / Hide Table of Contents

    PdfPage Class

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

    Represents the leaf of the page tree, a page object, a dictionary specifying the attributes of a single page of the document.

    • C#
    • VB.NET
    public sealed class PdfPage : PdfPageObject
    Public NotInheritable Class PdfPage
        Inherits PdfPageObject
    Inheritance:
    System.Object
    PdfObject
    PdfPageObject
    PdfPage

    Properties

    Annotations

    (Optional) An array of annotation dictionaries that shall contain indirect references to all annotations associated with the page (see 12.5, "Annotations").

    • C#
    • VB.NET
    public PdfAnnotationCollection Annotations { get; }
    Public ReadOnly Property Annotations As PdfAnnotationCollection
    Property Value
    PdfAnnotationCollection

    An array of annotation dictionaries that shall contain indirect references to all annotations associated with the page.

    See Also
    PDF Specification ISO 32000-1:2008, section '7.7.3.3 Page Objects'

    AssociatedFiles

    (Optional; PDF 2.0) An array of one or more PdfFileSpecifications which denote the associated files for this PdfPage.

    • C#
    • VB.NET
    public PdfAssociatedFileCollection AssociatedFiles { get; }
    Public ReadOnly Property AssociatedFiles As PdfAssociatedFileCollection
    Property Value
    PdfAssociatedFileCollection

    An array of one or more PdfFileSpecifications which denote the associated files for this PdfPage.

    Content

    Gets the content of the PdfPage.

    • C#
    • VB.NET
    public PdfContent Content { get; }
    Public ReadOnly Property Content As PdfContent
    Property Value
    PdfContent

    Gets a value of type PdfContent that represents the collection of PdfContentElements in the PdfPage.

    Remarks

    A PdfPage stores its rendering data in a one or more content streams (whose data consists of a sequence of instructions describing the graphical elements to be painted) and an associated resource dictionary. For more information on how PdfPages store graphics data, see 7.8, "Content Streams and Resources".

    See Also
    PDF Specification ISO 32000-1:2008, section '7.8 Content Streams and Resources'

    Size

    Gets the page size in the original (untransformed) coordinate system in which Rotate is 0, and UserUnit is 1.

    • C#
    • VB.NET
    public PdfSize Size { get; }
    Public ReadOnly Property Size As PdfSize
    Property Value
    PdfSize

    The page size in the original (untransformed) coordinate system in which Rotate is 0, and UserUnit is 1.

    See Also
    PDF Specification ISO 32000-1:2008, section '8.3.2.3 User Space'

    Transform

    Gets the transformation from the coordinate system transformed by CropBox.Left, CropBox.Bottom, Rotate, and UserUnit entries to the original (untransformed) coordinate system in which CropBox.Left is 0, CropBox.Bottom) is 0, Rotate is 0, and UserUnit is 1.

    • C#
    • VB.NET
    public PdfMatrix Transform { get; }
    Public ReadOnly Property Transform As PdfMatrix
    Property Value
    PdfMatrix

    The transformation from the coordinate system transformed by CropBox.Left, CropBox.Bottom, Rotate, and UserUnit entries to the original (untransformed) coordinate system in which CropBox.Left is 0, CropBox.Bottom) is 0, Rotate is 0, and UserUnit is 1.

    See Also
    PDF Specification ISO 32000-1:2008, section '8.3.2.3 User Space'

    UserUnit

    (Optional; PDF 1.6) A positive number that shall give the size of default user space units, in multiples of 1/72 inch. The range of supported values shall be implementation-dependent. Default value: 1.0 (user space unit is 1/72 inch).

    • C#
    • VB.NET
    public double UserUnit { get; set; }
    Public Property UserUnit As Double
    Property Value
    System.Double

    A positive number that shall give the size of default user space units, in multiples of 1/72 inch.

    Exceptions
    System.ArgumentOutOfRangeException

    Value is less than or equal to 0.

    Methods

    ConvertToForm(PdfDocument)

    Converts the PdfPage to a PdfForm.

    • C#
    • VB.NET
    public PdfForm ConvertToForm(PdfDocument document)
    Public Function ConvertToForm(document As PdfDocument) As PdfForm
    Parameters
    document
    PdfDocument

    The PdfDocument associated with the PdfForm.

    Returns
    PdfForm

    A PdfForm with the same contents as this PdfPage.

    Inherited Properties

    CropBox

    (Optional; inheritable) A rectangle, expressed in default user space units, that shall define the visible region of default user space.

    When the page is displayed or printed, its contents shall be clipped (cropped) to this rectangle and then shall be imposed on the output medium in some implementation-defined manner (see 14.11.2, "Page Boundaries").

    Default value: the value of MediaBox.

    Value of this property might be null if this is an instance of a PdfPages, but it should never be null if this is an instance of a PdfPage.

    (Inherited from PdfPageObject)

    MediaBox

    (Required; inheritable) A rectangle (see 7.9.5, "Rectangles"), expressed in default user space units, that shall define the boundaries of the physical medium on which the page shall be displayed or printed (see 14.11.2, "Page Boundaries").

    Value of this property might be null if this is an instance of a PdfPages, but it should never be null if this is an instance of a PdfPage.

    (Inherited from PdfPageObject)

    Metadata

    (Optional; PDF 1.4) A metadata stream containing metadata for the component.

    (Inherited from PdfObject)

    Parent

    (Required except in root node; prohibited in the root node; shall be an indirect reference) The page tree node that is the immediate parent of this one.

    (Inherited from PdfPageObject)

    Rotate

    (Optional; inheritable) The number of degrees by which the page shall be rotated clockwise when displayed or printed.

    The value shall be a multiple of 90.

    Default value: 0.

    (Inherited from PdfPageObject)

    Inherited Methods

    SetCropBox(System.Double, System.Double)

    Sets the CropBox.

    (Inherited from PdfPageObject)

    SetCropBox(System.Double, System.Double, System.Double, System.Double)

    Sets the CropBox.

    (Inherited from PdfPageObject)

    SetMediaBox(System.Double, System.Double)

    Sets the MediaBox.

    (Inherited from PdfPageObject)

    SetMediaBox(System.Double, System.Double, System.Double, System.Double)

    Sets the MediaBox.

    (Inherited from PdfPageObject)

    Extension Methods

    PdfObjectExtensions.GetDictionary(PdfObject)
    PdfObjectExtensions.GetOrAddDictionary(PdfObject)
    PdfObjectExtensions.GetArray(PdfObject)

    Examples

    Page Tree example
    Associated Files example
    Content Streams and Resources example
    Reading example

    See Also

    PDF Specification ISO 32000-1:2008, section '7.7.3.3 Page Objects'
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.