Project

General

Profile

Actions

Feature #32898

closed

PDF thumbnails support on Windows

Added by Anonymous over 4 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Attachments
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

Redmine 4.1.0 don't support PDF thumbnails on Windows. ( #22481 )
For Windows, "gswin64c(32c).exe"(command line version) can be used instead of "gswin64(32).exe".
By applying this diff, we can detect the presence of Ghostscript on Windows without side effects.

--- org/lib/redmine/thumbnail.rb
+++ patch/lib/redmine/thumbnail.rb
@@ -77,5 +77,6 @@

       if Redmine::Platform.mswin?
-        @gs_available = false
+        @gs_available = system("gswin64c -version > nul 2>&1") rescue false
+        @gs_available ||= system("gswin32c -version > nul 2>&1") rescue false
       else
         begin


Files

pdf-thumbnail-win.patch (1.78 KB) pdf-thumbnail-win.patch Go MAEDA, 2021-03-31 15:40
pdf-thumbnail-win-v2.patch (1.71 KB) pdf-thumbnail-win-v2.patch Go MAEDA, 2021-05-16 04:41
pdf-thumbnail-win-v3.patch (1.22 KB) pdf-thumbnail-win-v3.patch Go MAEDA, 2021-05-23 08:40

Related issues

Related to Redmine - Feature #22481: Show thumbnails for PDF attachmentsClosedGo MAEDA

Actions
Related to Redmine - Defect #33283: Thumbnail support for PDF attachments may not be detectedClosedGo MAEDA

Actions
Actions

Also available in: Atom PDF