I want to use a two-page template (first- and follow-on-pages) to generate single, two- or multipage output. This required changes to pdf-parser.lisp.
To achieve my goals I extended the signature of with-existing-page to take a new keyword parameter copy-p. If nil, the existing template page is edited, as before. If non-nil, a copy of the page is inserted at the end of the document.
To remove unneeded template pages, I added a new exported function remove-page.
Perhaps someone else also finds this useful. I make no claims that the code is optimal, I do not really understand the structure of PDFs or the cl-pdf representation of it. But through trial and error, this seemed to do the job I wanted it to.
I want to use a two-page template (first- and follow-on-pages) to generate single, two- or multipage output. This required changes to pdf-parser.lisp.
To achieve my goals I extended the signature of with-existing-page to take a new keyword parameter copy-p. If nil, the existing template page is edited, as before. If non-nil, a copy of the page is inserted at the end of the document.
To remove unneeded template pages, I added a new exported function remove-page.
Perhaps someone else also finds this useful. I make no claims that the code is optimal, I do not really understand the structure of PDFs or the cl-pdf representation of it. But through trial and error, this seemed to do the job I wanted it to.