PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Mar 28, 2024 11:45 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Fri Nov 07, 2014 11:41 am 
Offline

Joined: Fri Nov 07, 2014 11:22 am
Posts: 2
Good day.
I use MigraDoc to create PDF documents. The approximate form of the document in the attached image. Please tell me how to add a row with subtotals on every page, because MigraDoc does not know which page it is (That right?). Tried to count rows, but the height of each row variable.


Attachments:
File comment: form of the document
migradoc_problem.png
migradoc_problem.png [ 9.56 KiB | Viewed 8520 times ]
Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 10, 2014 1:46 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3095
Location: Cologne, Germany
Hi!
mshak wrote:
Please tell me how to add a row with subtotals on every page, because MigraDoc does not know which page it is (That right?).
MigraDoc was designed to create documents that can be rendered in various output formats. MigraDoc has sections and page breaks, but pages do not exist for MigraDoc.
There is no easy way to get what you want.

What I would try: I'd increase the bottom margin to make space for the summary, render the document with the tables to let the renderer make the page breaks.
Then I'd create a new document with a new table for each page, adding the rows, the summary row, and a page break.

You can use the Tag property to identify your data. You could add the row number as Tag to the first paragraph in the first column of each row.
You can call the GetDocumentObjectsFromPage method supplied by the renderer to find which rows are on which page.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 01, 2014 2:46 pm 
Offline

Joined: Fri Nov 07, 2014 11:22 am
Posts: 2
Thomas Hoevel, thank you very much. This solution works very well.


Top
 Profile  
Reply with quote  
PostPosted: Mon Jan 30, 2023 12:31 pm 
Offline

Joined: Mon Jan 30, 2023 12:28 pm
Posts: 1
hi mshak, how you solve this, does each page have the same row of data or maybe different, can you give me some advice. thx


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 12, 2023 9:40 am 
Offline

Joined: Mon Oct 09, 2023 12:42 pm
Posts: 10
I'm also curious about the solution. Do you have an example to show?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 182 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