How to specify the "convert" command on a windows machine


As I try to import a *.pdf file into my Nuxeo base, I receive the error:

cmd /C convert -strip -thumbnail “280x280” -background transparent -gravity center -format png -quality 75 “C:\Install\nuxeo-cap-5.8-tomcat-sdk\nxserver\data\binaries\data\71\ad\71ad7872e4eed88aa27a471168dd1ca2”[0] “C:\Install\nuxeo-cap-5.8-tomcat-sdk\tmp\nuxeoImageTarget6462768296416697612.png” Param�tre non valide - -thumbnail

It seemes that the “convert” command which is tried is the Unix flavour of this command, while I am on a Windows machine!!

How can I configure Nuxeo to specifiy the correct command to convert or to generate the thumnail?

Thanks for any hint…

Regards Christian Arnault

0 votes

1 answers




Follwing the recipe, I did properly installed ImageMagick (I have check that it runs correctly) and set up the single thread option.

However, I still get an error. (I run it through the IDE)

If I extract the command tried by the Nuxeo server and call it manually from a DOS prompt, I exactly reproduce the error:

C:\tmp>convert -strip -thumbnail "280x280" -background transparent -gravity center -format png -quality 75 "C:\Install\n uxeo-cap-5.8-tomcat-sdk\nxserver\data\binaries\data\3a\af\3aaff31d1b6a618dd849bedfc7bbae2b"[0] "C:\Install\nuxeo-cap-5.8 -tomcat-sdk\tmp\nuxeoImageTarget6592337659955047660.png" convert.exe: %s' (%d) "gswin32c.exe" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPix els=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" -dFirstPage=1 -dLastPage=1 "-s OutputFile=C:/Users/arnault.LAL/AppData/Local/Temp/magick-5732LgQXybV7CGjf-1" "-fC:/Users/arnault.LAL/AppData/Local/Temp /magick-5732dy83e4v5IDuI" "-fC:/Users/arnault.LAL/AppData/Local/Temp/magick-5732PzhJqdT7QA6C" @ error/utility.c/SystemCo mmand/2033. convert.exe: Postscript delegate failedC:\Install\nuxeo-cap-5.8-tomcat-sdk\nxserver\data\binaries\data\3a\af\3aaff31d1 b6a618dd849bedfc7bbae2b': No such file or directory @ error/pdf.c/ReadPDFImage/682. convert.exe: no images defined `C:\Install\nuxeo-cap-5.8-tomcat-sdk\tmp\nuxeoImageTarget6592337659955047660.png' @ error /convert.c/ConvertImageCommand/3144.

To make it clearer, I just copy the Nuxeo file at my execution place renaming it as A.pdf

C:\tmp>convert -strip -thumbnail "280x280" -background transparent -gravity center -format png -quality 75 "A.pdf"[0] "A .png" convert.exe: %s' (%d) "gswin32c.exe" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPix els=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" -dFirstPage=1 -dLastPage=1 "-s OutputFile=C:/Users/arnault.LAL/AppData/Local/Temp/magick-12424n2TWriWJvHpv-1" "-fC:/Users/arnault.LAL/AppData/Local/Tem p/magick-12424WfixpQDQ_CtU" "-fC:/Users/arnault.LAL/AppData/Local/Temp/magick-12424Dkj-7DOEV1ek" @ error/utility.c/Syste mCommand/2033. convert.exe: Postscript delegate failedA.pdf': No such file or directory @ error/pdf.c/ReadPDFImage/682. convert.exe: no images defined `A.png' @ error/convert.c/ConvertImageCommand/3144.

Can you halp me understanding what happens?

Regards Christian



OK I think I understood what's wrong:

I had to install ghostscript as well on my machine

Now things are OK

Thanks again for the clue.

Regards Christian


convert is part of ImageMagick, which you need to install. Please see Installing and Setting up Related Software for details.

0 votes

Thanks a lot for this information

I'll follow this recipe immediately.

Regards Christian