Hi All,

 

When merging pdf's using PdfCopyfields the javascript is lost. How can
we get the javascript to work or fire automatically/

 

So I have code like this:

 

      ByteArrayOutputStream pdfBAOS = new ByteArrayOutputStream();

                    InputStream dataStream =
externalContext.getResourceAsStream("/WEB-INF/PDF/mypdf");

                        reader = new PdfReader(dataStream);

                        stamper = new PdfStamper(reader,pdfBAOS);

                        AcroFields form = stamper.getAcroFields();

                        form.setField("registerOwner", registerOwner);

 

 

......

 

  //now add this content to document

                        PdfReader currentReader = new
PdfReader(pdfBAOS.toByteArray());

                        pdfCopyFields.addDocument(currentReader);

 

              by this time the javascript which fires at the open of pdf
does not fire. I have defined an init method (not a s function) which
has all the js to set color's of my text fields to gray.

 

If I don't have copyfileds call (i.e when showing single PDF) my js
works fine but during copy the js does not fire, how can I get js to
fire.

 

I tried to set the js at stamper level but does not work, please suggest
a method.

 

Can I put a button hidden on the pdf and then fire the click event
somehow on that button to run my script?

 

I am using Adobe Pro 9 to create my PDF's.

 

Please help

 

Thanks

 

Manoj

 

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to