PDFsharp & MigraDoc Forum

PDFsharp - A .NET library for processing PDF & MigraDoc - Creating documents on the fly
It is currently Wed Dec 17, 2025 2:34 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules

Also see our new Tailored Support & Services site.



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Fri Oct 19, 2012 12:21 pm 
Offline

Joined: Tue Oct 16, 2012 7:29 am
Posts: 6
Is there a way to escape to a different format with DrawString?

For example I might want to italicize v in the following:

string s = "A mathematical expression with a variable, \EscapeFormat{v} = \u03C1 ";
document.DrawString(s, point, format, escapeFormat[1]);

The unicode character specification goes fine with
XPdfFontOptions options = new XPdfFontOptions(PdfFontEncoding.Unicode);

But the question is: is there a way to escape to other formats using DrawString?
Are there other methods that would let me do that, or do I need to invent an escape mechanism myself?

/regards


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 22, 2012 7:55 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3139
Location: Cologne, Germany
Hi!
abam wrote:
Are there other methods that would let me do that, or do I need to invent an escape mechanism myself?
I'm afraid with PDFsharp you have to do the escaping yourself.
With MigraDoc, you can use AddFormattedText - or use the MDDDL format.
http://www.pdfsharp.net/wiki/MigraDocDDL.ashx

AFAIK you can read paragraphs from MDDDL, so your strings would have to be MDDDL paragraphs to keep parsing simple.
Or use your own escaping and convert the string to an MDDDL paragraph.

_________________
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: Google [Bot] and 293 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