macromedia.coldfusion.advanced_techniques
[Top] [All Lists]

Error accessing PDF files from Java

Subject: Error accessing PDF files from Java
From: "rgurganus"
Date: Thu, 14 Feb 2008 15:15:48 +0000 UTC
Newsgroups: macromedia.coldfusion.advanced_techniques

In CF7, I have a routine that opens submitted PDF files through Java to do some 
manipulation.  Similar to CF8 PDF manipulation, but more complex.  In almost 
all cases, it works fine, except two.

 For one, a submitted PDF was corrupted somehow -- I can't even open it with 
Acrobat.  On the line: "reader=pdfReader.init(pdfFile);" this returns the error 
below.  This is expected.  But with a couple other PDF's, that do open fine in 
Acrobat, I get the same error.  I even re-saved the PDF file to different 
versions of Acrobat, but java still complains.  Any ideas what causes this, or 
what to do to prevent it?

 reader=pdfReader.init(pdfFile);
 An exception occurred when instantiating a java object. The cause of this 
exception was that: .

 From the stack trace:
 java.lang.reflect.InvocationTargetException
        at sun.reflect.GeneratedConstructorAccessor48126.newInstance(Unknown 
Source)


<Prev in Thread] Current Thread [Next in Thread>