PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Get/set max table height
https://forum.pdfsharp.net/viewtopic.php?f=2&t=3711
Page 1 of 1

Author:  bluezee [ Wed Jan 17, 2018 9:39 am ]
Post subject:  Get/set max table height

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,

Rob

Author:  Thomas Hoevel [ Wed Jan 17, 2018 5:16 pm ]
Post subject:  Re: Get/set max table height

Hi!
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.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/