-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Rendering PDFs into a PNG with transparent background #90
Comments
Hi @LaurenzV , thank you for reporting the issue. At first I assumed rendering to bitmaps with transparent backgrounds was simply unsupported by Pdfium, but on closer examination it turns out your hunch is completely correct: a small bug in |
Works like a charm, thank you very much. :) |
Took this opportunity to add some convenience functions to |
Hey!
Firstly, thanks for creating this library, it works really well so far!
What I would like to do is to render a PDF into a PNG image, similarly to how it's done in the README, but I would like the background to be transparent. I tried adapting the code to the following:
And doing this indeed changes to background color from white to black, but it seems like the alpha value is completely ignored. I have the feeling though that I'm doing something wrong and
set_clear_color
isn't intended to be used in this way. Is there some other way to achieve what I want?The text was updated successfully, but these errors were encountered: