From e75ae970ed6122a68b971148ceb3a95121978bc4 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Fri, 16 May 2025 14:38:00 +0100 Subject: [PATCH] Ensure PDF scale-on-load optimisation uses background #4398 --- docs/src/content/docs/changelog.md | 1 + src/pipeline.cc | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/src/content/docs/changelog.md b/docs/src/content/docs/changelog.md index 5d202f98..1cec81bc 100644 --- a/docs/src/content/docs/changelog.md +++ b/docs/src/content/docs/changelog.md @@ -13,6 +13,7 @@ Requires libvips v8.16.1 * Ensure `pdfBackground` constructor property is used. [#4207](https://github.com/lovell/sharp/pull/4207) + [#4398](https://github.com/lovell/sharp/issues/4398) * Add support for prebuilt Windows ARM64 binaries. [#4375](https://github.com/lovell/sharp/pull/4375) diff --git a/src/pipeline.cc b/src/pipeline.cc index bb12a400..7acbd967 100644 --- a/src/pipeline.cc +++ b/src/pipeline.cc @@ -294,6 +294,7 @@ class PipelineWorker : public Napi::AsyncWorker { option->set("n", baton->input->pages); option->set("page", baton->input->page); option->set("dpi", baton->input->density); + option->set("background", baton->input->pdfBackground); if (baton->input->buffer != nullptr) { // Reload PDF buffer