wasegraves
Thu, 15 May 2008 16:52:08 -0700
-------------- Original message ----------------------
From: Leonard Rosenthol <[EMAIL PROTECTED]>
>
> On May 15, 2008, at 5:02 PM, [EMAIL PROTECTED] wrote:
> >> I do have an additional question.
> >>
> >> After I created the template and made it Reader Enabled, can I use a
> >> PdfStamper or PdfWriter to modify the textfields without breaking
> >> the Reader
> >> Enable?
> >
> > AFAIK, you should be able to "fill" the form fields with data
> > without breaking the form. Any changes to the AcroForm, other than
> > that should break it.
> >
> Nope :(.
>
My! A little brusque, aren't we? I stand on my original statement, as an
AcroForm *should* be fillable. The prhase "Any changes ..." above should be
obvious to an enlightened Guru such as you. Replacing a file is indeed a
change. ;-)
Your answer might have been seen in a more friendly light if you had answered,
"Yes, but ..."
> IF and ONLY IF you write the changes out as an "update" instead of a
> "replacement" AND you only change the things that are allowed...
>
> Leonard
Finally, your response would have been more helpful to the OP if you had
answered in the language of iText, e.g., append = true, not append = false, as
in the following example, based on the HelloWorldForm class in Chapter 2 of the
book, which correctly preserves the Reader-Enabled capability of the PDF:
reader = new PdfReader("t3b8-5x11a.pdf",
"ownerpassword".getBytes());
stamper = new PdfStamper(reader, new FileOutputStream(
"t3b8-5x11a_filled.pdf"),
reader.getPdfVersion(), true);
where "ownerpassword" has been inserted in place of the actual owner password.
Readers should review the current documentation for PdfStamper to understand
the above code.
Thank you for your comments, which gave me the motivation to work out the above
example.
Best regards,
Bill Segraves
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar