PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun Sep 22, 2019 3:39 am

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: Mon Dec 19, 2016 4:01 am 
Offline

Joined: Tue Dec 08, 2009 10:05 am
Posts: 19
With migradoc does there exist anything that will help me understand how much space a paragraph is taking up? I've got a scenario where I have some text and I need to resize an image to reasonably fit in the remaining space on a page.

I found routines that would do this... but required xgraphics and straight pdfsharp. Im assuming migradoc rendering has to know when to draw page headers and footers and such... you'd have to be able to measure the height of paragraphs etc.

Any guidance here would be helpful.


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 19, 2016 6:34 pm 
Offline
PDFsharp Expert
User avatar

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

MigraDoc determines sizes and positions when the PdfDocumentRenderer prepares the document.
With PDFsharp 1.50 you can easily access the positions and sizes of all items.

Then you can add the image using PDFsharp methods (XGraphics) or add the image using MigraDoc methods and start the renderer again.

See also:
viewtopic.php?p=9694#p9694

_________________
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 2 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