I'm getting an exception in the following program that has me baffled.  Any
help would be greatly appreciated.  The stack trace is:
------------------------------
java.lang.ClassCastException
 at com.lowagie.text.pdf.PdfReader.getPageContent(PdfReader.java:865)
 at com.lowagie.text.pdf.PdfStamperImp.alterContents(PdfStamperImp.java:207)
 at com.lowagie.text.pdf.PdfStamperImp.close(PdfStamperImp.java:100)
 at com.lowagie.text.pdf.PdfStamper.close(PdfStamper.java:117)
 at StampErr.main(StampErr.java:20)
------------------------------
The input PDF form, OSR-1.pdf, is available from:
http://www.northwestern.edu/orsp/docs/OSR-1.pdf

import java.io.*;
import com.lowagie.text.*;
import com.lowagie.text.pdf.*;
public class StampErr
{
 public static void main(String[] args)
 {
  try {
        PdfReader reader = new PdfReader("C:\\OSR-1.pdf");
        PdfStamper stamp = new PdfStamper(reader, new
FileOutputStream("c:\\aaa.pdf"));

        stamp.setFormFlattening(true);
        stamp.close();
  }
  catch(Exception e) {
        e.printStackTrace();
  }
 }
}

Thanks.
Sam Quiring




-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to