Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-31589

PDF Preview does not display with ImageMagick/gs on Win7 64 bit

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 6.2.0 CE M3
    • Fix Version/s: 6.2.0 CE M3
    • Component/s: DM
    • Labels:
      None
    • Environment:
      Tomcat 7 + MySQL 5. 6.2.x GIT ID: 9741331a07b220cba5079904f59267700dd06550.

      Description

      Three problems:
      1. Default of GS folder does not include /bin (should)
      2. when executable cannot be found, there is no log because it is logged at warn – it should be higher
      (needed to manually add that Log Levels Category)

      17:24:28,960 WARN  [liferay/document_library_pdf_processor-1][GhostscriptImpl:89] java.io.FileNotFoundException: Unable to find Ghostscript command
      java.io.FileNotFoundException: Unable to find Ghostscript command
              at com.liferay.portal.image.GhostscriptImpl.getCommandPath(GhostscriptImpl.java:105)
              at com.liferay.portal.image.GhostscriptImpl.reset(GhostscriptImpl.java:86)
              at com.liferay.portal.kernel.image.GhostscriptUtil.reset(GhostscriptUtil.java:42)
              at com.liferay.portlet.documentlibrary.util.PDFProcessorImpl._generateImages(PDFProcessorImpl.java:311)
              at com.liferay.portlet.documentlibrary.util.PDFProcessorImpl._generateImages(PDFProcessorImpl.java:350)
              at com.liferay.portlet.documentlibrary.util.PDFProcessorImpl.generateImages(PDFProcessorImpl.java:78)
              at com.liferay.portlet.documentlibrary.util.PDFProcessorUtil.generateImages(PDFProcessorUtil.java:34)
              at com.liferay.portlet.documentlibrary.messaging.PDFProcessorMessageListener.generate(PDFProcessorMessageListener.java:30)
              at com.liferay.portlet.documentlibrary.messaging.BaseProcessorMessageListener.doReceive(BaseProcessorMessageListener.java:38)
              at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:25)
              at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:63)
              at com.liferay.portal.kernel.messaging.SerialDestination$1.run(SerialDestination.java:64)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:675)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:586)
              at java.lang.Thread.run(Unknown Source)
      17:24:28,965 INFO  [liferay/document_library_pdf_processor-1][GhostscriptImpl:70] Excecuting command 'null -dBATCH -dSAFER -dNOPAUSE -dNOPROMPT -sFONTPATHC:\Program Files\gs\gs9.05;C:\Program Files\ImageMagick-6.7.6-Q16 -sDEVICE=png16m -sOutputFile=G:\trunk\bundles\tomcat-7.0.27\temp/liferay/document_preview/10452.1.0-%d.png -dPDFFitPage -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r300 -dDEVICEWIDTH1000 G:\home\trunk\data\document_library\10152\10178\1\1.0 '
      

      3. when executable is correct (adding in /gs/gs9.05/bin for Win 64), nothing is generated. (See LPS-31688)

      28:53,888 INFO  [com.liferay.portal.search.lucene.LuceneHelperImpl-1][LuceneIndexer:129] Reindexing Lucene completed in 1 seconds
      28:58,121 INFO  [liferay/document_library_pdf_processor-1][GhostscriptImpl:70] Excecuting command 'C:\Program Files\gs\gs9.05\bin\gswin64c.exe -dBATCH -dSAFER -dNOPAUSE -dNOPROMPT -sFONTPATHC:\Program Files\gs\gs9.05\bin;C:\Program Files\ImageMagick-6.7.6-Q16 -sDEVICE=png16m -sOutputFile=G:\trunk\bundles\tomcat-7.0.27\temp/liferay/document_preview/10446.1.1-%d.png -dPDFFitPage -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r300 -dDEVICEWIDTH1000 G:\home\trunk\data\document_library\10152\10178\1\1.1 '
      28:58,494 INFO  [liferay/document_library_pdf_processor-1][GhostscriptImpl:70] Excecuting command 'C:\Program Files\gs\gs9.05\bin\gswin64c.exe -dBATCH -dSAFER -dNOPAUSE -dNOPROMPT -sFONTPATHC:\Program Files\gs\gs9.05\bin;C:\Program Files\ImageMagick-6.7.6-Q16 -sDEVICE=png16m -sOutputFile=G:\trunk\bundles\tomcat-7.0.27\temp/liferay/document_thumbnail/10446.1.1.png -dFirstPage=1 -dLastPage=1 -dPDFFitPage -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r300 -dDEVICEWIDTH1000 G:\home\trunk\data\document_library\10152\10178\1\1.1 '
      28:58,892 INFO  [liferay/document_library_pdf_processor-1][GhostscriptImpl:70] Excecuting command 'C:\Program Files\gs\gs9.05\bin\gswin64c.exe -dBATCH -dSAFER -dNOPAUSE -dNOPROMPT -sFONTPATHC:\Program Files\gs\gs9.05\bin;C:\Program Files\ImageMagick-6.7.6-Q16 -sDEVICE=png16m -sOutputFile=G:\trunk\bundles\tomcat-7.0.27\temp/liferay/document_preview/10506.1.0-%d.png -dPDFFitPage -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r300 -dDEVICEWIDTH1000 G:\home\trunk\data\document_library\10152\10178\101\1.0 '
      

      Steps to Reproduce:

      1. Navigate to Control Panel > Server Administration > External Services
        • Flag Enabled for "Enabling ImageMagick and GhostScript..."
        • Click Save
      2. Click Log Levels > Add Category
        • com.liferay.portal.image.GhostscriptImpl
        • ALL
        • Click Save
      3. Click Documents and Media
      4. Upload a multipage pdf
        PDF thumbnail and preview are not generated

      Tested with Win7 64 bit, ImageMagick-6.7.6-Q16, gs9.05

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                torrey.schuhler Torrey Schuhler (Inactive)
                Reporter:
                christine.pince Christine Pince (Inactive)
                Participants of an Issue:
                Recent user:
                Esther Sanz
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  6 years, 37 weeks ago

                  Packages

                  Version Package
                  6.2.0 CE M3