Components for Developers
© 2000-2012, Two Pilots

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF-X Pilot History In the Lab

PDF Creator Pilot documentation

Download CHM version of this manual.
Actions
OpenDocumentAction

See Also Example
Collapse All

This property gets or sets an action to be performed when the document is opened.

Syntax

LONG OpenDocumentAction { get; set; }
Value
Index of the action

Remarks

Set the OpenDocumentAction property with the index of the action. The specified action is started after the PDF document opens.

The action index is returned by action creating functions, such as CreateJavascriptAction.

Equivalent in new interface: IPDFDocument4::OnOpenDocument.

Example

Using the OpenDocumentAction Property

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.BeginDoc;
i := PDF.CreateJavascriptAction("app.alert('Document is opened.')");
PDF.OpenDocumentAction := i;
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->BeginDoc();
LONG i = PDF->CreateJavascriptAction("app.alert('Document is opened.')");
PDF->OpenDocumentAction = i;
PDF->EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.BeginDoc();
long i = PDF.CreateJavascriptAction("app.alert('Document is opened.')");
PDF.OpenDocumentAction = i;
PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.BeginDoc
i = PDF.CreateJavascriptAction("app.alert('Document is opened.')")
PDF.OpenDocumentAction = i
PDF.EndDoc

See Also

Reference

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF-X Pilot History In the Lab

 

 

PDF Library | Virtual Printer | Converters to PDF

Support | Blog | Forum | Contacts

© 2000-2012, Two Pilots