I have a wee program :
    public static void main(String[] args) {
        try {
 <35>           PdfReader reader = new PdfReader(new
FileInputStream("/home/dkr/Downloads/t4flat-fill-06b.pdf"));
            PdfStamper stamp = new PdfStamper(reader, new
FileOutputStream("/home/dkr/newStuff.pdf"));
            AcroFields form = stamp.getAcroFields();
            for (Iterator i = reader.getAcroForm().getFields().iterator();
i.hasNext();) {
                PRAcroForm.FieldInformation field =
(PRAcroForm.FieldInformation) i.next();
                field.getInfo();
                form.setField(field.getName(), "666");
            }
            stamp.close();
            return;
        } catch (DocumentException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null,
ex);
        } catch (IOException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null,
ex);
        }

which gets this error:
Exception in thread "main" java.lang.NoClassDefFoundError:
org/bouncycastle/asn1/ASN1OctetString
        at com.lowagie.text.pdf.PdfEncryption.<init>(Unknown Source)
        at com.lowagie.text.pdf.PdfReader.readDecryptedDocObj(Unknown
Source)
        at com.lowagie.text.pdf.PdfReader.readDocObj(Unknown Source)
        at com.lowagie.text.pdf.PdfReader.readPdf(Unknown Source)
        at com.lowagie.text.pdf.PdfReader.<init>(Unknown Source)
        at com.lowagie.text.pdf.PdfReader.<init>(Unknown Source)
        at itesttest.Main.main(Main.java:35)
I am using iText-2.1.5
and java 1.6 
"/home/dkr/Downloads/t4flat-fill-06b.pdf" can be found at
http://www.cra-arc.gc.ca/E/pbg/tf/t4_flat/README.html
This code will read /home/dkr/Downloads/t4flat-06b.pd (found at the same
page) just fine but...

Is this problem documented some where? 
Any ideas on how to fix this?

Thank you for your time.
BCCanuck

-- 
View this message in context: 
http://www.nabble.com/PdfReader-hates-me-tp23638033p23638033.html
Sent from the iText - General mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to