mandar.jagtap wrote:
> Hi, I am trying to add a pushbutton using stamper on specific page. I am
> trying like this but not working. I can't any button in pdf output and I am
> not getting any error also. Could somebody help me to resolve this?
> 
> PushbuttonField submitBtn = new PushbuttonField(stamp.getWriter(), new
> Rectangle(lowerLeftX,lowerLeftY,lowerLeftX + 20,lowerLeftY + 20),"Play_");
> 
> PdfFormField submitField = submitBtn.getField();
> 
> submitField.setAction(PdfAction.createSubmitForm("http://www.test.com/submit.php";,
> null, PdfAction.SUBMIT_PDF));
>                                               
> stamp.addAnnotation(submitField, 2);

You're doing it like this:
http://1t3xt.info/examples/browse/?page=example&id=279
and the online example works.

HOWEVER: if you want to add the button to page 2 instead of page 1;
you'll need to upgrade to iText 2.1.5 because earlier versions had
a bug: the annotation was added to page 1 no matter what.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to