questions about create new forms without create new document(eg:radio buttons .check button.and so on)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

questions about create new forms without create new document(eg:radio buttons .check button.and so on)

TTDET
i have already ready this chapters" Manipulating existing PDF documents", in the chapter tell me how creating text fields、radio buttons check buttons 、list and combo box and so on.But these demo need create new document;just as:
step1: Document document = new Document();
step2:  PdfWriter writer =PdfWriter.getInstance(document, new FileOutputStream(filename));
stepn:writer..addAnnotation(radioGroup);(work fine)
:::::::::
i want to in existing pdf document,create new Forms. this is my code(when i create radio buttons ) :
step1:PdfReader pdfReader = new ITextPdfLoader(pdfSrc, getPassword()).getPdfReader();
step2:PdfStamper stamper = new PdfStamper(pdfReader, pdfOutStream);
step3:PdfWriter wirter =stamper.getWriter();
:           :         :
:          :          :
stepn:writer.addAnnotation(radioGroup);
in stepn,itext throw   "unsupported.in.this.context.use.pdfstamper.addannotation"、、、、、


Exception in thread "main" java.lang.RuntimeException: Unsupported in this context. Use PdfStamper.addAnnotation() 


what should i do ,to solve this questions,it's ready hard,please help me ,thanks、、、、、、

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
iText-questions mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: questions about create new forms without create new document(eg:radio buttons .check button.and so on)

iText mailing list
On 2/1/2016 5:37 AM, TTDET wrote:
i have already ready this chapters" Manipulating existing PDF documents", in the chapter tell me how creating text fields、radio buttons check buttons 、list and combo box and so on.But these demo need create new document;just as:
step1: Document document = new Document();
step2:  PdfWriter writer =PdfWriter.getInstance(document, new FileOutputStream(filename));
stepn:writer..addAnnotation(radioGroup);(work fine)
:::::::::
i want to in existing pdf document,create new Forms. this is my code(when i create radio buttons ) :
step1:PdfReader pdfReader = new ITextPdfLoader(pdfSrc, getPassword()).getPdfReader();
step2:PdfStamper stamper = new PdfStamper(pdfReader, pdfOutStream);
step3:PdfWriter wirter =stamper.getWriter();
:           :         :
:          :          :
stepn:writer.addAnnotation(radioGroup);
in stepn,itext throw   "unsupported.in.this.context.use.pdfstamper.addannotation"、、、、、

This is answered on the official web site for developers: http://developers.itextpdf.com/question/how-can-i-add-new-acroform-field-pdf


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
iText-questions mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Loading...