Closed siaccarino closed 2 years ago
Since asciidoctor-web-pdf relies pretty much on Paged.js it inherits it's reliability. Vanishing content during pagination is the opposite of reliable. I'll check why Paged.js runs amok
The umlaut error message should be removed and replaced, see: https://github.com/Mogztter/asciidoctor-web-pdf/issues/267#issuecomment-980544430
It might be possible to intercept the message Unable to layout item: ...
sent by Paged.js but that would probably be more brittle.
This is one indicator for lost content, maybe there is a loss of data without warning, I want to check what Paged.js is doing there - there is no problematic HTML code near to the lost content.
Debug analysis shows that root cause of lost content is 100% pagejs - the lost content is still in DOM but it is invisible. I'll fill bug report there.
There is not much asciidoc-web-pdf can do here but to write a warning:
Content is not vanished but hidden
Seems to be a known issue: https://gitlab.coko.foundation/pagedjs/pagedjs/-/issues/357
"Unable to layout item" seems to be the best solution to me
Added work-arround to the pagedjs issue
I get a warning "Unable to find destination...." for a chapter that definitely don't contain umlauts.
The adoc contains:
The outline dictionary generated in https://github.com/Mogztter/asciidoctor-web-pdf/blob/3e1bb2ecf1b781f06bf555556b0935496283ac15/lib/outline.js#L76 looks like
The HTML looks like:
After PDF inspection it looks like the PDF file generated by puppeteer is wrong Analysis finished: it's Paged.js which messes up the PDF output - it generates a page break right after the communication_strategy header, the following paragraph is vanished from DOM:
PDF copy & paste 5.3. Communication strategy ------ Page 12 of 18 5.4. Problem analysis
blah...