Hi all,

I'm trying to edit a pdf form that should change address of submission
through a windows form, written in c#.

below my pseudo code:

PdfReader reader = new PdfReader("C:\\template.pdf");
            PdfStamper stamper = new PdfStamper(reader,
            new FileStream("C:\\result.pdf", FileMode.OpenOrCreate));

            AcroFields acfields = stamper.AcroFields;
            acfields.RemoveField("HTTPSubmitButton1");

            string url = "www.url.org"//from interface
            PushbuttonField button1 = new PushbuttonField(stamper.Writer,
new iTextSharp.text.Rectangle(480, 10, 555, 30), "submitPOST");
            button1.BackgroundColor=(BaseColor.GRAY);
            button1.BorderColor = BaseColor.BLACK;
            button1.Text=("post form");
            button1.Options=(PushbuttonField.VISIBLE_BUT_DOES_NOT_PRINT);
            PdfFormField submit1 = button1.Field;
            submit1.Action=(PdfAction.CreateSubmitForm(url,
null,PdfAction.SUBMIT_HTML_FORMAT ));//| PdfAction.SUBMIT_COORDINATES));
            stamper.AddAnnotation(submit1, 1);
            stamper.Close();

with this code my pdf have a new button but if I press it there are not any
event and my form is not sent to the server. 

the most strange thing is that if i try to open my PDF "result.pdf" with
acrobat writer I cannot see my new button and I see the old one!! 

Any suggestion for me?

thank you in advance,

-- 
View this message in context: 
http://itext-general.2136553.n4.nabble.com/Changing-Submitbutton-Url-tp2336521p2336521.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
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