Context: I'm using the wicked_pdf gem to generate a PDF document with roughly 300-500 pages. The document has a footer on each page. Sometimes, when I try to generate a large PDF, the memory consumption skyrockets and gives me an error. (When wicked_pdf is trying to generate the footer, it actually creates another PDF file with the footer and then merges them, effectively doubling the number of pages in the document.) Is there a way to create a PDF document where the footer is generated together with the body of the PDF?
I tried using CombinePDF to add the footer while the PDF is being rendered, but it always goes to the top of the page.