|
Re: Adding form fields to a pdf: msg#00165java.lib.itext.general
getOverContent() only returns null if the page is invalid. I just tried your code without any problems. Best Regards, Paulo Soares ----- Original Message ----- From: "Vincent Demarcus" <vdemarcu@xxxxxxxxx> To: <itext-questions@xxxxxxxxxxxxxxxxxxxxx> Sent: Tuesday, June 10, 2003 20:58 Subject: Re: [iText-questions] Adding form fields to a pdf > ok, adding form fields is not supported.... > but even if I try to add something else (like a pdf template) it is not > working because cb (see below ) is null... > > any clues? > -- > Vincent > > PdfReader pdf_reader; > FileOutputStream pdf_os; > pdf_reader = new PdfReader(pdf_file); > pdf_os = new FileOutputStream(dest_file); > PdfStamper stamper = new PdfStamper(pdf_reader, pdf_os); > > int nb_pages = pdf_reader.getNumberOfPages(); > for (int i=1;i<=nb_pages;i++) { > PdfContentByte cb = stamper.getOverContent(i); // <== *cb is > here* > //System.err.println("cb: "+cb); > //*add smth here!!!* > } > stamper.close(); > > > > > Paulo Soares wrote: > > >Adding new fields in PdfStamper is not yet supported but there's work > >underway to do it. > > > >Best Regards, > >Paulo Soares > > > >----- Original Message ----- > >From: "Vincent Demarcus" <vdemarcu@xxxxxxxxx> > >To: <itext-questions@xxxxxxxxxxxxxxxxxxxxx> > >Sent: Tuesday, June 10, 2003 17:28 > >Subject: [iText-questions] Adding form fields to a pdf > > > > > > > > > >>Hi, > >> > >>I need to add a hidden form field and a HtmlPostField on each page of > an > >> > >>existing pdf document (contains form fields). > >> > >> From what I read in the documentation, I need to use the PdfStamper > >>Class: > >>I guess my code will look like: (I need help on *add my forms > here!!!*) > >>Thanks for your help > >>-- > >>Vincent > >> > >> PdfReader pdf_reader; > >> FileOutputStream pdf_os; > >> pdf_reader = new PdfReader(pdf_file); > >> pdf_os = new FileOutputStream(dest_file); > >> PdfStamper stamper = new PdfStamper(pdf_reader, pdf_os); > >> > >> int nb_pages = pdf_reader.getNumberOfPages(); > >> for (int i=1;i<=nb_pages;i++) { > >> PdfContentByte cb = stamper.getOverContent(i); > >> //*add my forms here!!!* > >> > >> } > >> > >> > >> > >>------------------------------------------------------- > >>This SF.net email is sponsored by: Etnus, makers of TotalView, The > best > >>thread debugger on the planet. Designed with thread debugging features > >>you've never dreamed of, try TotalView 6 free at www.etnus.com. > >>_______________________________________________ > >>iText-questions mailing list > >>iText-questions@xxxxxxxxxxxxxxxxxxxxx > >>https://lists.sourceforge.net/lists/listinfo/itext-questions > >> > >> > >> > > > > > > > >------------------------------------------------------- > >This SF.net email is sponsored by: Etnus, makers of TotalView, The > best > >thread debugger on the planet. Designed with thread debugging features > >you've never dreamed of, try TotalView 6 free at www.etnus.com. > >_______________________________________________ > >iText-questions mailing list > >iText-questions@xxxxxxxxxxxxxxxxxxxxx > >https://lists.sourceforge.net/lists/listinfo/itext-questions > > > > > > > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Etnus, makers of TotalView, The best > thread debugger on the planet. Designed with thread debugging features > you've never dreamed of, try TotalView 6 free at www.etnus.com. > _______________________________________________ > iText-questions mailing list > iText-questions@xxxxxxxxxxxxxxxxxxxxx > https://lists.sourceforge.net/lists/listinfo/itext-questions > ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com.
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: easy way of merging different pages, Leonard Rosenthol |
|---|---|
| Next by Date: | RE: filling PDF forms, piotr krudysz |
| Previous by Thread: | Re: Adding form fields to a pdf, Vincent Demarcus |
| Next by Thread: | PDF merge, Michael Ackmann |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |