PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Fri Apr 19, 2024 5:55 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue Sep 08, 2015 6:23 pm 
Offline

Joined: Tue Sep 08, 2015 6:01 pm
Posts: 1
Hi Experts,

I'm trying to generate PDF (Off course using PDFSharp & MigraDoc), where it has to display some Non-English text but what I'm getting instead is set of Garbled characters.

For instance., If I try to display the string "MÍNGUEZ MIRALE", I get some garbled characters at the place of Latin character "Ã" and in text space. It seems like PDFSharp is floundering to parse such characters.

I tried with the sample code in this site and even passed unicode parameter as true to PDFDocumentRenderer constructor.

Code:
PdfDocumentRenderer pdfRenderer = new PdfDocumentRenderer(true, embedding);


Fed-up with the above effort, I moved ahead by changing the font type but it seems like Open Type fonts are not loading up. I tried a font "PMingLiU" :(

Can someone help us regarding this stuff and revert back asap, that would be grateful.

Thanks in advance.


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 09, 2015 7:48 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3096
Location: Cologne, Germany
Hi!

Not all Open Type fonts work with the GDI+ build. Maybe try the WPF build.
See also:
http://www.pdfsharp.net/wiki/PostScript_fonts.ashx

All Unicode characters up to 0xffff should work.


Your test string "MÍNGUEZ MIRALE" contains an invisible character after the "Ã" which PDFsharp renders as a rectangle. When you step through the string using Cursor Left and Cursor Right you will notice this extra character. Remove it and the output from PDFsharp will be correct.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 241 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group