PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Fri Mar 29, 2024 12:07 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Fri Nov 18, 2016 9:42 pm 
Offline

Joined: Fri Nov 18, 2016 9:31 pm
Posts: 2
Hello. Thank you for your product

The XGraphics drawstring does not wrap, whereas the XTextFormatter does. Is there any way to tell XTextFormatter.DrawString to insert 5 points between each line, for example? The wrapping works well, but the lines are too close together for my need

Note: I cannot install other dlls and am using production version 1.32.3057.0 of PdfSharp

Thank you
Daniel


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 19, 2016 8:18 am 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 909
Location: CCAA
Hi!

achoo54321 wrote:
Is there any way to tell XTextFormatter.DrawString to insert 5 points between each line, for example?

Use my XTextFormatterEx2 class:
http://developer.th-soft.com/developer/ ... 50-beta-2/

achoo54321 wrote:
Note: I cannot install other dlls and am using production version 1.32.3057.0 of PdfSharp
If you cannot switch to PDFsharp 1.50, then get the PDFsharp 1.32 source code and adopt my class for it (you need access to some internal properties).
PDFsharp 1.50 is better.

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


Top
 Profile  
Reply with quote  
PostPosted: Tue Nov 29, 2016 7:21 pm 
Offline

Joined: Fri Nov 18, 2016 9:31 pm
Posts: 2
Ok thanks for your time

I'm sure using another existing library would be ideal for some. My focus was to use the simplest routines possible and segregate the data from the routines specific to PDFsharp so I just created it manually using the XGraphics measurestring/drawstring ... I guess I just wanted to say that it was not as hard as I feared before I started (especially if you're already working on creating a PDF using low-level commands)

Daniel


Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 30, 2016 8:50 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3095
Location: Cologne, Germany
achoo54321 wrote:
My focus was to use the simplest routines possible and segregate the data from the routines specific to PDFsharp so I just created it manually using the XGraphics measurestring/drawstring ... I guess I just wanted to say that it was not as hard as I feared before I started (especially if you're already working on creating a PDF using low-level commands)
XTextFormatter and XTextFormatterEx2 use XGraphics.MeasureString and .DrawString, are open source, and can be used as they are or as a starting point for own code.

_________________
Regards
Thomas Hoevel
PDFsharp Team


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 143 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