That's easy with PdfStamper.
AcroFields af = stamper.getAcroFields();
AcroFields.Item item = af.getFieldItem("submit"); //your submit field
name
PdfDictionary w = (PdfDictionary)item.widgets.get(0); //repeat from
0-size()
PdfDictionary a =
(PdfDictionary)PdfReader.getPdfObject(w.get(PdfName.A));
PdfDictionary f = new PdfDictionary();
f.put(PdfName.FS, PdfName.URL);
f.put(PdfName.F, new PdfString("http://myurl.com"));
a.put(PdfName.F, f);
You need to add error checks, etc.
Best Regards,
Paulo Soares
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of [EMAIL PROTECTED]
> Sent: Thursday, March 25, 2004 10:46 AM
> To: [EMAIL PROTECTED]
> Subject: [iText-questions] auto change of sumbit url
>
> Hi.
>
> I want to use iText to modify existing PDF files.
> All of these PDF files have Form fields.
> Also a Submit button which leads to an URL.
> Is there a way to automatic change this URL in all PDF Files.
> If yes, can you give me some sample lines?
>
> Thankx a lot
>
> Philipp Schneider
> from Germany
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
>
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions