Hello,
We use a third party product to design and generate a pdf. Using the
third party product to design and produce the pdf is required because the
form designers are not technical and the third party application has a nice
design tool. The product builds a pdf then I use itext to copy the template
pdf, merge data from a database and present it in a browser to be signed.
I'm using itext to copy the template and merge the data with no problems.
However the form is produced with a button on it that has a mouse up action
with javascript. When I copy the template, I want to change the javascript
in the button. However I'm having some trouble getting down to the
/S/JAVASCRIPT/JS level of my field. I saw a similar example where someone
wanted to change a field to read only and I thought I could figure it out
from there, but haven't be able to. Here's where I was headed:
AcroFields form = stamp.getAcroFields();
AcroFields.Item item = form.getFieldItem("@(protected)");
for (int i = 0; i < item.merged.size(); ++i) {
PdfStream js =
(PdfStream)PdfReader.getPdfObject(((PdfDictionary)item.values.get(i)).get(PdfName.S));
not sure how to get to the JS level to get the code
((PdfDictionary)item.values.get(i).put(PdfName.JS, myjavascript);
}
Thanks for any help you can offer.
Joe
_________________________________________________________________
Don?t just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
iText-questions mailing list
iText-questions@(protected)
https://lists.sourceforge.net/lists/listinfo/itext-questions