What is the best way to add page numbers to a document created with the HtmlToWmlConverter? Use a template document with the header/footer I want and merge the 2? Or can I use something in documentbuilder or documentassembler to add the header/footer section?
At the moment it is not possible.
Adding page numbers (and headers / footers) would require writing a layout engine. AFAIK, right now there is no open source layout engine. Without a layout engine, one can’t do pagination. Without pagination, there is no way to determine the page number, etc.
In the document, there are w:lastRenderedPageBreak elements. Unfortunately, there are ‘bugs’ in Word that cause these to be put into the wrong places in a number of circumstances. I put quotes on ‘bugs’ because Word does not guarantee the correct placement of these elements, so Microsoft doesn’t consider these to be bugs, I believe.
So currently, there is no good path to do this.
OK thanks Eric. I will continue to do what I have been doing, which is using a docx file as a template that only has a header with the paging control in it and merging it with the output generated by the HtmlToWmlConverter.
You must be logged in to reply to this topic.