Class PdfRemoteDestination
Represents destination to target a specific page within a remote PDF document using its page index.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Syncfusion.Pdf.Interactive
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public class PdfRemoteDestination : PdfDestination, IPdfWrapper
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create a new page
PdfPage page = document.Pages.Add();
//Create font and font style.
PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold);
//Create a new PdfButtonField
PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
submitButton.Bounds = new RectangleF(25, 160, 100, 20);
submitButton.Font = font;
submitButton.Text = "RemoteGoto";
submitButton.BackColor = new PdfColor(181, 191, 203);
//Create a new page and adds it as the last page of the document
PdfPage pdfPages = document.Pages.Add();
//Create a new RemoteDestination
PdfRemoteDestination remoteDestination = new PdfRemoteDestination();
remoteDestination.RemotePageNumber = 3;
//Create a new PdfRemoteGoToAction
PdfRemoteGoToAction goToAction = new PdfRemoteGoToAction("input.pdf", remoteDestination);
//Add the goToAction
submitButton.Actions.GotFocus = goToAction;
//Add the submit button to a new document.
document.Form.Fields.Add(submitButton);
//Save document to disk.
document.Save("RemoteGoToAction.pdf");
document.Close(true);
'Create a new PDF document.
Dim document As PdfDocument = New PdfDocument
'Create a new page
Dim page As PdfPage = document.Pages.Add
'Create font and font style.
Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12!, PdfFontStyle.Bold)
'Create a new PdfButtonField
Dim submitButton As PdfButtonField = New PdfButtonField(page, "submitButton")
submitButton.Bounds = New RectangleF(25, 160, 100, 20)
submitButton.Font = font
submitButton.Text = "RemoteGoto"
submitButton.BackColor = New PdfColor(181, 191, 203)
'Create a new page and adds it as the last page of the document
Dim pdfPages As PdfPage = document.Pages.Add
'Create a new RemoteDestination
Dim remoteDestination As PdfRemoteDestination = New PdfRemoteDestination
remoteDestination.RemotePageNumber = 3
remoteDestination.Mode = PdfDestinationMode.FitToPage
'Create a new PdfRemoteGoToAction
Dim goToAction As PdfRemoteGoToAction = New PdfRemoteGoToAction("input.pdf", PdfRemoteDestination)
'Add the goToAction
submitButton.Actions.GotFocus = goToAction
'Add the submit button to a new document.
document.Form.Fields.Add(submitButton)
'Save document to disk.
document.Save("RemoteGoToAction.pdf")
document.Close(true)
Constructors
PdfRemoteDestination()
Initializes a new instance of the Remote Destination.
Declaration
public PdfRemoteDestination()
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create a new page
PdfPage page = document.Pages.Add();
//Create font and font style.
PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold);
//Create a new PdfButtonField
PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
submitButton.Bounds = new RectangleF(25, 160, 100, 20);
submitButton.Font = font;
submitButton.Text = "RemoteGoto";
submitButton.BackColor = new PdfColor(181, 191, 203);
//Create a new page and adds it as the last page of the document
PdfPage pdfPages = document.Pages.Add();
//Create a new RemoteDestination
PdfRemoteDestination remoteDestination = new PdfRemoteDestination();
remoteDestination.RemotePageNumber = 3;
//Create a new PdfRemoteGoToAction
PdfRemoteGoToAction goToAction = new PdfRemoteGoToAction("input.pdf", remoteDestination);
//Add the goToAction
submitButton.Actions.GotFocus = goToAction;
//Add the submit button to a new document.
document.Form.Fields.Add(submitButton);
//Save document to disk.
document.Save("RemoteGoToAction.pdf");
document.Close(true);
'Create a new PDF document.
Dim document As PdfDocument = New PdfDocument
'Create a new page
Dim page As PdfPage = document.Pages.Add
'Create font and font style.
Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12!, PdfFontStyle.Bold)
'Create a new PdfButtonField
Dim submitButton As PdfButtonField = New PdfButtonField(page, "submitButton")
submitButton.Bounds = New RectangleF(25, 160, 100, 20)
submitButton.Font = font
submitButton.Text = "RemoteGoto"
submitButton.BackColor = New PdfColor(181, 191, 203)
'Create a new page and adds it as the last page of the document
Dim pdfPages As PdfPage = document.Pages.Add
'Create a new RemoteDestination
Dim remoteDestination As PdfRemoteDestination = New PdfRemoteDestination
remoteDestination.RemotePageNumber = 3
remoteDestination.Mode = PdfDestinationMode.FitToPage
'Create a new PdfRemoteGoToAction
Dim goToAction As PdfRemoteGoToAction = New PdfRemoteGoToAction("input.pdf", PdfRemoteDestination)
'Add the goToAction
submitButton.Actions.GotFocus = goToAction
'Add the submit button to a new document.
document.Form.Fields.Add(submitButton)
'Save document to disk.
document.Save("RemoteGoToAction.pdf")
document.Close(true)
Properties
RemotePageNumber
Gets or sets the destination page number.
Declaration
public int RemotePageNumber { get; set; }
Property Value
Type |
---|
System.Int32 |
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create a new page
PdfPage page = document.Pages.Add();
//Create font and font style.
PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold);
//Create a new PdfButtonField
PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
submitButton.Bounds = new RectangleF(25, 160, 100, 20);
submitButton.Font = font;
submitButton.Text = "RemoteGoto";
submitButton.BackColor = new PdfColor(181, 191, 203);
//Create a new page and adds it as the last page of the document
PdfPage pdfPages = document.Pages.Add();
//Create a new RemoteDestination
PdfRemoteDestination remoteDestination = new PdfRemoteDestination();
remoteDestination.RemotePageNumber = 3;
//Create a new PdfRemoteGoToAction
PdfRemoteGoToAction goToAction = new PdfRemoteGoToAction("input.pdf", remoteDestination);
//Add the goToAction
submitButton.Actions.GotFocus = goToAction;
//Add the submit button to a new document.
document.Form.Fields.Add(submitButton);
//Save document to disk.
document.Save("RemoteGoToAction.pdf");
document.Close(true);
'Create a new PDF document.
Dim document As PdfDocument = New PdfDocument
'Create a new page
Dim page As PdfPage = document.Pages.Add
'Create font and font style.
Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12!, PdfFontStyle.Bold)
'Create a new PdfButtonField
Dim submitButton As PdfButtonField = New PdfButtonField(page, "submitButton")
submitButton.Bounds = New RectangleF(25, 160, 100, 20)
submitButton.Font = font
submitButton.Text = "RemoteGoto"
submitButton.BackColor = New PdfColor(181, 191, 203)
'Create a new page and adds it as the last page of the document
Dim pdfPages As PdfPage = document.Pages.Add
'Create a new RemoteDestination
Dim remoteDestination As PdfRemoteDestination = New PdfRemoteDestination
remoteDestination.RemotePageNumber = 3
remoteDestination.Mode = PdfDestinationMode.FitToPage
'Create a new PdfRemoteGoToAction
Dim goToAction As PdfRemoteGoToAction = New PdfRemoteGoToAction("input.pdf", PdfRemoteDestination)
'Add the goToAction
submitButton.Actions.GotFocus = goToAction
'Add the submit button to a new document.
document.Form.Fields.Add(submitButton)
'Save document to disk.
document.Save("RemoteGoToAction.pdf")
document.Close(true)