cancel
Showing results for 
Search instead for 
Did you mean: 

Arabic isn't showing when exporting to PDF

Former Member
0 Kudos

Hi!

I'm using Crystal Report 13.0.5 with Asp.Net application. Reports are working fine with english language but with Arabic language it's not. When i tried to export the report to PDF it doesn't show the Arabic character only except Arabic everything works fine, however when i tried to export in Excel or Word format it works fine.

I'm using the following code to export to PDF

                    System.IO.MemoryStream oStream = (System.IO.MemoryStream)rpt.ExportToStream(ExportFormatType.PortableDocFormat);

                    Response.Clear();

                    Response.ContentEncoding = System.Text.Encoding.UTF8;

                  

                    Response.Buffer = true;

                    Response.ContentType = "application/pdf";

                    Response.BinaryWrite(oStream.ToArray());

                    Response.End();

same code but just changing the export format type to "ExportFormatType.Excel" works fine in excel.

Accepted Solutions (1)

Accepted Solutions (1)

János_at_SAP
Advisor
Advisor
0 Kudos

Hello,

Try to use unicode type fonts in the crystal reports, such as Arial Unicode.

Make sure, that the machine where you do the export has the font installed.  When you do an export from CR or CRV the export embedds the fonts into the PDF document.

Do the following test:

1. Open a new CR designer, and create a blank report without a data connection.

2. Put a text field inside, change the font to Arial Unicode MS, and enter some arabic text

3. Save the report, and add it to your application

4. start your ASP.NET application, and do the export to PDF

5. Open the PDF document  goto File->Properties->Fonts,and check your font type.

if the arabic still text is not shown in your report, please check the fonts in the control panel of the machine.

I hope it helps,

János


Former Member
0 Kudos

Thanks Janos, I've changed the font to Arial Unicode Ms and it works for me.

Answers (1)

Answers (1)

srinivasan_vinayagam
Active Contributor
0 Kudos

Hi Imtiaz,

Try this.

  • Open Adobe Reader.
  • Click on Edit > Preferences > International.
  • Next to "Application Language" select "Choose at Startup"
  • Click on OK to validate.
  • Restart Adobe reader and you shall get a small prompt allowing you to select the language of your choice.
Former Member
0 Kudos

Thanks but i only changed the font to Arial Unicode Ms on Crystal reports and it works for me.