Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default background color of PDFs generated via HTML #8422

Merged
merged 2 commits into from
Nov 5, 2022

Conversation

marcin-serwin
Copy link
Contributor

When creating PDF output via HTML the background of body element is transparent, so it uses the color of html which is set to #fdfdfd by default. This may potentially lead to wasted printer ink. The introduced fix changes the default color for printing to white while respecting the case of user setting a custom background color.

Steps to reproduce

Run

$ echo foo | pandoc -o foo.pdf -t html

Before and after

before after

The above pictures with increased contrast and lowered brightness

before after

@jgm jgm merged commit 347fe49 into jgm:master Nov 5, 2022
@jgm
Copy link
Owner

jgm commented Nov 5, 2022

Good improvement!

@marcin-serwin marcin-serwin deleted the fix-pdf-bg branch November 5, 2022 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants