add mdbook-pdf support which is able to print pdfs using chromedevtools protocol retaining images
This commit is contained in:
@@ -226,6 +226,7 @@ install-build-deps:
|
||||
@cargo install mdbook --vers "^0.4" --locked
|
||||
@cargo install xq --locked
|
||||
@cargo install mdbook-alerts --locked
|
||||
@cargo install mdbook-pdf --locked
|
||||
|
||||
################################################################################
|
||||
# Make Targets - mdBook
|
||||
|
||||
@@ -84,3 +84,28 @@ heading-split-level = 3
|
||||
limit-results = 128
|
||||
teaser-word-count = 64
|
||||
use-boolean-and = true
|
||||
|
||||
[output.pdf]
|
||||
browser-binary-path = "/usr/bin/brave-bin"
|
||||
trying-times = 1
|
||||
timeout = 300
|
||||
# https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF
|
||||
landscape = false
|
||||
display-header-footer = true
|
||||
print-background = false
|
||||
scale = 1.0
|
||||
paper-width = 8
|
||||
paper-height = 10
|
||||
margin-top = 0.5
|
||||
margin-bottom = 0.5
|
||||
margin-left = 0.5
|
||||
margin-right = 0.5
|
||||
page-ranges = ""
|
||||
ignore-invalid-page-ranges = false
|
||||
header-template = "<h3 style='font-size:8px; margin-left: 48%' class='title'></h3>"
|
||||
footer-template = "<p style='font-size:10px; margin-left: 48%'><span class='pageNumber'></span> / <span class='totalPages'></span></p>"
|
||||
prefer-css-page-size = true
|
||||
|
||||
[output.pdf-outline]
|
||||
optional = true
|
||||
like-wkhtmltopdf = false
|
||||
|
||||
Reference in New Issue
Block a user