Skip to content

Commit

Permalink
update htmltopdf
Browse files Browse the repository at this point in the history
  • Loading branch information
albertodonato committed Jun 22, 2023
1 parent 80a291f commit 401c1b1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions bin/htmltopdf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash -e

if [ $# -ne 2 ]; then
echo "Usage $(basename "$0") <html> <pdf>"
Expand All @@ -8,4 +8,11 @@ fi
source="$1"
dest="$2"

chromium --disable-gpu --headless --no-pdf-header-footer --print-to-pdf="$dest" "$source"
chromium \
--incognito \
--headless \
--virtual-time-budget=100 \
--run-all-compositor-stages-before-draw \
--no-pdf-header-footer \
--print-to-pdf="$dest" \
"$source"

0 comments on commit 401c1b1

Please sign in to comment.