Class PdfDestinationMode
Enumeration that represents fit mode.
Inheritance
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
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 | Description |
---|---|
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 | Description |
---|---|
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 | Description |
---|---|
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 | Description |
---|---|
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 | Description |
---|---|
PdfDestinationMode |
value__
Declaration
public int value__
Field Value
Type | Description |
---|---|
System.Int32 |