-
Notifications
You must be signed in to change notification settings - Fork 274
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
Pdf not loading using docker-compose #499
Comments
Have you tried loading a PDF directly using Since this is not an issue with Shrine itself (ImageProcessing is a separate gem), I will close the issue. |
If anyone comes across this in the future, I figured out that Vips doesn't install the PDF component (poppler) in a docker package and set configuration for PDF. Some licensing issue with GPL. You can either roll your own or use ImageMagick Here's an example of how you can create a thumbnail jpeg of a PDF using "create_derivatives" in Shrine.
The output from imagemagick is a bit lower quality than VIPS in my out of the box comparison on my machine, so if anyone figures out the right apt-get packages to get PDF recognition to turn on, would love to hear about it. Relevant comments here: |
Brief Description
Trying to create derivative (thumbnails) of PDF with a multi-stage docker-compose setup. Getting "VipsForeignLoad: "/tmp/shrine20200904-1-13d7xwu.pdf" is not a known file format"
Expected behavior
Able to use ImageProcessing gem to load PDF and process JPEG thumbnails.
Actual behavior
Error loading the PDF
Simplest self-contained example code to demonstrate issue
and libraries loaded in the Dockerfile. I had thought that adding poppler would have supplied the necessary PDF file loading support, but it doesn't appear to work
System configuration
Ruby version: 2.6.3
Shrine version: 3.2.2
The text was updated successfully, but these errors were encountered: