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

Document Library generating preview with ImageMagick and Ghostscript

    Details

      Description

      Installed the ImageMagick and ghostcript external services on Liferay Portal Community Edition 6.2 CE GA2.

      Now, when i changed the following value in the portal-ext.properties, but it will not change the preview image size.

      dl.file.entry.preview.document.max.width=1400

      I have found out that Liferay used the following command to convert the image preview in the Documents Library.

      [liferay/document_library_pdf_processor-1][GhostscriptImpl:71] Excecuting command '/usr/bin/gs -dBATCH -dSAFER -dNOPAUSE -dNOPROMPT -sFONTPATH/usr/local/bin -sDEVICE=png16m -sOutputFile=/tmp/tomcat7-tomcat7-tmp/liferay/document_thumbnail/43015.1.0.png -dFirstPage=1 -dLastPage=1 -dPDFFitPage -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r300 -dDEVICEWIDTH1400 /srv/data/document_library/10157/10805/6502/1.0 '

      Here you can see that the parameter "-dDEVICEWIDTH1400" has the right value, but ghostscript can't handle this parameter it must look like this "-dDEVICEWIDTH=1400".
      When i used this command directly in the commandline with -dDEVICEWIDTH=1400 it will work how i expect.

        Attachments

        1. fixed.png
          fixed.png
          18 kB
        2. reproduced.png
          reproduced.png
          18 kB

          Issue Links

            Activity

              People

              Assignee:
              hong.zhao Hong Zhao (Inactive)
              Reporter:
              pascal.herm Pascal
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                5 years, 19 weeks, 2 days ago

                  Packages

                  Version Package
                  6.2.4 CE GA5
                  6.2.X EE
                  7.0.0 M3