



Collapse All
Syntax| LONG CreateGoToPageAction ( LONG pageNumber, FLOAT topOffset ) |
RemarksThis method creates an action for moving the view to a new destination in a PDF document, specified by pageNumber and topOffset, the offset (in pixels) from the top of the page.
The return value is an action identifier in the document's actions collection and can be used in OnOpenDocument, AddControlToAction, OnControlMouseDown and other properties (see Annotations).
Example{ PDF object is supposed to be created }
btn := PDF.AddButton(20, 90, 85, 104, 'Btn1');
PDF.AnnotUnicodeCaption := 'Goto page 2';
PDF.OnControlMouseUp := PDF.CreateGoToPageAction(1, 100);
PDF.NewPage;
PDF.SaveToFile('test.pdf', true);
// PDF object is supposed to be created
long btn = PDF->AddButton(20, 90, 85, 104, "Btn1");
PDF->AnnotUnicodeCaption = L"Goto page 2";
PDF->OnControlMouseUp = PDF->CreateGoToPageAction(1, 100);
PDF->NewPage();
PDF->SaveToFile("test.pdf", true);
// PDF object is supposed to be created
long btn = PDF.AddButton(20, 90, 85, 104, "Btn1");
PDF.AnnotUnicodeCaption = "Goto page 2";
PDF.OnControlMouseUp = PDF.CreateGoToPageAction(1, 100);
PDF.NewPage();
PDF.SaveToFile("test.pdf", true);
' PDF object is supposed to be created btn = PDF.AddButton(20, 90, 85, 104, "Btn1") PDF.AnnotUnicodeCaption = "Goto page 2" PDF.OnControlMouseUp = PDF.CreateGoToPageAction(1, 100) PDF.NewPage PDF.SaveToFile "test.pdf", true
See Also