logo       

Re: Adding form fields to a pdf: msg#00163

java.lib.itext.general

Subject: Re: 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.


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise