cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports: Missing UTF8 characters experienced during PDF Export

Former Member
0 Kudos

Hi,

      I've been troubleshooting this problem for a few days by now. And now it seems I've rounded up the problem to be due to PDF export. I have some middle english characters that are in the UTF-8 character set. For eg, Middle English yogh character -> ȝ. However, for some very strange reasons, I'm not seeing them turn up in my database fields in Crystal Report. But when I physically copied them into say a text object, then they look ok.

      

Here's what was displayed:

     

Notice the 2 circled text. They are the same middle english character but the latter one is from a database field and the header is where I copied the text into. I'm using the same font for both the header text and the details text. Arial Unicode MS and it is confirmed that the font supports the UTF-8 character in question.

I also double checked my object having that field, it is correctly set when I viewed via debugging mode. Also I have no trouble exporting the same report to Excel or Word. The character comes up right in both document format.

Thanks. Any help is greatly appreciated!!!

Oh yeah, here's the code snippet I'm using for the export:

fileName is just a string value. Nothing fanciful here in case you're wondering...

 

_report.ExportToDisk(ExportFormatType.PortableDocFormat, fileName);

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Hello Cheryl

What version of CR are you using?

And what is the database and connection method used?

Does the report work as expected inteh CR designer?

Is the issue exclusively present on export to PDF, or do you see the same issue in the CR viewer for .NET, export to xls, etc.?

Is this a web or a win app?

- Ludek

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

  

Former Member
0 Kudos

Hi Ludek,

     Thanks for your reply. Here're my responses:

    

- What version of CR are you using?

We're using CR Version 13 for VS2010.

- And what is the database and connection method used?

Actually, when I say database connection, they are merely DTOs in my application which I search

and connect to via the Database Expert. Later on, I bind the List<MyClassName> into the report datasource.

- Does the report work as expected inteh CR designer?

I didn't try this via the CR designer. I'm using VS2010 to work on the CR reports.

- Is the issue exclusively present on export to PDF, or do you see the same issue in the CR viewer for .NET, export to xls, etc.?

This is exclusive only to export to PDF I think. Because I tried exporting both to word and excel, it's both working fine for the same report. We didn't use CR viewer for this because we merely wanted to export this to PDF.

- Is this a web or a win app?

This is a web application but users do not see the web version of the report. We allow them to download the report via pdf.

Thanks. Hope this clarifies and I appreciate your help on this issue!!!

Cheers,

Cheryl

former_member183750
Active Contributor
0 Kudos

Hello Cheryl

The blocks or squares in place of text are due to a font not embedding properly, or the font is corrupt. I don't think corruption is an issue (but that may depend on how the font was installed), but I do wonder if this is more of a Adobe font permissions / type issue(?).

Make sure the font it unicode true type. Then have a look at the following link to see if that utility helps:

http://www.microsoft.com/typography/property/fpedit.htm

I am not sure if Process Monitor will tell you anything about permissions, but it may be worth trying.

Another link that may help:

http://support.microsoft.com/kb/827809

Adobe may also have some ideas.

- Ludek

former_member183750
Active Contributor
Former Member
0 Kudos

Hi Ludek,

     Many thanks once again to your replies. I've tried all suggestions as above. But I've checked the fonts in my PDF and they are correctly recognised it seems.

    I've checked and confirmed that this is a true type font and supports the character. The strange thing is that if it's a fixed text then the character is appearing. Hmmm... really at my wits end...

     Let me know if you have any more ideas. I'll post something on Adobe forum.

Cheers,

Cheryl

0 Kudos

Hi Cheryl,

The problem is when you simply copy the character into CR Designer it comes in as a "picture" of the character. If it's coming from a database then you need to configure the DB Client to do the interpretation, you'll have to ask your DBA or check the help file on how to for your DB. Example is Oracle, if configured the Client will interpret Japanese or Chinese characters into usable characters for Windows to use, if not then they will show up as boxes in the viewer and when exporting.

Or you need to select a font that does support Middle English, I don't believe Ariel Unicode does actually. If you run Character Map in Windows and look for Unicode 021D you won't find it. Other fonts will have it, and then in Windows it will map the Glyphs to a font, not sure how Windows decides which one to use though, Tahoma seems to be a common one for them to use.

What you need to do is go back to the people who entered the data into the DB and find out what font they used, copy the font to Windows and set it in CR then it should work when exporting to Adobe, maybe...

I found the character and disovered by using ChrW (541) in a CR formula and setting the font to "Palatino Linotype" font according to this link:

http://home.ix.netcom.com/~kiyoweap/font-stuff.htm#yogh

I see the character in CR designer now. Problem is Adobe doesn't know what to do with that Font selection. I Searched Adobe's forum and found they have a font that will support Middle English but it's not free.

In Adobe viewer I see a spiral character indicating Adobe or windows is not mapping the character correctly. But depending on how I copy and set the text box depends on it exporting to PDF. Unfortunately I can't see to figure out what I did to make it work, another one of those back ground windows things that today it works tomorrow or after a reboot it may not...

I'm not sure how we can help you, simply copying the characters into a text box is not a valid test... You are simply copying a "bitmap" or pixel copy of the character, CR has no font associated with it...

Sorry to make even more confusing....

Don

Former Member
0 Kudos

Hi Don,

     A big thank you for your reply. At least you help us unravel the mystery of why it works when we copy it simply as text. I did try searching for the character inside character map and you're right that Arial Unicode MS doesn't seem to have it.

     I thought using Arial Unicode MS in Word and HTML was enough to sorta proved that the character is included in this font.

    In any case, I think the best bet for us would be to stick to Arial Unicode MS font since it comes free and I doubt any business plan reports would really include Middle english characters. Let's really hope not!

     Thanks!

Cheers,

Cheryl

Answers (0)