Lucee 5.1 and PDF-Forms filling with lowagie.itext doesn't work

Hi everybody,
under lucee 4.5 I can fill pdf-forms with the itext feature:

<cfset
inFile=createObject(“java”,“com.itextpdf.text.pdf.PdfReader”).init(template)/>
<cfset stamper =
createObject(“java”,“com.itextpdf.text.pdf.PdfStamper”).init(inFile,outStream)
/>

If I try this under lucee 5.1 I get the error-message: Cannot load class
through its string name, because no definition for the class with the
specified name (com.itextpdef.text.pdf.PdfReader) could bei found caused by
(java.lang.ClassNotFoundException:com.itextpdf.text.pdf.PDFReader not found
bei lucee.core [64] …

In Lucee Server Administrator it looks like if the lowagie.itext-Bundle is
not loaded (under Info -> Bundle (jar). I don’t know, how to force it to
load.

I’m testing Lucee 5.1.0.31-BETA under Windows Server 2012 R2 (6.3) 64bit.

Any suggestions, tipps?

Thank you

Michael

Depending on the version of itext, the classname may be
“com.lowagie.text.pdf.PdfReader” instead of
“com.itextpdf.text.pdf.PdfReader”

Or you could rather use: https://github.com/MitrahSoft/lucee-cfpdfform -
it uses PDFBox instead of itext.On Monday, September 26, 2016 at 11:26:11 AM UTC-4, Michael Vornkahl wrote:

Hi everybody,
under lucee 4.5 I can fill pdf-forms with the itext feature:

<cfset
inFile=createObject(“java”,“com.itextpdf.text.pdf.PdfReader”).init(template)/>
<cfset stamper =
createObject(“java”,“com.itextpdf.text.pdf.PdfStamper”).init(inFile,outStream)
/>

If I try this under lucee 5.1 I get the error-message: Cannot load class
through its string name, because no definition for the class with the
specified name (com.itextpdef.text.pdf.PdfReader) could bei found caused by
(java.lang.ClassNotFoundException:com.itextpdf.text.pdf.PDFReader not found
bei lucee.core [64] …

In Lucee Server Administrator it looks like if the lowagie.itext-Bundle is
not loaded (under Info -> Bundle (jar). I don’t know, how to force it to
load.

I’m testing Lucee 5.1.0.31-BETA under Windows Server 2012 R2 (6.3) 64bit.

Any suggestions, tipps?

Thank you

Michael

Hi Sean,
thank you very much!!!
The solution is to change the classname
into “com.lowagie.text.pdf.PdfReader”.
I will change to lucee 5.1 after the release is ready for production.

MichaelAm Dienstag, 27. September 2016 09:02:10 UTC+2 schrieb Sean S:

Depending on the version of itext, the classname may be
“com.lowagie.text.pdf.PdfReader” instead of
“com.itextpdf.text.pdf.PdfReader”

Or you could rather use: https://github.com/MitrahSoft/lucee-cfpdfform -
it uses PDFBox instead of itext.

On Monday, September 26, 2016 at 11:26:11 AM UTC-4, Michael Vornkahl wrote:

Hi everybody,
under lucee 4.5 I can fill pdf-forms with the itext feature:

<cfset
inFile=createObject(“java”,“com.itextpdf.text.pdf.PdfReader”).init(template)/>
<cfset stamper =
createObject(“java”,“com.itextpdf.text.pdf.PdfStamper”).init(inFile,outStream)
/>

If I try this under lucee 5.1 I get the error-message: Cannot load class
through its string name, because no definition for the class with the
specified name (com.itextpdef.text.pdf.PdfReader) could bei found caused by
(java.lang.ClassNotFoundException:com.itextpdf.text.pdf.PDFReader not found
bei lucee.core [64] …

In Lucee Server Administrator it looks like if the lowagie.itext-Bundle
is not loaded (under Info -> Bundle (jar). I don’t know, how to force it to
load.

I’m testing Lucee 5.1.0.31-BETA under Windows Server 2012 R2 (6.3) 64bit.

Any suggestions, tipps?

Thank you

Michael