Components for Developers
© 2000-2008, Two Pilots

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF Add-on History In the Lab

PDF Creator Pilot documentation

Download CHM version of this manual.
Annotations
Collapse All

Creates an action annotation on the current PDF page.

Syntax

LONG PDFPAGE_SetAction (
LONG left,
LONG top,
LONG right,
LONG bottom,
LONG actionIndex
)
Parameters
left
X coordinate of the left-top corner of the bounding rectangle.

top
Y coordinate of the left-top corner of the bounding rectangle.

right
X coordinate of the right-bottom corner of the bounding rectangle.

bottom
Y coordinate of the right-bottom corner of the bounding rectangle.

actionIndex
Action identifier.

Return value
Annotation index.

Remarks

PDFPAGE_SetAction inserts an action annotation area into the current page in an area bounded by provided coordinates. Each mouse click in the annotation area executes the action with index actionIndex (created from any Action group functions).

The return value is an annotation/control identifier in document's annotations collection and can be used in AddControlToAction, CurrentAnnotationIndex.

Example

Creating an action annotation on page

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.BeginDoc;
ind := PDF.CreateJavascriptAction('app.alert("Hello")');
PDF.PDFPAGE_Rectangle(100, 200, 210, 250);
PDF.PDFPAGE_Stroke;
PDF.PDFPAGE_SetAction(100, 200, 210, 250, ind);
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->BeginDoc();
LONG ind = PDF->CreateJavascriptAction("app.alert('Hello')");
PDF->PDFPAGE_Rectangle(100, 200, 210, 250);
PDF->PDFPAGE_Stroke();
PDF->PDFPAGE_SetAction(100, 200, 210, 250, ind);
PDF->EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.BeginDoc();
long ind = PDF.CreateJavascriptAction("app.alert('Hello')");
PDF.PDFPAGE_Rectangle(100, 200, 210, 250);
PDF.PDFPAGE_Stroke();
PDF.PDFPAGE_SetAction(100, 200, 210, 250, ind);
PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.BeginDoc
ind = PDF.CreateJavascriptAction("app.alert('Hello')")
PDF.PDFPAGE_Rectangle 100, 200, 210, 250
PDF.PDFPAGE_Stroke
PDF.PDFPAGE_SetAction 100, 200, 210, 250, ind
PDF.EndDoc

See Also

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF Add-on History In the Lab

 

 

PDF Library | Virtual Printer | Converters to PDF

Support | Blog | Forum | Contacts

© 2000-2008, Two Pilots