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

Add PDF background color option #4207

Merged
merged 2 commits into from
Sep 6, 2024
Merged

Conversation

calebmer
Copy link
Contributor

@calebmer calebmer commented Sep 3, 2024

Fixes #3321.

I followed existing code for options.subifd and options.create.background to pass a background option to vips for rendering PDFs. I haven't tested that this works with a vips build containing PDF support. Instead of using sharp's global vips support I override the contents of the @img/sharp-libvips-* packages with my own custom builds derived from https://github.com/lovell/sharp-libvips which makes testing custom sharp C code a little more difficult.

If you’re not sure this is the right way to pass the background option to vips_pdfload() (source) I can try to jump through some hoops to see if this change works in my local setup.

@calebmer calebmer marked this pull request as ready for review September 3, 2024 20:18
Copy link
Owner

@lovell lovell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brilliant, thank you very much for working on this Caleb.

@lovell lovell merged commit 7ee5481 into lovell:main Sep 6, 2024
15 checks passed
@lovell lovell added this to the v0.33.6 milestone Sep 6, 2024
lovell added a commit that referenced this pull request Sep 6, 2024
@calebmer calebmer deleted the calebmer/pdf-background branch September 6, 2024 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose background option in constructor for PDF input
2 participants