Hi

I have a web application which has HTML forms for users to enter inputs into. The HTML forms send data to a servlet which uses itext to feed the data into PDF forms, and then flattens them. However, some of the forms run javascript for validation when opened which generally does something along the lines of disabling part of the form depending on user input. The PDFs were once where the users entered the data, but now that the HTML does that, there's no need for the PDFs to do so, especially if they're flattened and everything is disabled. But the javascript that remains causes erros because the form objects no longer exist.

Thanks!

Kim


On Mon, 13 Jun 2005, Leonard Rosenthol wrote:

At 11:59 AM 6/13/2005, Kimberly Kettner wrote:
Yes, it live in form objects, right?

       It can live in form objects.

       It can also live in Annotations, Bookmarks, Pages, Documents, etc.


So when I flatten it, the form objects aren't there anymore, so the javascript should be gone too.

Yes, I would expect that Form scripts have been removed when they are flattend.


But there seems to be some left, which must be called when the document opens.

       That's one place, sure...


In the PdfStamper class, there is a function addJavaScript(String js), which "Adds a JavaScript action at the document level", but how can I remove it?

Document level scripts live in the /JavaScript dict off of /Names dict off of the /Catalog dict. HOWEVER, a blanket removal of all scripts may not be what the user intended.

Also, again, there are other scripts that may be present in the PDF. What do you intend to do with those?


Leonard

---------------------------------------------------------------------------
Leonard Rosenthol                            <mailto:[EMAIL PROTECTED]>
Chief Technical Officer                      <http://www.pdfsages.com>
PDF Sages, Inc.                              215-938-7080 (voice)
                                            215-938-0880 (fax)






-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to