Jump to content
We've recently updated our Privacy Statement, available here ×

Problem with PdfXConformanceException. Font related.


phnxck

Recommended Posts

Hi All,

I am trying to produce PDF file that satisfies PDF/A1a conformance. My main goal is to somehow embed extractable document structure inside it (also known as being 'tagged'/'Tagged PDF'), but I run in to a problem much earlier. When I try do generate the report, I get the following exception:

 

Exception in thread "main" com.lowagie.text.pdf.PdfXConformanceException: All the fonts must be embedded. This one isn't: Helvetica

at com.lowagie.text.pdf.internal.PdfXConformanceImp.checkPDFXConformance(Unknown Source)

at com.lowagie.text.pdf.PdfWriter.addSimple(Unknown Source)

at com.lowagie.text.pdf.PdfContentByte.setFontAndSize(Unknown Source)

at com.lowagie.text.pdf.PdfDocument.writeLineToContent(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at net.sf.jasperreports.engine.export.JRPdfExporter.writePageAnchor(JRPdfExporter.java:708)

at net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:632)

at net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:362)

at com.bms.goro.test.jasper.ReportGeneratorApp.generateReport(ReportGeneratorApp.java:53)

at com.bms.goro.test.jasper.ReportGeneratorApp.main(ReportGeneratorApp.java:32)

 

I do not use Helvetica font, so I am not trying to embed it anyhow. Moreover I have read that this font must not be embedded as it is one of Base14 fonts which are built in as default in pdf viewers.

 

The only reasonable topic about PDF/A I found is:

http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=92542

but still after reading it I am not able to resolve my problem. I am not sure if it is a matter of some configuration in code with exporter or maybe some configuration in iReport.

 

Below there is code that generates the report and simple jrxml temaplate code that I use (after compiling through iReport).

If it matters, I use iReport and JasperReports library both in 4.5.1 version. I also attach compressed full sources of my test (maven) project.

Code:

 



Post Edited by phnxck at 05/07/2012 14:44
Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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...