Jump to content
Changes to the Jaspersoft community edition download ×

PdfGlyphRenderer exception


Recommended Posts

Anytime I try to export a report to PDF I get this exception.

Could not initialize class net.sf.jasperreports.engine.export.PdfGlyphRenderer

Any idea, what is causing this and how to fix this?

Btw: I've tried JasperExportManager.exportReportToPdfFile, JasperExportManager.exportReportToPdfStream methods and also creating a JRPdfExporter settings input and output and then calling the exportReport method. I get the same exception all the time.

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Are you using JasperReports IO as you've tagged your question or are you actually writing your own program using JasperReports library. If the later, check that you haven't specified itext dependency beside the one jasperreports comes bundled with.

Link to comment
Share on other sites

Thank you very much for the reply.
I am writing a method that gets the JasperReport and exports it to HTML / PDF, because the preview generated has some problems with the arabic font . Export to PDF throws this exception and export to HTML work almost OK. It generates the HTML correctly, but when I print it (or export to PDF), co covers only (around) 80% of page. (I can give you more details if you want).

Here is the whole stact trace:
2019-04-08 09:13:38.130    23 LogTopic.Desktop.DESKTOP ERROR   Uncaught exception {EXCEPTION}
java.lang.NoClassDefFoundError: com/lowagie/text/pdf/PdfContentByte
    at net.sf.jasperreports.engine.export.PdfGlyphRenderer.determinePatchedItext(PdfGlyphRenderer.java:59)
    at net.sf.jasperreports.engine.export.PdfGlyphRenderer.<clinit>(PdfGlyphRenderer.java:52)
    at net.sf.jasperreports.engine.export.JRPdfExporter.initExport(JRPdfExporter.java:580)
    at net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:539)
    at net.sf.jasperreports.engine.JasperExportManager.exportToPdfFile(JasperExportManager.java:155)
    at net.sf.jasperreports.engine.JasperExportManager.exportReportToPdfFile(JasperExportManager.java:503)
    at octopus.client.print.PrintPreviewDialog.generatePreview(PrintPreviewDialog.java:520)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...