menu

Xamarin.Android

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfDestinationMode - Xamarin.Android API Reference | Syncfusion

    Show / Hide Table of Contents

    Class PdfDestinationMode

    Enumeration that represents fit mode.

    Inheritance
    System.Object
    PdfDestinationMode
    Namespace: Syncfusion.Pdf.Interactive
    Assembly: Syncfusion.Pdf.Portable.dll
    Syntax
    public sealed class PdfDestinationMode : Enum
    Examples
     //Creates a new document.
    PdfDocument document = new PdfDocument();
    //Adds a page.
    PdfPage page = document.Pages.Add();
    //Creates document bookmarks.
    PdfBookmark bookmark = document.Bookmarks.Add("Page 1");
    //Sets the destination page.
    bookmark.Destination = new PdfDestination(page);
    //Sets the destination location.
    bookmark.Destination.Location = new PointF(20, 20);
    //Sets the text style and color.
    bookmark.TextStyle = PdfTextStyle.Bold;
    bookmark.Color = Color.Red;
    //Set the destination mode.
    bookmark.Destination.Mode = PdfDestinationMode.FitH;
    //Saves and closes the PDF document.
    document.Save("Output.pdf");
    //Close the document.
    document.Close(true);
     'Creates a new document.
    Dim document As PdfDocument = New PdfDocument()
    'Adds a page.
    Dim page As PdfPage = document.Pages.Add()
    'Creates document bookmarks.
    Dim bookmark As PdfBookmark = document.Bookmarks.Add("Page 1")
    'Sets the destination page.
    bookmark.Destination = New PdfDestination(page)
    'Sets the destination location.
    bookmark.Destination.Location = New PointF(20, 20)
    'Sets the text style and color.
    bookmark.TextStyle = PdfTextStyle.Bold
    bookmark.Color = Color.Red
    'Set the destination mode.
    bookmark.Destination.Mode = PdfDestinationMode.FitH
    'Save the document.
    document.Save("Output.pdf")
    'Close the document.
    document.Close(True)

    Fields

    FitB

    Declaration
    public const PdfDestinationMode FitB
    Field Value
    Type
    PdfDestinationMode

    FitBH

    Declaration
    public const PdfDestinationMode FitBH
    Field Value
    Type
    PdfDestinationMode

    FitBV

    Declaration
    public const PdfDestinationMode FitBV
    Field Value
    Type
    PdfDestinationMode

    FitH

    Display the page designated by page, with the vertical coordinate top positioned at the top edge of the window and the contents of the page magnified just enough to fit the entire width of the page within the window.

    Declaration
    public const PdfDestinationMode FitH
    Field Value
    Type
    PdfDestinationMode

    FitR

    Display the page designated by page, with the horizontal coordinate left positioned at the left edge of the window and the contents of the page magnified just enough to fit the entire height of the page within the window.

    Declaration
    public const PdfDestinationMode FitR
    Field Value
    Type
    PdfDestinationMode

    FitToPage

    Display the page designated by page, with its contents magnified just enough to fit the entire page within the window both horizontally and vertically. If the required horizontal and vertical magnification factors are different, use the smaller of the two, centering the page within the window in the other dimension.

    Declaration
    public const PdfDestinationMode FitToPage
    Field Value
    Type
    PdfDestinationMode

    FitV

    Display the page designated by page, with the horizontal coordinate left positioned at the left edge of the window and the contents of the page magnified just enough to fit the entire height of the page within the window.

    Declaration
    public const PdfDestinationMode FitV
    Field Value
    Type
    PdfDestinationMode

    Location

    Display the page designated by page, with the coordinates (left, top) positioned at the top-left corner of the window and the contents of the page magnified by the factor zoom. A NULL value for any of the parameters left, top, or zoom specifies that the current value of that parameter is to be retained unchanged. A zoom value of 0 has the same meaning as a NULL value.

    Declaration
    public const PdfDestinationMode Location
    Field Value
    Type
    PdfDestinationMode

    See Also

    PdfDocument
    PdfPage
    PdfBookmark
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved