Added Bug Report to tracker.
https://tracker.vbulletin.com/vbulle...sues/VBV-20583
Announcement
Collapse
No announcement yet.
PDF - Thumbs with ImageMagick and Ghostscript
Collapse
X
-
Good question! Yes, the thumbnail shows in the condensed view of the Activity tab, but not when See More is clicked.
-
There was another recent topic on this and it appears to be an error that the thumbnail isn't shown in the post. Does the thumbnail appear on the activity stream within the user's profile?
Leave a comment:
-
Having a similar problem:
Error in Image settings
However, diagnostics indicates everything is configured properly
Appearance in post:
Any ideas on how to fix this?
Leave a comment:
-
Wayne
I have a response. Everything seems to pint to something obscure.
We are seeing ghostscript(gs) as a delegate:
# convert -list delegate |grep -i pdf|grep gs\'
eps<=>pdf "gs' -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 '-sDEVICE=pdfwrite' '-sOutputFile=%o' '-f%i"
pdf<=>eps "gs' -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 -sPDFPassword='%a' '-sDEVICE=eps2write' '-sOutputFile=%o' '-f%i"
pdf<=>ps "gs' -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 '-sDEVICE=ps2write' -sPDFPassword='%a' '-sOutputFile=%o' '-f%i"
ps<=>pdf "gs' -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 '-sDEVICE=pdfwrite' '-sOutputFile=%o' '-f%i"
Please privide this inforamtion to vBulletin.
Thank you!
Regards.
Dave H.
Advanced Support Specialist
If there is anything else i can go poke / prod I would be grateful for any pointers.
John
Leave a comment:
-
Wayne, yes I seen the other thread on Version 7 and it is version 6 that is installed on the server.
Many thanks for the extra effort here Wayne Luke
John
Leave a comment:
-
It calls either identify or convert depending on the action. The error you're getting is because Imagemagick is not returning Ghostscript as a delegate to deal with PDF files.
Assuming you're on Linux...
Code:$result = $this->fetchImExec( 'convert', '-list delegate |grep -i "pdf" ', array(), true );
Code:if ( strpos($outputText, 'postscript delegate failed') !== false OR strpos($outputText, 'pdfdelegatefailed') !== false // IM 6.9.8 ) { throw new vB_Exception_Api('install_ghostscript_to_resize_pdf'); }
Full code is in /core/vb/image/imagemagick.php canThumbnailPdf() line 302.
You must also use ImageMagick 6 at this time. ImageMagick 7 has not been tested or certified for use with vBulletin.Last edited by Wayne Luke; Fri 5 Jun '20, 5:25pm.
- 1 like
Leave a comment:
-
Hello Wayne
I am still holding an open ticket with the host on this.
As above the host has went through a few test scenarios and cannot find any issue so they are at the point they would like some information so they can investigate more.
So I am back to you guys Wayne, can you enquire as to the exact command being executed for the PDF to JPG conversion so I can pass it on.
John
Leave a comment:
-
Wayne
The error to me is stating it cannot find GS or unable to use it. So i queried my host on this and the reply is below.
I have checked the server settings in detail and unfortunately I could not find the reason for this error. Imagick and Ghostscript are working fine and I could not see any errors in the logs. The following delegates are currently included in the ImageMagick installation
[[email protected]:/root]$ convert -list configure | grep DELEGATES
DELEGATES bzlib mpeg freetype gslib jng jpeg lcms lzma openexr pango png tiff wmf x xml zlib
DELEGATES bzlib freetype gslib jng jpeg lcms ltdl lzma openexr png ps tiff wmf x xml zlib
Could you please check this with the vbulletin support regarding this issue? Without a specific error message or the exact command that the script is using, we are unable to resolve the problem from our end. So please check with them and let us know if the script requires any changes in the server setting to make it work correctly.
I have checked the server settings in detail and unfortunately I could not find the reason for this error. Imagick and Ghostscript are working fine and I could not see any errors in the logs. The following delegates are currently included in the ImageMagick installation
[[email protected]:/root]$ convert -list configure | grep DELEGATES
DELEGATES bzlib mpeg freetype gslib jng jpeg lcms lzma openexr pango png tiff wmf x xml zlib
DELEGATES bzlib freetype gslib jng jpeg lcms ltdl lzma openexr png ps tiff wmf x xml zlib
Could you please check this with the vbulletin support regarding this issue? Without a specific error message or the exact command that the script is using, we are unable to resolve the problem from our end. So please check with them and let us know if the script requires any changes in the server setting to make it work correctly.
So I am back to you guys Wayne, can you enquire as to the exact command being executed for the PDF to JPG conversion so I can pass it on.
There is no errors when I enable Imagmagick and its 6.9x (I seen the other thread on 7)
Only error is when i set PDF to JPG to Yes and i see this.
Error 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.
John
Leave a comment:
-
Is Ghostscript available in the path or do you need to traverse to its location to us it?
Leave a comment:
-
Hmmm, an old one but I have just come across this.
I can open a shell command and I can find the Imagmagick and GS working fine. I opened a support ticket to see if I can have the host look into this as it seems to be working from shell, just not within vb5.6.1
Is there anything I can change within vB to work around this, I am sure the answer is no but I ask anyway.
Leave a comment:
-
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 ?
Leave a comment:
-
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 "convert %i %o""/>
Leave a comment:
-
PDF - Thumbs with ImageMagick and Ghostscript
ImageMagick6 ist installed and working
Ghostscript is installed and working
Code:convert \test.pdf \test.jpg 2>&1
PHP Code:$im = new Imagick();
$im->readimage('/test.pdf[0]');
$im->setImageFormat('jpeg');
$im->writeImage('/thumb.jpg');
$im->clear();
$im->destroy();
I think, there is no need for delegate.xml because shell and PHP are working. Anyway, inserted:
Code:<delegate decode="pdf" encode"jpg" command=""convert %i %o""/>
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 RC21 PhotoTags: None
- 1 like
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Leave a comment: