Announcement

Collapse
No announcement yet.

PDF - Thumbs with ImageMagick and Ghostscript

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PDF - Thumbs with ImageMagick and Ghostscript

    ImageMagick6 ist installed and working
    Ghostscript is installed and working

    Code:
    convert \test.pdf \test.jpg 2>&1
    shellscript is working..

    PHP Code:
    $im = new Imagick();
    $im->readimage('/test.pdf[0]');
    $im->setImageFormat('jpeg');    
    $im->writeImage('/thumb.jpg');
    $im->clear();
    $im->destroy(); 
    PHP is working...


    I think, there is no need for delegate.xml because shell and PHP are working. Anyway, inserted:

    Code:
     <delegate decode="pdf" encode"jpg"  command="&quot;convert %i %o&quot;"/>

    Anyway, getting error in admincp:
    Failed to automatically validate that Ghostscript is installed & configured with ImageMagick for PDF to JPG conversion.
    Please ensure that Ghostscript is installed and that relevant entries in ImageMagick's delegates.xml point to the proper path for Ghostscript's executable. You can ignore this and set this option to "Yes" if PDF conversion already works without the delegates check.

    Ignoring this has no effect.

    Uploading images - thumbs are createt.
    uploading pdf - thumb not and also no error...

    Is this feature working? What is wrong?

    P.S. tryed with VB 5.3.3 RC2
    Last edited by AScherff; Fri 15th Sep '17, 3:43am. Reason: P.S.

  • #2
    Your delegate command should actually call Ghostscript. If it isn't on the PATH checked by the server, you would need the path in the command. However, if it works in the shell script, it may be configured during compile so try without the explicit delegate.

    Code:
    <delegate decode="pdf" encode"jpg"  command="gs &quot;convert %i %o&quot;"/>
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API - Full / Mobile
    Vote for your favorite feature requests and the bugs you want to see fixed.

    Comment


    • #3
      stil not working for me - but

      in /atachments i can see hat a .thumb file is created and it is a jpg-file but in a very,very poor quality - even when the delegate is not set.

      I can dig into, if you give me a hint where the thumb is created. I think somewhere in in /core/vb/image/imagemagick.php ?

      Comment


      • #4
        Offhand, I don't know where it is set in the code.
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud demonstration site.
        vBulletin 5 API - Full / Mobile
        Vote for your favorite feature requests and the bugs you want to see fixed.

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X