Hello,
Thanks for contacting support.
Lifo:
I’m using Pdf.Generator to build a PDF document.
I am afraid the Aspose.Pdf.Generator is going to be obsolete soon and it is strongly recommended to use new Document Object Model (DOM). In new DOM approach you have been provided more access to all elements of the PDF Document. Furthermore you may visit “Introduction to DOM API” in our API documentation.
Lifo:
Within one section, I need to add a “Continued on next page” footer. So, needs to be on every page in the section except the last.
Please check the following code snippet in which I have added footer into each page of the Document except the last one. I have also attached the generated output document for your reference.
Document pdfDocument = new Document(dataDir + “SampleForFooter.pdf”);
HeaderFooter footer = new HeaderFooter();
TextFragment text = new TextFragment("Continued on next page...");
text.TextState.HorizontalAlignment = HorizontalAlignment.Right;
footer.Paragraphs.Add(text);
for(int i = 1; i< pdfDocument.Pages.Count; i++)
{
pdfDocument.Pages[i].Footer = footer;
}
pdfDocument.Save(dataDir + "SampleForFooter_out.pdf");
Moreover you may also check “Manage Header and Footer in a PDF file” section in our API documentation. In case if you need any further assistance please feel free to let us know.
Best Regards,
This is helpful, however, I need to add it within a section. Not to the entire document. Is there any way to do that?
Hi There,
Hi,
I am unclear on how to use the DOM model to build a document from scratch.
Hi,