Dear Support,

I try to remove all the fields from the document
by using removeFieldsFromPage. I have problem.
Please give me help. Thanks,

yun wang

 

Here is my code:
// Get a from from a reader
PdfReader reader = new PdfReader( args[0] );
int pages = reader.getNumberOfPages();
                                        
PdfStamper stamp = new PdfStamper(reader, new
FileOutputStream("out.pdf") );
                                
AcroFields form = stamp.getAcroFields();
for(int i=1; i<= pages; i++)
form.removeFieldsFromPage(i);
                
stamp.close();


Here is my error message:

com.sun.java.util.collections.ConcurrentModificationException
        at
com/sun/java/util/collections/HashMap$HashIterator.next
      at
com/lowagie/text/pdf/AcroFields.removeFieldsFromPage
        at Class1.main





-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to