A backend for mdbook written in Python for generating PDF based on Chrome DevTools Protocol.
Put mdbook-pdf in PATH.
Have google-chrome/chromium available (in PATH or location configured).
Ensure you have installed python selenium library,
corresponding chromedriver is in PATH or in the book repo or location configured.
Build it with
mdbook build command.
Make sure the following exists in your
enable = true
if you are using Windows, Put this script in the book repo,
add the following line to
[output.pdf] in your
command = "python ../../mdbook-pdf"
Check book.toml for available configurations of
Sometimes the program may crash with errors like this:
selenium.common.exceptions.WebDriverException: Message: unknown error: session deleted because of page crash
from unknown error: cannot determine loading status
from tab crashed
This may be led by resources outrage.
Rewrite the whole thing in Rust, directly call to Chrome DevTools Protocol instead of using selenium.