Use headless Chrome instead of wkhtmltopdf
This commit is contained in:
parent
380027cd75
commit
381097c839
@ -6,5 +6,20 @@ oldCWD="$PWD"
|
|||||||
cd $(dirname $0)
|
cd $(dirname $0)
|
||||||
cd ../en/
|
cd ../en/
|
||||||
|
|
||||||
wkhtmltopdf --print-media-type {% for link in site.data.links_en %}{% if link.link %}{{ link.link }} {% endif %}{% endfor %} out.pdf
|
#wkhtmltopdf --print-media-type {% for link in site.data.links_en %}{% if link.link %}{{ link.link }} {% endif %}{% endfor %} out.pdf
|
||||||
mv out.pdf $oldCWD/book.pdf
|
#mv out.pdf $oldCWD/book.pdf
|
||||||
|
|
||||||
|
{% for link in site.data.links_en %}
|
||||||
|
{% if link.link %}
|
||||||
|
/opt/google/chrome/google-chrome --headless --disable-gpu --print-to-pdf file:///${PWD}/{{ link.link }}
|
||||||
|
|
||||||
|
{% if link.num %}
|
||||||
|
mv output.pdf page_{{ link.num }}.pdf
|
||||||
|
{% else %}
|
||||||
|
mv output.pdf page_0_{{ link.link | replace:".","_" }}.pdf
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
pdfunite page*.pdf ${oldCWD}/book.pdf
|
||||||
|
Loading…
Reference in New Issue
Block a user