m_cannon wrote: > I'm embedding my pdf w/in an iframe in my web application and have a standard > html toolbar that contains a submit button. Is it possible to submit the > pdf via javascript onClick of the html button?
It's possible, but it's not obvious, and you should expect it to work on every possible browser/reader configuration combination. I've made an example of browser->reader communication here: http://itext.ugent.be/playground/agreement.html When you click on the 'Browse Course' button, a new browser window opens. You pick a course, click OK and the course you selected is added to the PDF form. By changing the JavaScript you could also trigger a Submit. I've also made an example of reader->browser communiction: http://itext.ugent.be/playground/talk_to_html.html You write something in the PDF field right before the OK button, you click OK and the text is transmitted from the PDF form to the HTML form. How is it done? Unfortunately I've lost the JAVA code for the example, so I should write a new set of examples, but if you look at the Javascript code in the HTML, you can see that a message handler is created. You need a similar message handler in the PDF. This message handler will be able to accept messages from the HTML page and trigger JS methods (for instance Submit a form) when necessary. Note that I wrote these examples for experimental purposes. I wouldn't use these features in a professional production environment. br, Bruno ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Do you like iText? Buy the iText book: http://www.1t3xt.com/docs/book.php Or leave a tip: https://tipit.to/itexttipjar
