Print Page | Close Window

Problems with Unicode and ExportToDisk to PDF

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Writing Code
Forum Discription: .NET programming API, report integration
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=21727
Printed Date: 18 Apr 2024 at 7:51pm


Topic: Problems with Unicode and ExportToDisk to PDF
Posted By: kalliman
Subject: Problems with Unicode and ExportToDisk to PDF
Date Posted: 07 Oct 2015 at 8:14pm
I have a small program which prints a document, which contains Chinese and Arabic symbols and then saves it as PDF. Printing works perfect, but the generated PDF doesn't display the Chinese characters correctly.

Here is the sample pseudo code of my program

Code:
CrystalDecisions.CrystalReports.Engine.ReportDocument reportDocument = new ...;
...
reportDocument.PrintToPrinter(printersettings, pagesettings, false); // this works perfect. E.g. I have the Chinese printed via physical printer.
reportDocument.ExportToDisk(ExportFormatType.PortableDocFormat, m_FileName); // Here when open the pdf I see a squares instead of Chinese symbols.
I tried to change the font in rpt to "Arial Unicode MS" or "Lucida Sans" or to many other fonts, which should support Unicode but no effect. I can see the Araby letters, but cannot see the Chinese.
If I change the font to "MingLiU", the Chinese symbols are displayed OK in the PDF, but then I can't see the Arabic letters

Thanks in advance,
Kalin



Print Page | Close Window