PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Aug 14, 2018 9:13 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: 2846
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: No registered users and 4 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