Xamarin.Forms

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfLoadedPage

    Show / Hide Table of Contents

    Class PdfLoadedPage

    Represents a page loaded from a PDF document.

    Inheritance
    System.Object
    PdfPageBase
    PdfLoadedPage
    Inherited Members
    PdfPageBase.CreateTemplate()
    PdfPageBase.ExtractText(TextLineCollection)
    PdfPageBase.Graphics
    PdfPageBase.Layers
    PdfPageBase.FormFieldsTabOrder
    PdfPageBase.DefaultLayerIndex
    PdfPageBase.DefaultLayer
    PdfPageBase.Rotation
    PdfPageBase.IsBlank
    Namespace: Syncfusion.Pdf
    Assembly: Syncfusion.Pdf.Portable.dll
    Syntax
    public class PdfLoadedPage : PdfPageBase, IPdfWrapper
    Examples
     //Load the document
     PdfLoadedDocument lDoc = new PdfLoadedDocument("input.pdf");
     //get the first page from the document
     PdfLoadedPage page = lDoc.Pages[0] as PdfLoadedPage;
     //Get the annotation collection
     PdfLoadedAnnotationCollection annotations = page.Annotations;
     //Save the document
     lDoc.Save("output.pdf");
     lDoc.Close(true);
    'Load the document
    Dim lDoc As New PdfLoadedDocument("input.pdf")
    'get the first page from the document
    Dim page As PdfLoadedPage = TryCast(lDoc.Pages(0), PdfLoadedPage)
    'Get the annotation collection
    Dim annotations As PdfLoadedAnnotationCollection = page.Annotations
    'Save the document
    lDoc.Save("output.pdf")
    lDoc.Close(True)

    Properties

    Annotations

    Gets or Sets the collection of the page's annotations.

    Declaration
    public PdfLoadedAnnotationCollection Annotations { get; set; }
    Property Value
    Type Description
    PdfLoadedAnnotationCollection

    The PdfLoadedAnnotationCollection that represents the page's annotations

    Examples
     //Load the document.
     PdfLoadedDocument lDoc = new PdfLoadedDocument("inputAnnotation.pdf");
     //get the first page from the document.
     PdfLoadedPage page = lDoc.Pages[0] as PdfLoadedPage;
     //Get the annotation collection.
     PdfLoadedAnnotationCollection annotations = page.Annotations;
     //Save the document.
     lDoc.Save("sample.pdf");
     lDoc.Close(true);
    'Load the document.
    Dim lDoc As New PdfLoadedDocument("inputAnnotation.pdf")
    'Get the first page from the document.
    Dim page As PdfLoadedPage = TryCast(lDoc.Pages(0), PdfLoadedPage)
    'Get the annotation collections.
    Dim annotations As PdfLoadedAnnotationCollection = page.Annotations
    'Save the document.
    lDoc.Save("sample.pdf")
    lDoc.Close(True)
    See Also
    PdfLoadedDocument
    PdfLoadedAnnotationCollection

    ArtBox

    Gets page region containing meaningful content (Read only).

    Declaration
    public RectangleF ArtBox { get; }
    Property Value
    Type Description
    RectangleF

    The RectangleF that represents the art box of the page

    Remarks

    Art box is only read only, we cann't set value for loaded page art box.

    Examples
    //Load an existing document.
    PdfLoadedDocument document = new PdfLoadedDocument("input.pdf");
    //Get first page of loaded document.
    PdfLoadedPage lpage = document.Pages[0] as PdfLoadedPage;
    //Get loaded page art box value.
    RectangleF rect = lpage.ArtBox;
    //Save and close the document.
    document.Save("Output.pdf");
    document.Close(true);
    'Load an existing document.
    Dim document As PdfLoadedDocument = New PdfLoadedDocument("input.pdf")
    'Get first page of loaded document.
    Dim lpage As PdfLoadedPage = TryCast(document.Pages(0), PdfLoadedPage)
    'Get loaded page art box value.
    Dim rect As RectangleF = lpage.ArtBox
    'Save and Close the document.
    document.Save("Output.pdf")
    document.Close(True)
    See Also
    PdfLoadedDocument

    BleedBox

    Gets page region after clipping (Read only).

    Declaration
    public RectangleF BleedBox { get; }
    Property Value
    Type Description
    RectangleF

    The RectangleF that represents the bleed box of a page

    Remarks

    Bleed box is only read only, we cann't set value for loaded page bleed box.

    Examples
    //Load an existing document.
    PdfLoadedDocument document = new PdfLoadedDocument("input.pdf");
    //Get first page of loaded document.
    PdfLoadedPage lpage = document.Pages[0] as PdfLoadedPage;
    //Get loaded page bleed box value.
    RectangleF rect = lpage.BleedBox;
    //Save and close the document.
    document.Save("Output.pdf");
    document.Close(true);
    'Load an existing document.
    Dim document As PdfLoadedDocument = New PdfLoadedDocument("input.pdf")
    'Get first page of loaded document.
    Dim lpage As PdfLoadedPage = TryCast(document.Pages(0), PdfLoadedPage)
    'Get loaded page bleed box value.
    Dim rect As RectangleF = lpage.BleedBox
    'Save and Close the document.
    document.Save("Output.pdf")
    document.Close(True)
    See Also
    PdfLoadedDocument

    CropBox

    Gets the visible region of the page (Read only).

    Declaration
    public RectangleF CropBox { get; }
    Property Value
    Type Description
    RectangleF

    The RectangleF that represents the crop box of the page

    Remarks

    Crop box is only read only, we cann't set value for loaded page crop box value.

    Examples
    //Load an existing document.
    PdfLoadedDocument document = new PdfLoadedDocument("input.pdf");
    //Get first page of loaded document.
    PdfLoadedPage lpage = document.Pages[0] as PdfLoadedPage;
    //Get loaded page crop box value.
    RectangleF rect = lpage.CropBox;
    //Save and close the document.
    document.Save("Output.pdf");
    document.Close(true);
    'Load an existing document.
    Dim document As PdfLoadedDocument = New PdfLoadedDocument("input.pdf")
    'Get first page of loaded document.
    Dim lpage As PdfLoadedPage = TryCast(document.Pages(0), PdfLoadedPage)
    'Get loaded page crop box value.
    Dim rect As RectangleF = lpage.CropBox
    'Save and Close the document.
    document.Save("Output.pdf")
    document.Close(True)
    See Also
    PdfLoadedDocument

    Document

    Gets the base document (Read only).

    Declaration
    public PdfDocumentBase Document { get; }
    Property Value
    Type Description
    PdfDocumentBase

    The PdfDocumentBase, which is base class of PdfLoadedDocument

    Examples
    //Load an existing document.
    PdfLoadedDocument document = new PdfLoadedDocument("input.pdf");
    //Get first page of loaded document.
    PdfLoadedPage lpage = document.Pages[0] as PdfLoadedPage;
    //Get loaded page base document.
    PdfLoadedDocument basedoc = lpage.Document as PdfLoadedDocument;
    //Save and close the document.
    document.Save("Output.pdf");
    document.Close(true);
    'Load an existing document.
    Dim document As PdfLoadedDocument = New PdfLoadedDocument("input.pdf")
    'Get first page of loaded document.
    Dim lpage As PdfLoadedPage = TryCast(document.Pages(0), PdfLoadedPage)
    'Get loaded page base document.
    Dim basedoc As PdfLoadedDocument = TryCast(lpage.Document, PdfLoadedDocument)
    'Save and Close the document.
    document.Save("Output.pdf")
    document.Close(True)
    See Also
    PdfLoadedDocument

    MediaBox

    Gets the media box of the PDF page (Read only).

    Declaration
    public RectangleF MediaBox { get; }
    Property Value
    Type Description
    RectangleF

    The RectangleF that represents the media box of the page, which is intended to be displayed or printed.

    Remarks

    Media box is only read only, we cann't set value for loaded page Media box value.

    Examples
    //Load an existing document.
    PdfLoadedDocument document = new PdfLoadedDocument("input.pdf");
    //Get first page of loaded document.
    PdfLoadedPage lpage = document.Pages[0] as PdfLoadedPage;
    //Get loaded page Media box value.
    RectangleF rect = lpage.MediaBox;
    //Save and close the document.
    document.Save("Output.pdf");
    document.Close(true);
    'Load an existing document.
    Dim document As PdfLoadedDocument = New PdfLoadedDocument("input.pdf")
    'Get first page of loaded document.
    Dim lpage As PdfLoadedPage = TryCast(document.Pages(0), PdfLoadedPage)
    'Get loaded page Media box value.
    Dim rect As RectangleF = lpage.MediaBox
    'Save and Close the document.
    document.Save("Output.pdf")
    document.Close(True)
    See Also
    PdfLoadedDocument

    Size

    Gets the size of the page (Read only).

    Declaration
    public override SizeF Size { get; }
    Property Value
    Type Description
    SizeF

    The SizeF that represents the size of the page

    Overrides
    PdfPageBase.Size

    TrimBox

    Returns page region after trimming (Read only).

    Declaration
    public RectangleF TrimBox { get; }
    Property Value
    Type Description
    RectangleF

    The RectangleF that represents the trim box of a page

    Remarks

    Trim box is only read only, we cann't set value for loaded page trim box.

    Examples
    //Load an existing document.
    PdfLoadedDocument document = new PdfLoadedDocument("input.pdf");
    //Get first page of loaded document.
    PdfLoadedPage lpage = document.Pages[0] as PdfLoadedPage;
    //Get loaded page trim box value.
    RectangleF rect = lpage.TrimBox;
    //Save and close the document.
    document.Save("Output.pdf");
    document.Close(true);
    'Load an existing document.
    Dim document As PdfLoadedDocument = New PdfLoadedDocument("input.pdf")
    'Get first page of loaded document.
    Dim lpage As PdfLoadedPage = TryCast(document.Pages(0), PdfLoadedPage)
    'Get loaded page trim box value.
    Dim rect As RectangleF = lpage.TrimBox
    'Save and Close the document.
    document.Save("Output.pdf")
    document.Close(True)
    See Also
    PdfLoadedDocument

    Methods

    OnBeginSave(EventArgs)

    Raises BeginSave event.

    Declaration
    protected virtual void OnBeginSave(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    Event arguments.

    Events

    BeginSave

    Raises before the page saves.

    Declaration
    public event EventHandler BeginSave
    Event Type
    Type Description
    System.EventHandler
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved