Forum Bugs

Empty page at beginning

joergkrause
Hi,

I have the attached document and it generates an empty page at the very beginning. I do not want to have this empty page. I tried several ways with page-break-before:avoid but no luck so far.

Document shall start with page 1, not 2.

I'm using Prince 9 on a Windows Server 2008 R2 / 64 Bit.

Regards, Joerg
  1. debug-img-Autoren-Handbuch.html271.1 kB
    Complete file with CSS and HTML
  2. debug-img-Autoren-Handbuch.pdf251.4 kB
    Generated PDF
mikeday
There is a <div> wrapping the .frontcover div, and it begins with a U+FEFF character, perhaps from documents being concatenated together? Anyway, Prince leaves a little bit of space for this div, and then because the frontcover div is so tall, it gets pushed to the next page instead of being split across two pages.

Removing the wrapper <div>, or just the unnecessary character inside the wrapper div, will get rid of the page break before the front cover.

Then there is another U+FEFF character before the table of contents, which causes a similar page break.
joergkrause
Hi mikeday,

yes you're right, the documents have been concatenated from UTF-8 documents. I have now everything in XML and it's working well.

I'm still wondering why the BOM forces a page break.

Thanks, Joerg
mikeday
Prince will strip an actual BOM, eg. when it appears as the very first bytes in the file. But if U+FEFF appears anywhere else, it is just a character (zero-width no-break space). Although normally this character doesn't generate any glyphs, it's enough in this case to make Prince generate a linebox to put it in.