PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Mon Mar 30, 2020 10:13 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 

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.

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

Joined: Sat Mar 14, 2015 10:15 am
Posts: 532
Location: CCAA

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:

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

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