This content has been marked as final.
Show 2 replies
-
1. Re: using Seam to fill in a PDF form
arissonleal Jul 18, 2008 1:41 PM (in response to hanabi)You can find some examples in your jboss-seam folder under the
examples/itext.Take a look at this chapter:
Chapter 17. iText PDF generation -
2. Re: using Seam to fill in a PDF form
damianharvey.damianharvey.gmail.com Jul 18, 2008 2:01 PM (in response to hanabi)AFAIK the docs don't cover PDF forms (or AcroForms or whatever Adobe calls them now).
More of an iText question really as there's no in-built functionality in Seam for this. Read the iText docs
Here's a basic code snippet that will get you started:
PdfReader reader = new PdfReader("input.pdf"); PdfStamper stamper = new PdfStamper(reader, new FileOutputStream("output.pdf")); AcroFields form = stamper.getAcroFields(); form.setField("SOME_FIELD", "Hello!"); stamper.setFormFlattening(true); stamper.close();
Cheers,
Damian.