PDF creation with wkhtmltopdf: White background color
1,169 views
Skip to first unread message
Thomas Jarosch
unread,
May 9, 2017, 8:00:48 AM5/9/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to TaskJuggler Users
Hi,
thanks to this mailinglist I learned about the
idea of automatic PDF creation with wkhtmltopdf.
There was one little issue: The background color of the PDF
defaults to black. This was less optimal for printing.
Here's a small shell script tweak to the HTML stylesheet
to have a white background color:
---------------------
# switch background color to white in the HTML output
css_file="css/tjreport.css"
if [ ! -f "$css_file" ]; then
echo "File $css_file not found. Aborting"
exit 1
fi
echo "body {" >> "$css_file"
echo "background-color: #FFFFFF;" >> "$css_file"
echo "}" >> "$css_file"