Defect #34397

PDF thumbnail to PNG failing on ruby 2.5

Added by Zee Prime 10 months ago. Updated 10 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Attachments
Target version:-
Resolution:Invalid Affected version:4.1.1

Description

We have Redmine 4.1.1 hosted on an ubuntu server but whenever we attach PDFs, the thumbnails show up as 404 broken links despite it appearing that it is set up correctly:

All image attachments do show thumbnails correctly.

When I run "rake test" on the server, I consistently get 2 failing unit tests related to this:
  • AttachmentTest#test_thumbnail_should_generate_the_thumbnail
  • AttachmentsControllerTest#test_thumbnail_for_pdf_should_be_png
I thought it was just the version of code I'm running or my environment, so I forked the github mirror of Redmine and tried running the unit tests using github actions to ensure a consistent build environment. However, this is also consistently failing with the same 2 errors.

I've checked in my Bundle.lock file but otherwise it is the same as the version that is clearly building successfully in Jenkins according to https://www.redmine.org/builds/ - is there a server-level package that I need to apt-install or a gem I'm missing that's not defined in the Gemfile?

Is the "check" that the information page does to determine whether pdf-to-thumbnail support is enabled broken? I've confirmed that "gs" is installed on our server and working correctly.

Thank you,
Michael

info.png (73.2 KB) Zee Prime, 2020-12-04 20:52

History

#1 Updated by Go MAEDA 10 months ago

I found the following page. Maybe ImageMagick's policy.yml in your environment does not allow converting PDF files.

python - ImageMagick not authorized to convert PDF to an image - Stack Overflow

#2 Updated by Zee Prime 10 months ago

  • Status changed from New to Resolved

Go MAEDA wrote:

I found the following page. Maybe ImageMagick's policy.yml in your environment does not allow converting PDF files.

python - ImageMagick not authorized to convert PDF to an image - Stack Overflow

Yep - that was it - THANK YOU!!!!!

#3 Updated by Holger Just 10 months ago

  • Status changed from Resolved to Closed
  • Resolution set to Invalid

Thank you for the feedback. I'm closing this issue as it is not a defect in Redmine.

Also available in: Atom PDF