PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Wed Nov 20, 2019 4:39 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: Fri Aug 14, 2009 5:24 pm 
Offline

Joined: Thu Mar 05, 2009 9:27 am
Posts: 2
Hi

What is the solution to use replacement characters for fonts that don't have all the symbols defined (Eg some fonts don't have *&%^$ symbols defined and the PDF is generated with some replacepent chars (some sqares for all the missing fonts))
In GDI+ I noticed that the missing symbols are replaced with the corresponding symbols from a standard family, but PDFSharp generated documents are not rendered this way.

Hope there is a solution to this (other than using only fully defined fonts :) ).

Thanks,
Tudor


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 17, 2009 9:45 am 
Offline

Joined: Thu Mar 05, 2009 9:27 am
Posts: 2
Possible solution found

Instead of using
gfx.DrawString(TextX, font, gdiBrush, elementLeft, elementTop);

use
XGraphicsPath path = new XGraphicsPath();
path.AddString(TextX, FontFamily, fontstyle, Size, new XPoint(elementLeft, elementTop), new XStringFormat());
gfx.DrawPath(gdiBrush, path);

Code might not be correctly syntactic but I think you got the idea.

Let me know if there are alternatives.


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 275 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