Skip to Content
Former Member
Sep 25, 2009 at 06:39 AM

Problem with PDF export and embedded font (characters disappear)


Designer: Crystal Reports 2008 SP 2

Engine: CR4E 2.0 SP2 (runtime_12.2.203)

Hi there!

we found a problem in the pdf export. It seems like there would be a problem with the embedded fonts, the problem is as follows:

Rpt file with, for example only a text box which contains the german string " Änderungs Schlüssel ".

Export the Rpt file with CR4E to a pdf file.

When we open the pdf file in Adope Reader 8, the text appears to be correct,

but if we print the PDF file from the Adope Reader, the text changes to " nderungs Schl sselu201C,

here we are missing ther german umlaute.

When we open the file for example with an alternative PDF reader like Foxit Reader, there they are also missing.

After i found some posts here in the forum, there are people facing the same problem, since i couldn't find a solution in the forum, we build a little workaround for it that works for us.

For all of you that have the same problem here the workaround:

We used the IText JAVA library, this jar can can help as to fix the PDF file so the text is displayed correctly.

Here the code:

ReportClientDocument doc = new ReportClientDocument();
doc.setReportAppServer(ReportClientDocument.inprocConnectionString);"C:\XY.rpt", OpenReportOptions._openAsReadOnly);

//... database logon,.....

InputStream inputStream = doc.getPrintOutputController().export(ReportExportFormat.PDF);
inputStream = PDFHealer.heal(inputStream);

//... write the stream some where