Forum Bugs

Combining documents

whittaker007
I'm combining multiple short html documents on the command line to a single PDF file, each using the same CSS styles for headers and footers. The footer contains the page number in addition to a background colour and other text. The headers and contents are rendered fine in the PDF, but I only get the footer on the first page - the other pages have a blank space where the footer should be.

The way I would expect combining multiple documents to work is that each document is rendered as a self-contained unit and combined into a single document with page numbers and facing (left or right) being passed from one document to the next.

The most obvious way to do this would be to have additional command line options to set initial values for page numbering and facing, so the user can control this output themselves. Specifying multiple documents to assemble would have the effect of passing the numbering and facing from one document to the next.
mikeday
That sounds like a bug; headers and footers should still apply to all the documents.
whittaker007
Hi, just a quick note that this bug is still present in the current (6.0r3) release.
mikeday
Thanks, I've added it to the roadmap for the next release.
whittaker007
Hi Mike, I've done some further experimentation with the page numbering. I am combining several short xhtml documents (1-2 pages each) together with a "front matter" document which contains a cover page and a table of contents.

Each of the documents, including the front matter document, is based on a standard template which defines header, content and footer sections. The header and footer divs are diverted into the @top and @bottom margins through the use of named flows.

The first problem I had was that my footer didn't appear until the last page of any individual document - because the contents of the footer div aren't read until the end of the document. The solution to that was to use:
flow: static(header, start)

to apply it back to the beginning of the document. Unfortunately, when combining multiple documents, this results in the footer only appearing on the first page.

If I remove the "start" argument and combine the documents I get correct page numbering, but with the footer only on the last page of each of the original documents.

If I move the footer definitions in the source documents to appear before the content definitions, all footers appear correctly.

I have another page numbering issue, but I'll put it in another post. :)
mikeday
This should be fixed in Prince 6.0 rev 4, out today. Thanks for reporting the issue! :)