PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Mar 17, 2018 4:28 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
 Post subject: Get/set max table height
PostPosted: Wed Jan 17, 2018 9:39 am 

Joined: Wed Jan 17, 2018 9:31 am
Posts: 1
Hi all,

I've Googled and searched the forum for this, came across a few related posts, but couldn't make sense of them, really hoping someone can help me with this from the top!

So basically, I have a PDF document, into which I've added a bunch of tables. The tables are populated with user data, and therefore can vary in height.

What I need to do, is loop through the tables and get the maximum (rendered) height of each table, and then go back and set ALL the tables to be that height.

Is this possible? If so I'd really appreciate it if someone could post some code.

Many thanks,


Reply with quote  
PostPosted: Wed Jan 17, 2018 5:16 pm 
empira Employee
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 2794
Location: Cologne, Germany
bluezee wrote:
Is this possible?
Yes. After preparing a document with the PDF Renderer you can query the positions and sizes of all items.
Then you can set the heights of all tables and create the final PDF.

I don't have code for you. Tip: Before preparing the document to get the heights you should "Clone()" that document.

Thomas Hoevel
PDFsharp Team

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: Bing [Bot], Google [Bot] and 8 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:  
Powered by phpBB® Forum Software © phpBB Group