I hope this is useful for you

// for "onOpen" event try:
stamp.addJavaScript(jswp);

//for "onWillPrint" event try:
pdfwriter.setAdditionalAction(PdfName.WP,PdfAction.javaScript(jswp,pdfwr
iter));

// where 
//     stamp is a PdfStamper
//     pdfwriter is the write obtained with getWriter() method
//     jswp is a String containing the javascript code
 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
CAIRNS Robert -NUCLEAR
Sent: Martes, 20 de Noviembre de 2007 12:00 p.m.
To: [email protected]
Subject: [iText-questions] Adding PDFAction - Javascript to Bookmarks

I have an existing PDF file with bookmarks. I want to add bookmarks to
it, but the action for the bookmarks is JavaScript.
The SimpleBookmark class associated with PDFStamper does not appear to
support adding JavaScript.  
The bookmark examples from the book using PDFWriter look like they only
work with new PDF documents, not existing PDF files.
Forgive me if the answer is simple, I am new to iText, and still
learning.

Thanks in advance.


Rob Cairns
Senior Technical Specialist - I & C Computers Safety Related Computers
Section Computers and Control Design Department Ontario Power Generation
Incorporated
Phone: (905) 839-OPGN x 4253 Fax: (905) 837-3995
Cell: (416) 820-3947
e-mail: [EMAIL PROTECTED] 



-----------------------------------------
THIS MESSAGE IS ONLY INTENDED FOR THE USE OF THE INTENDED
RECIPIENT(S) AND MAY CONTAIN INFORMATION THAT IS PRIVILEGED, PROPRIETARY
AND/OR CONFIDENTIAL. If you are not the intended recipient, you are
hereby notified that any review, retransmission, dissemination,
distribution, copying, conversion to hard copy or other use of this
communication is strictly prohibited. If you are not the intended
recipient and have received this message in error, please notify me by
return e-mail and delete this message from your system. Ontario Power
Generation Inc.


------------------------------------------------------------------------
-
This SF.net email is sponsored by: Microsoft Defy all challenges.
Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/
*********************************************************************
This message and any attachments are solely for the
intended recipient. If you are not the intended recipient,
disclosure, copying, use or distribution of the information 
included in this message is prohibited -- Please 
immediately and permanently delete.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to