Forum Bugs

Page cut off for Docusaurus sites

sparanoid
Only part of the page get captured and seems like Prince didn't "scroll" to the rest of the page. A simple way to reproduce is:

prince --no-warn-css https://docusaurus.io/docs -o docs-docusaurus.pdf


I've also attached a sample I created.
  1. docs-docusaurus.pdf179.6 kB
pjrm
Try creating a file print.css with content
@media print {
    .row { display: block !important; }
}
and add ‘-s print.css’ to the command line.

Quite possibly Prince doesn't yet do pagination within flex containers.
ZurichKevin









This might be the solution, but how do I specify the CSS file in the npx docusaurus-prince-pdf command line?

I tried the following:

npx docusaurus-prince-pdf -u http://localhost:3000/docs/book --output B.pdf --prince-args '-s print.css'

but received the message:

npx: installed 108 in 9.4s
No next link found!
No buffer to write!

So would you know how to pass a Prince option to docusaurus-prince-pdf?

Thanks!
ZurichKevin
The following command does eliminate the cutoff page problem:

npx docusaurus-prince-pdf -u http://localhost:3000/docs/book  --include-index -o ZAZ.pdf  --prince-args  '\-\-javascript'


Apparently the

--javascript


option is needed to assure that each file is not cut off after the first page.