PDFsharp & MigraDoc Forum

PDFsharp - A .NET library for processing PDF & MigraDoc - Creating documents on the fly
It is currently Thu Apr 02, 2026 11:16 pm

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: Mon Oct 13, 2014 3:43 pm 
Offline

Joined: Mon Oct 13, 2014 3:42 pm
Posts: 10
How can I adjust the linespacing of text I'm generating in PDFSharp?



Code:
            XFont font_H5 = new XFont("Verdana", 11, XFontStyle.Regular);
            XTextFormatter tfD = new XTextFormatter(gfx);
            XRect rectD = new XRect(0, 170, 190, 600);
            gfx.DrawRectangle(XBrushes.Transparent, rectD);
            tfD.Alignment = XParagraphAlignment.Center;

            string servicesTXT = "";
            foreach (string service in servicesList)
            {
                servicesTXT += service;
                servicesTXT += "\n";
            }
            tfD.DrawString(servicesTXT, font_H5, XBrushes.Black, rectD, XStringFormats.TopLeft);


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 13, 2014 3:48 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3144
Location: Cologne, Germany
See also:
viewtopic.php?p=8554#p8554

_________________
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: AhrefsBot and 65 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