[EMAIL PROTECTED] wrote:
> Hello,
> 
> I want to fill out PDF forms as described in Chapter 16.
> I tried both scribus and Acrobat to create a formular, but when trying  
> to fill out

I make my own AcroForms with OpenOffice:
http://1t3xt.info/examples/browse/?page=example&id=330

>   I get the following exception:
> 
> This AcroFields instance is read-only.
> java.lang.RuntimeException: This AcroFields instance is read-only.
>          at com.lowagie.text.pdf.AcroFields.setFieldProperty(Unknown Source)
>          at com.prostep.pdmpackage.PdfPackaging.pack(PdfPackaging.java:132)
>          at  
> com.prostep.pdmpackage.PdfPackagingTest.test001Pack(PdfPackagingTest.java:63)
>
> What is needed to either create the PDF with read/write formular  
> fields or remove the read only flag ?

Er... the problem isn't with your PDF.

The problem is that you are using setField on the read only
AcroFields instance obtained from PdfReader. Have a closer
look at the examples in the book. You need the AcroFields
instance obtained from PdfStamper.

stamper.getAcroFields() instead of reader.getAcroFields()

br,
Bruno

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
iText-questions mailing list
[email protected]
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

Reply via email to