PDFsharp & MigraDoc Forum https://forum.pdfsharp.net/ |
|
MigraDoc: Multiple page invoice https://forum.pdfsharp.net/viewtopic.php?f=2&t=1623 |
Page 1 of 1 |
Author: | sfvaleriano [ Mon Apr 18, 2011 4:55 pm ] |
Post subject: | MigraDoc: Multiple page invoice |
Hello, How to print a total field only on last page of mutiple page invoice? thanks, Valeriano |
Author: | Thomas Hoevel [ Tue Apr 19, 2011 8:20 am ] |
Post subject: | Re: MigraDoc: Multiple page invoice |
Total pages? There is a field that you can add to any paragraph. Add it to a paragraph on the last page. If you add it to header or footer, it'll show on any page. You can add a TextFrame to the last page to show the total add a fixed position. |
Author: | sfvaleriano [ Tue Apr 19, 2011 10:15 am ] |
Post subject: | Re: MigraDoc: Multiple page invoice |
sorry, i refer to the total of invoice. Into footer section i've a table with the total of invoice (and other informaiton). If the invoce has two or more pages the total of invoice must be only in the last page. thanks Valeriano |
Author: | Thomas Hoevel [ Tue Apr 19, 2011 1:42 pm ] |
Post subject: | Re: MigraDoc: Multiple page invoice |
As I wrote: don't put it in the footer, add it to the last page only. Use a TextFrame to have it at a certain position. |
Author: | sfvaleriano [ Mon May 23, 2011 9:47 am ] |
Post subject: | Re: MigraDoc: Multiple page invoice |
I've a table with some fields. this table must be show in all page but some cell content only in the last page. How can i do this? |
Author: | Thomas Hoevel [ Mon May 23, 2011 1:21 pm ] |
Post subject: | Re: MigraDoc: Multiple page invoice |
sfvaleriano wrote: How can i do this? More details would be good. Will one page do sometimes or will there always be more than 1 pages? Heading rows will appear on every page on top of the table. Is that what you need? If you know that x rows fit a single page, start a new page and a new table after each set of x rows. Add the extra fields only on the last page. Maybe you can use Header or Footer to do the trick. But that depends on your needs. |
Author: | sfvaleriano [ Mon May 23, 2011 3:01 pm ] |
Post subject: | Re: MigraDoc: Multiple page invoice |
My problem is always the same: to show the total of a bill only on the last page. The document may have one or more pages. In the footer of the document is a table showing the totals. If the document is a page there are no problems. But if the document has multiple pages then the first pages to be displayed in the table with empty cells and the last page should be displayed the same table but with the value set of cells, in my case the total value of the invoice. As in the attached pictures first page Attachment:
File comment: First Page Page_1.jpg [ 92.37 KiB | Viewed 18138 times ] last page: Attachment:
File comment: Last Page Page_2.jpg [ 84.14 KiB | Viewed 18138 times ] Thanks Valeriano |
Author: | ghendric [ Tue Jun 07, 2016 2:21 pm ] |
Post subject: | Re: MigraDoc: Multiple page invoice |
I need to do this as well. The invoice that I have created shows a Totals amount at the bottom in the document footer. If the invoice being rendered is going to be more than 1 page, I need the Totals amount in the footer to show "(continued next page)" until the last page where the actual amount will display. Is there a way to determine what page the renderer is on so that I can display "(continued next page)" until it gets to the last page where I can put the actual amount then? For example: Code: if (renderer.currentpage != documents.lastpage) { par = totalsRow.Cells[1].AddParagraph("(continued next page)"); }else { par = totalsRow.Cells[1].AddParagraph(InvoiceTotal.ToString("c")); } Thank you, George |
Author: | TH-Soft [ Tue Jun 07, 2016 2:32 pm ] |
Post subject: | Re: MigraDoc: Multiple page invoice |
Hi! ghendric wrote: Is there a way to determine what page the renderer is on so that I can display "(continued next page)" until it gets to the last page where I can put the actual amount then? You can use the approach shown by the Mix MigraDoc And PDFsharp sample to create the PDF file page by page. Then you can use PDFsharp to add "(continued next page)" where appropriate.I accomplished a similar task, but don't have sample code to share. |
Author: | ghendric [ Tue Jun 07, 2016 2:41 pm ] |
Post subject: | Re: MigraDoc: Multiple page invoice |
Do you have a link to the sample? |
Author: | TH-Soft [ Tue Jun 07, 2016 3:28 pm ] |
Post subject: | Re: MigraDoc: Multiple page invoice |
ghendric wrote: Do you have a link to the sample? I didn't publish my code yet - it was meant to be published as a sample, but I didn't find the time yet to clean it up.
|
Author: | ghendric [ Tue Jun 07, 2016 4:20 pm ] |
Post subject: | Re: MigraDoc: Multiple page invoice |
I'm kind of getting what i want from the Document.LastSection object but its putting my text up in the body instead of down in the footer. Am I close? ![]() It would nice to have a AddParagraphLastSection method off of a Table or Row.Cell, etc... object with 2 parameters where the first parameter would print on the document on each page except the last and the 2 parameter would print on the last page instead.. Something like this: Code: Table mainTbl = sec.Footers.Primary.AddTable();
Row mainRow = mainTbl.AddRow(); TextFrame tfTotals = mainRow.Cells[1].AddTextFrame(); Table tblTotals = tfTotals.AddTable(); Row totalsRow = tblTotals.AddRow(); par = totalsRow.Cells[1].AddParagraphLastSection("(continued next page)", InvoiceTotal.ToString("c")); |
Author: | ghendric [ Wed Jun 08, 2016 4:30 pm ] |
Post subject: | Re: MigraDoc: Multiple page invoice |
I'm really stuck on this. Can you point me in the right direction? |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |