I want to use Aspose.Words and Pdf.Kit to perform the following tasks:
- Add header and footers to text documents and save result to PDFs. The footer I add must contain some placeholder for page number (the number itself will be known later on stage 3). (Used: Aspose.Words)
- Combine several PDFs, got at previous stage, into single PDF. Used: (Pdf.Kit.PdfFileEditor)
- Add page number at placeholder positions to each page of that PDF. It must be formatted like "X of Y", where X is page number and Y is total number of pages in that PDF. (Used: Pdf.Kit.PdfFileStamp)
I need placeholders because input document (processed on stage 1) can have different page layout and so I don't the know exact position of footer.
I tried using form fields as placeholders and filling them with Pdf.Kit.FormEditor. Suppose I have form field "qwe" put to footer on stage 1. Form fields have breeded one per page. But they have names like "qwe.43736594" and I don't know which one resides on which page.
Can you help me with my solution or offer a better one?