#1 2016-11-12 03:23:32

dbetts
Member
Registered: 2016-11-12
Posts: 3

Unicode Strings in PreviewForm

When I add this code:

DrawTextAt('普罗朗生物电导扫描仪检测报告单', 80);
...
EndDoc;
ShowPreviewForm;

The Preview Form only shows [] or ?? instead of the Chinese characters. However when printing the PDF from the Preview Form, the Chinese characters show up as expected.

What might I need to do in Delphi 2009 (with Unicode) to see the Chinese characters within the Preview Form?
Chinese characters are showing up everywhere else throughout our application, just not in the Preview form.

I have tried the following:
* File Format of the source file is UTF-8
* Tried applying all of the available character conversion functions to the Chinese characters

EDIT: I have added a link to an image to better show the problem we are trying to solve:
InvalidChars.png

Last edited by dbetts (2016-11-14 16:30:30)

Offline

#2 2016-11-14 16:58:59

dbetts
Member
Registered: 2016-11-12
Posts: 3

Re: Unicode Strings in PreviewForm

Problem was solved by setting the font from the default to this:

Font.Name := 'Arial Unicode MS';

After that, the preview showed the characters as expected.

Offline

Board footer

Powered by FluxBB