TTDET
2016-02-01 04:37:28 UTC
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¡¢¡¢¡¢¡¢¡¢¡¢
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¡¢¡¢¡¢¡¢¡¢¡¢