Patch #32898

Let's show PDF thumbnails on Windows.

Added by taca tadocolo 8 months ago. Updated 3 months ago.

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

0%

Category:Attachments
Target version:-

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


Related issues

Related to Redmine - Feature #22481: Show thumbnails for PDF attachments Closed
Related to Redmine - Defect #33283: Thumbnail support for PDF attachments may not be detected Closed

History

#1 Updated by Go MAEDA 8 months ago

  • Related to Feature #22481: Show thumbnails for PDF attachments added

#2 Updated by Go MAEDA 3 months ago

  • Related to Defect #33283: Thumbnail support for PDF attachments may not be detected added

#3 Updated by Go MAEDA 3 months ago

  • Status changed from New to Closed

Redmine 4.1.2 will support a new setting gs_command in config/configuration.yml (#33283). You can set the command name such as "gswin64c" and "gswin32c".

Also available in: Atom PDF