PDFsharp & MigraDoc Foundation
http://forum.pdfsharp.de/

UTF8 and no latin chars problem
http://forum.pdfsharp.de/viewtopic.php?f=2&t=782
Page 1 of 1

Author:  fala70 [ Thu Jul 09, 2009 9:37 pm ]
Post subject:  UTF8 and no latin chars problem

I am trying to create a pdf wth a few strings no latin chars (russian chars). I am using gfxG.DrawString function.

all that I can see are "?" chars.

any idea ?

thanks
Stefano

Author:  mikesowerbutts [ Fri Jul 10, 2009 8:50 am ]
Post subject:  Re: UTF8 and no latin chars problem

are you using a font which contains the russian characters?

? symbols usually appear when the font being used does not contain the particular character you are trying to display. I tend to embed the appropriate unicode fonts in my PDFs or check if they are installed on a users system and use them in the PDF if they are installed.

Author:  fala70 [ Fri Jul 10, 2009 12:49 pm ]
Post subject:  Re: UTF8 and no latin chars problem

I tried to use serveral fonts, at last Courier New. Why using a Courier New I can see the correct string to video and with the same font is not showed on pdf ???
I've XP prof. english languages

Author:  mikesowerbutts [ Fri Jul 10, 2009 2:20 pm ]
Post subject:  Re: UTF8 and no latin chars problem

hi, im not too sure what you mean by "string to video"? I would recommend using Arial Unicode as your font - it is licenced, but it has a very large unicode character set. Also search google for russian fonts if you are just using russian as there will probably be a specific russian font which you could use which has no licencing. As russian contains a lot of double-byte characters (for the more complex symbols it uses) the fonts are likely to greatly increase the PDF's filesize, so make sure to only embed fonts if necessary - you can check to see if a user has a font installed on their PC through C# / VB. just have a look on google.

Author:  fala70 [ Fri Jul 10, 2009 2:32 pm ]
Post subject:  Re: UTF8 and no latin chars problem

I want mean that in my application, the string that I used to create the pdf is showed also correctly on ListBox that has a Courier New set font. I can't understand because is not printed correctly on pdf with the same font.

Other thing... At the moment I tested only the russian string, but I can have any language (arabic, china, korean...). I don't think that is a problem font, the standard font installed on windows should support already that charset.

Author:  Thomas Hoevel [ Mon Jul 13, 2009 9:47 am ]
Post subject:  Re: UTF8 and no latin chars problem

The Unicode sample that comes with PDFsharp demonstrates Russian (and Greek) characters in PDF documents.

CJK or Arabian characters are not yet supported properly.

Author:  fala70 [ Mon Jul 13, 2009 12:11 pm ]
Post subject:  Re: UTF8 and no latin chars problem

Thanks, now work :D

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/