Table of Contents

Class PdfRemoteGoToAction

Namespace
Syncfusion.Pdf.Interactive
Assembly
Syncfusion.Pdf.Portable.dll

Represents an action which goes to a destination in another PDF file

public class PdfRemoteGoToAction : PdfAction
Inheritance
PdfRemoteGoToAction
Inherited Members

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;
 remoteDestination.Mode = PdfDestinationMode.FitToPage;
 //Create a new PdfRemoteGoToAction
 PdfRemoteGoToAction goToAction = new PdfRemoteGoToAction("input.pdf", remoteDestination);
 //Set the IsNewWindow
 goToAction.IsNewWindow = true;
 //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)
'Set the IsNewWindow
goToAction.IsNewWindow = true
'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

PdfRemoteGoToAction(string, PdfRemoteDestination)

Initializes a new instance Remote GoTo action with remote destination and the file path in which the destination PDF is located.

public PdfRemoteGoToAction(string filePath, PdfRemoteDestination remoteDestination)

Parameters

filePath string
remoteDestination 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;
remoteDestination.Mode = PdfDestinationMode.FitToPage;
//Create a new PdfRemoteGoToAction
PdfRemoteGoToAction goToAction = new PdfRemoteGoToAction("input.pdf", remoteDestination);
//Set the IsNewWindow
goToAction.IsNewWindow = true;
//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)
'Set the IsNewWindow
goToAction.IsNewWindow = true
'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

FilePath

Gets or sets the file path in which the destination PDF is located.

public string FilePath { get; set; }

Property Value

string

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;
remoteDestination.Mode = PdfDestinationMode.FitToPage;
//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)

IsNewWindow

Gets or sets open the destination document in a new window

public bool IsNewWindow { get; set; }

Property Value

bool

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;
remoteDestination.Mode = PdfDestinationMode.FitToPage;
//Create a new PdfRemoteGoToAction
PdfRemoteGoToAction goToAction = new PdfRemoteGoToAction("input.pdf", remoteDestination);
//Set the IsNewWindow
goToAction.IsNewWindow = true;
//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)
'Set the IsNewWindow
goToAction.IsNewWindow = true
'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)

PdfRemoteDestination

Gets or sets the destination to be targeted.

public PdfRemoteDestination PdfRemoteDestination { get; set; }

Property Value

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;
remoteDestination.Mode = PdfDestinationMode.FitToPage;
//Create a new PdfRemoteGoToAction
PdfRemoteGoToAction goToAction = new PdfRemoteGoToAction("input.pdf", remoteDestination);
//Set the IsNewWindow
goToAction.IsNewWindow = true;
//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)
'Set the IsNewWindow
goToAction.IsNewWindow = true
'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)

Methods

Initialize()

Initializes instance.

protected override void Initialize()