HtmlArea

DynamicPDF Generator for Java (v10) Forum

 Mar 22 2021 3:50 PM
Trying to add an HtmlArea to a PDF and it is throwing an exception...

HtmlArea htmlArea = new HtmlArea("<b>This is a test.</b>", 0, 0,500,650);
objPage.getElements().add(htmlArea);

WARNING: java.lang.NullPointerException
        at com.cete.dynamicpdf.text.y.a(Unknown Source)
        at com.cete.dynamicpdf.text.y.a(Unknown Source)
        at com.cete.dynamicpdf.text.y.a(Unknown Source)
        at com.cete.dynamicpdf.text.y.a(Unknown Source)
        at com.cete.dynamicpdf.text.y.searchByFamilyAndSubFamilyName(Unknown Source)
        at com.cete.dynamicpdf.pageelements.html.fn.a(Unknown Source)
        at com.cete.dynamicpdf.pageelements.html.fn.a(Unknown Source)
        at com.cete.dynamicpdf.pageelements.html.gz.a(Unknown Source)
        at com.cete.dynamicpdf.pageelements.html.a6.a(Unknown Source)
        at com.cete.dynamicpdf.pageelements.html.U.c(Unknown Source)
        at com.cete.dynamicpdf.pageelements.html.ab.a(Unknown Source)
        at com.cete.dynamicpdf.pageelements.html.HtmlArea.j(Unknown Source)
        at com.cete.dynamicpdf.pageelements.html.HtmlArea.i(Unknown Source)
        at com.cete.dynamicpdf.pageelements.html.HtmlArea.drawRotated(Unknown Source)
        at com.cete.dynamicpdf.pageelements.RotatingPageElement.draw(Unknown Source)
        at com.cete.dynamicpdf.pageelements.Group.draw(Unknown Source)
        at com.cete.dynamicpdf.Page.drawAppend(Unknown Source)
        at com.cete.dynamicpdf.Page.a(Unknown Source)
        at com.cete.dynamicpdf.Page.a(Unknown Source)
        at com.cete.dynamicpdf.io.K.i(Unknown Source)
        at com.cete.dynamicpdf.io.K.draw(Unknown Source)
        at com.cete.dynamicpdf.Document.a(Unknown Source)
        at com.cete.dynamicpdf.Document.drawToWeb(Unknown Source)
        at com.donations4education.printoutCreator.doGet(printoutCreator.java:455)
 Mar 23 2021 1:36 PM
Posted by a ceTe Software moderator
Hello,

We tested the latest version (v10.09) of DynamicPDF Generator/Merger for Java and are unable to recreate the error. We used the code sample posted above.

Please try using latest jar file in your application and see if it works for you. You can download the latest from our website here.

Thanks,
ceTe Software Support Team

All times are US Eastern Standard time. The time now is 6:08 AM.