PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Apr 27, 2024 12:19 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: Thu Sep 07, 2023 7:02 pm 
Offline

Joined: Thu Sep 07, 2023 6:49 pm
Posts: 1
Hi, I see in previous versions of MigraDoc that there was the MigraDoc.DocumentObjectModel.TextMeasurement class to be able to use the MigraDoc font to measure string sizes. This doesn't appear to exist anymore, and I can't find the equivalent version (if one exists). I see that PDFsharp has XGraphics.CreateMeasurementContext, so I was wondering if I could somehow use that to measure strings instead (specifically, how do I get the underlying XFont that MigraDoc is using). The use case is that I'm trying to display a table with a lot of columns, and I'd like to dynamically change the font size to not have overflow. The built in wrapping is nice, but some values can't be wrapped.


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 07, 2023 7:15 pm 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 916
Location: CCAA
See here:
viewtopic.php?p=9390#p9390

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


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