Closed jakeleventhal closed 1 year ago
await sharp(pdfBuffer, { page: 1, pages: 1 })
.jpeg({
quality: this.compressedImageQuality
})
.resize(this.compressedImageSize, this.compressedImageSize)
.toBuffer();
[Error: Input file contains unsupported image format]
Same issue with a path to the PDF file
sharp can read PDF files when using a globally-installed libvips compiled with support for either poppler or pdfium.
https://sharp.pixelplumbing.com/install#custom-libvips https://github.com/libvips/libvips/#optional-dependencies
Feature request
What are you trying to achieve?
I want to be able to input a PDF as a Buffer and resize it/save it to a DPF
When you searched for similar feature requests, what did you find that might be related?
There are no open issues like this
What would you expect the API to look like?
Same as all the other APIs
What alternatives have you considered?
Other libraries. They are slow
Please provide sample image(s) that help explain this feature
N/A