Hi,
I have a pdf document that usually consists of 3 pages with text and table data. The content is generated from user input. Creating the document I call doc.Pages.Add()-functions multiple times to start a new page on predefined points. But sometimes users enter a lot of data and content that should fit on one page is spanning into the next page. But Aspose.Pdf is unaware of this page spanning. It knows only this 3 pages although there are for example 5 pages and page numbers are shown only on this 3 pages. Pages which are created as result of spanning have no page numbers. Can you help me? Here is my simplified code:
Document doc = new Document();
Page p = doc.Pages.Add();
TextStamp footerPageNr = new TextStamp("S. 1");
footerPageNr.BottomMargin = 10;
footerPageNr.RightMargin = 10;
footerPageNr.HorizontalAlignment = HorizontalAlignment.Right;
footerPageNr.VerticalAlignment = VerticalAlignment.Bottom;
p.Paragraphs.Add(... some content ...);
p = doc.Pages.Add();
p.Paragraphs.Add(... some content that doesn't fit actual page...);
p = doc.Pages.Add();
p.Paragraphs.Add(_... some content ..._);
int cntPages = doc.Pages.Count;
for (int i = 1; i <= cntPages; i++)
{
footerPageNr.Value = "p. " + i + "/" + cntPages;
doc.Pages[i].AddStamp(footerPageNr);
}
My Aspose.Pdf version: 10.4.0.0