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

Is it possible to render the background color of a page with a specified color #792

Open
zhao414 opened this issue Mar 16, 2018 · 1 comment

Comments

@zhao414
Copy link

zhao414 commented Mar 16, 2018

Most of the paper has a page background color of white.
Sometime, the white color is too bright for eyes, especially when you have to read a lot of pages. One possible way is to change or override the original background color of the page to another one, such as green, when the page is shown up, like the following examples.
Original, with white background color
Better version, with a green background color
Is it possible to do this with pdfkit? And how to?

@nrkn
Copy link

nrkn commented Mar 16, 2018

I'm not sure if there is a built in way to do it, but you could just draw a coloured rect over each page before rendering anything else

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

No branches or pull requests

2 participants