Add this script as docinfo-footer-pdf.html
to your
project and add the following to the top of your asciidoc file:
ifdef::env-web-pdf[]
:docinfo: shared-footer
endif::env-web-pdf[]
This script will replace all newlines in pre elements with <br>
elements and spaces with
That works mostly, at least pagedjs does not crash anymore. The start of pages is a bit bugged and if a listing will span multiple pages it will always start on its own page.
I think pagedjs has problems if there is only whitespace and
newlines between spans in a white-space: pre
element.
IDK what the exact bug is, but I currently dont have the time
to find and fix it upstream.