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

Adding page totals
https://forum.pdfsharp.net/viewtopic.php?f=2&t=2575
Page 1 of 1

Author:  dimmal [ Wed Sep 18, 2013 6:43 am ]
Post subject:  Adding page totals

Hello there!!

I need to export an invoice as a .pdf file. This Includes records that will very likely extend beyond one page, so we need a sum per page at the end of each page. I think, as I have searched through this forum, that there is no way to know when a table will page-break, right? Any suggestions on how to achieve that? Any way to know when the page will break inside a table?

thanx in advance!!

Author:  Thomas Hoevel [ Wed Sep 18, 2013 9:20 am ]
Post subject:  Re: Adding page totals

dimmal wrote:
Any way to know when the page will break inside a table?
No.

If all items have the same height, just figure out how many items fit one page and start a new page/a new table when needed.

If items have varying heights, measure the height of each item and start a new page/a new table when needed.

Or do a hack: add each item in a new table (without header) and add a tag to each item. After rendering the PDF, you can use PDFsharp to add the table headers and the page sums.

See also:
http://www.pdfsharp.net/wiki/MixMigraDo ... ample.ashx

Author:  dimmal [ Wed Sep 18, 2013 10:19 am ]
Post subject:  Re: Adding page totals

Thanx a lo for your quick answer!

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