Redmine 5.x.x will require Ghostscript for PDF thumbnail generation

Type: Suggestion

Hi, a Redmine contributor here.

Starting from Redmine 5.0.0 we’ll support PDF thumbnail generation on Windows too (see upstream Redmine issue #32898). For this feature to work Redmine will require Ghostscript to be present. Currently Ghostscript is not provided by the Bitnami Redmine installers for Windows since it’s not needed for Redmine < 5.x.x.
So, I’d like to give you a heads up to add Ghostscript to the Bitnami Redmine 5.x.x installers for Windows.

FYI: as a test I just back-ported the Redmine changes from upstream Redmine issue #33283 and upstream Redmine issue #32898 to a Windows Bitnami Redmine 4.1.1 stack deployment, installed Ghostscript manually on the Windows host containing the Bitnami Redmine deployment, made sure to enable PDF-support in the ImageMagick policy.xml file and set the path to the Ghostscript executable in C:\Bitnami\redmine-4.1.1-0\apps\redmine\htdocs\config\configuration.yml. After restarting the Bitnami Redmine stack, Redmine correctly recognizes the Ghostscript installation on the Redmine information page (http://localhost/redmine/admin/info). However, it still fails to generate PDF thumbnails from Redmine itself.
For a PDF attachment with the name ‘issues-4.1.0.pdf’ Redmine’s production.log says:

Creating thumbnail failed (pid 18748 exit 1):
Command: "C:\Bitnami\redmine-4.1.1-0/imagemagick/convert.exe" -verbose "C:/Bitnami/redmine-4.1.1-0/apps/redmine/htdocs/files/2021/07/210729112716_issues-4.1.0.pdf[0]" -thumbnail "100x100>" "png:C:/Bitnami/redmine-4.1.1-0/apps/redmine/htdocs/tmp/thumbnails/fc4d5ebc59dd14c78f8a88e8010e778c0a4444d0790a494b6bc9d03935b6a3a7_345706_100.thumb"

However, manually executing the given command from the ‘Use Bitnami Redmine Stack’ command prompt succeeds in generating the thumbnail of the PDF file.

I had a quick look at that command, added -verbose to it, and saw that it writes to the hosts temp directory, of which I am not sure it works using the Bitnami Redmine user account. Here’s the anonymized output of the (verbose) command in the ‘Use Bitnami Redmine Stack’ command prompt:

"C:\Bitnami\redmine-4.1.1-0/imagemagick/convert.exe" -verbose "C:/Bitnami/redmine-4.1.1-0/apps/redmine/htdocs/files/2021/07/210729112716_issues-4.1.0.pdf[0]" -thumbnail "100x100>" "png:C:/Bitnami/redmine-4.1.1-0/apps/redmine/htdocs/tmp/thumbnails/fc4d5ebc59dd14c78f8a88e8010e778c0a4444d0790a494b6bc9d03935b6a3a7_345706_100.thumb"
"gswin32c.exe" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" -dFirstPage=1 -dLastPage=1 "-sOutputFile=C:/Users/userid/AppData/Local/Temp/magick-5716L3cEmVFRRnVY%d" "-fC:/Users/userid/AppData/Local/Temp/magick-5716dJGxa75n7ImN" "-fC:/Users/userid/AppData/Local/Temp/magick-5716ljZqMB967qlu"
C:/Users/userid/AppData/Local/Temp/magick-5716L3cEmVFRRnVY1 PNG 842x595 842x595+0+0 8-bit sRGB 45.4KB 0.000u 0:00.009
C:/Bitnami/redmine-4.1.1-0/apps/redmine/htdocs/files/2021/07/210729112716_issues-4.1.0.pdf[0]=>C:/Bitnami/redmine-4.1.1-0/apps/redmine/htdocs/files/2021/07/210729112716_issues-4.1.0.pdf PDF 842x595 842x595+0+0 8-bit sRGB 45.4KB 0.000u 0:00.006
C:/Bitnami/redmine-4.1.1-0/apps/redmine/htdocs/files/2021/07/210729112716_issues-4.1.0.pdf[0]=>C:/Bitnami/redmine-4.1.1-0/apps/redmine/htdocs/tmp/thumbnails/fc4d5ebc59dd14c78f8a88e8010e778c0a4444d0790a494b6bc9d03935b6a3a7_345706_100.thumb PDF 842x595=>100x71 8-bit sRGB 4.03KB 0.000u 0:00.008

Given that I don’t know enough of the Bitnami Stack internals to further investigate this issue, I gave up here. Though I’m quite sure that I’ve missed some required Bitnami specific configuration for Ghostscript. I think you’re better equipped to handle this matter than I am, so I’ll leave it here.

With kind regards,


Hi @mischa_the_evil,

Thank you for notifying us. I’ve added a task to add Ghostscript by default. We will notify you when it has been added.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.