I think this error basically says that convert can’t run ghostscript.
You may have to write a that just calls gs directly and see if there is some problem running it from the external action. From: Wayne Irvine [mailto:[email protected]] Sent: Monday, April 18, 2016 8:45 PM To: [email protected] Subject: Re: TeraScript-Talk: Terascript>Imagemagick>Ghostscript External doesn’t seem to return any results. I’ve managed to get Imagemagick to create an error.txt file and… 2016-04-19T12:56:19+10:00 0:00.060 0.040u 6.9.3 Policy convert[89262]: policy.c/IsRightsAuthorized/574/Policy Domain: Delegate; rights=Execute; pattern="/usr/local/bin/gs" ... "/usr/local/bin/gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" -dFirstPage=1 -dLastPage=1 "-sOutputFile=/var/tmp/magick-892621OchGEQb8gT8%d" "-f/var/tmp/magick-89262EysDvvpKoL3W" "-f/var/tmp/magick-89262wrsSJraORuPz" 2016-04-19T12:56:20+10:00 0:01.060 0.040u 6.9.3 Locale convert[89262]: locale.c/GetLocaleOptions/825/Locale Searching for locale file: "/usr/local/Cellar/imagemagick/6.9.3-6/share/ImageMagick-6/locale.xml" 2016-04-19T12:56:20+10:00 0:01.060 0.040u 6.9.3 Locale convert[89262]: locale.c/GetLocaleOptions/825/Locale Searching for locale file: "/usr/local/Cellar/imagemagick/6.9.3-6/lib/ImageMagick//config-Q16/locale.xml" 2016-04-19T12:56:20+10:00 0:01.060 0.060u 6.9.3 Locale convert[89262]: locale.c/GetLocaleOptions/825/Locale Searching for locale file: "/usr/local/Cellar/imagemagick/6.9.3-6/etc/ImageMagick-6/locale.xml" 2016-04-19T12:56:20+10:00 0:01.060 0.060u 6.9.3 Locale convert[89262]: locale.c/GetLocaleOptions/825/Locale Searching for locale file: "/usr/local/Cellar/imagemagick/6.9.3-6/share/doc/ImageMagick-6/locale.xml" 2016-04-19T12:56:20+10:00 0:01.060 0.060u 6.9.3 Locale convert[89262]: locale.c/GetLocaleOptions/825/Locale Searching for locale file: "/Users/wayneirvine/.config/ImageMagick/locale.xml" 2016-04-19T12:56:20+10:00 0:01.060 0.060u 6.9.3 Locale convert[89262]: locale.c/GetLocaleOptions/825/Locale Searching for locale file: "/Users/wayneirvine/.magick/locale.xml" 2016-04-19T12:56:20+10:00 0:01.060 0.060u 6.9.3 Configure convert[89262]: locale.c/LoadLocaleCache/1176/Configure Loading locale configure file "/usr/local/Cellar/imagemagick/6.9.3-6/share/ImageMagick-6/locale.xml" ... 2016-04-19T12:56:20+10:00 0:01.060 0.060u 6.9.3 Locale convert[89262]: locale.c/GetLocaleOptions/825/Locale Searching for locale file: "/usr/local/Cellar/imagemagick/6.9.3-6/share/ImageMagick-6/english.xml" 2016-04-19T12:56:20+10:00 0:01.060 0.060u 6.9.3 Locale convert[89262]: locale.c/GetLocaleOptions/825/Locale Searching for locale file: "/usr/local/Cellar/imagemagick/6.9.3-6/lib/ImageMagick//config-Q16/english.xml" 2016-04-19T12:56:20+10:00 0:01.060 0.060u 6.9.3 Locale convert[89262]: locale.c/GetLocaleOptions/825/Locale Searching for locale file: "/usr/local/Cellar/imagemagick/6.9.3-6/etc/ImageMagick-6/english.xml" 2016-04-19T12:56:20+10:00 0:01.060 0.060u 6.9.3 Locale convert[89262]: locale.c/GetLocaleOptions/825/Locale Searching for locale file: "/usr/local/Cellar/imagemagick/6.9.3-6/share/doc/ImageMagick-6/english.xml" 2016-04-19T12:56:20+10:00 0:01.060 0.060u 6.9.3 Locale convert[89262]: locale.c/GetLocaleOptions/825/Locale Searching for locale file: "/Users/wayneirvine/.config/ImageMagick/english.xml" 2016-04-19T12:56:20+10:00 0:01.060 0.060u 6.9.3 Locale convert[89262]: locale.c/GetLocaleOptions/825/Locale Searching for locale file: "/Users/wayneirvine/.magick/english.xml" 2016-04-19T12:56:20+10:00 0:01.060 0.060u 6.9.3 Configure convert[89262]: locale.c/LoadLocaleCache/1176/Configure Loading locale configure file "/usr/local/Cellar/imagemagick/6.9.3-6/share/ImageMagick-6/english.xml" ... 2016-04-19T12:56:20+10:00 0:01.060 0.060u 6.9.3 Exception convert[89262]: delegate.c/ExternalDelegateCommand/483/Exception FailedToExecuteCommand `"/usr/local/bin/gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" -dFirstPage=1 -dLastPage=1 "-sOutputFile=/var/tmp/magick-892621OchGEQb8gT8%d" "-f/var/tmp/magick-89262EysDvvpKoL3W" "-f/var/tmp/magick-89262wrsSJraORuPz"' (-1) 2016-04-19T12:56:20+10:00 0:01.060 0.060u 6.9.3 Resource convert[89262]: resource.c/RelinquishUniqueFileResource/1042/Resource Relinquish /var/tmp/magick-89262EysDvvpKoL3W 2016-04-19T12:56:20+10:00 0:01.060 0.060u 6.9.3 Exception convert[89262]: utility.c/ShredFile/1822/Exception Failed to remove: /var/tmp/magick-89262EysDvvpKoL3W.cache 2016-04-19T12:56:20+10:00 0:01.060 0.060u 6.9.3 Resource convert[89262]: resource.c/RelinquishUniqueFileResource/1042/Resource Relinquish /var/tmp/magick-89262wrsSJraORuPz 2016-04-19T12:56:20+10:00 0:01.060 0.060u 6.9.3 Exception convert[89262]: utility.c/ShredFile/1822/Exception Failed to remove: /var/tmp/magick-89262wrsSJraORuPz.cache 2016-04-19T12:56:20+10:00 0:01.060 0.060u 6.9.3 Resource convert[89262]: resource.c/RelinquishUniqueFileResource/1042/Resource Relinquish /var/tmp/magick-892621OchGEQb8gT81 2016-04-19T12:56:20+10:00 0:01.060 0.060u 6.9.3 Exception convert[89262]: utility.c/ShredFile/1822/Exception Failed to remove: /var/tmp/magick-892621OchGEQb8gT81.cache 2016-04-19T12:56:20+10:00 0:01.060 0.060u 6.9.3 Cache convert[89262]: cache.c/DestroyPixelCache/999/Cache destroy 2016-04-19T12:56:20+10:00 0:01.060 0.060u 6.9.3 Exception convert[89262]: convert.c/ConvertImageCommand/3252/Exception no images defined `/Library/Server/Web/Data/Sites/~bartel/brochures/images/SI-7EA0A-002-00-Eng_v1_m56577569830759287.jpg' convert: FailedToExecuteCommand `"/usr/local/bin/gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" -dFirstPage=1 -dLastPage=1 "-sOutputFile=/var/tmp/magick-892621OchGEQb8gT8%d" "-f/var/tmp/magick-89262EysDvvpKoL3W" "-f/var/tmp/magick-89262wrsSJraORuPz"' (-1) @ error/delegate.c/ExternalDelegateCommand/483. convert: no images defined `/Library/Server/Web/Data/Sites/~bartel/brochures/images/SI-7EA0A-002-00-Eng_v1_m56577569830759287.jpg' @ error/convert.c/ConvertImageCommand/3252. Haven’t managed to make head nor tail of it yet. Wayne On 16 Apr 2016, at 1:43 AM, Robert Shubert <[email protected] <mailto:[email protected]> > wrote: The external action creates a resultset – are you displaying this to see if there is anything useful in it? From: Wayne Irvine [ <mailto:[email protected]> mailto:[email protected]] Sent: Thursday, April 14, 2016 9:29 PM To: <mailto:[email protected]> [email protected] Subject: TeraScript-Talk: Terascript>Imagemagick>Ghostscript I’ve got a set up on my dev server that allows a user to upload a PDF and creates a JPG thumbnail from it. It’s running on Terascript Server 6.21 on a Mac with OSX 10.7.5. I’m trying to set up the same on Terascript 7 on a Mac running 10.10.5. Ghostscript 9.19 I have Imagemagick running and it can resize files nicely but I’m having trouble with the conversion process from PDF to JPG, which involves Ghostscript. The script is run by a Command Line Action and looks something like this: sudo -u username -p password /opt/local/bin/convert -thumbnail 215x300 /path/to/source.pdf[0] -flatten /path/to/target.jpg The strange thing is that when I run this line from the Terminal it works correctly so Imagemagick and Ghostscript are set up and working. The error I’m seeing in the Console is this: 4/15/16 1:46:24.983 PM sudo[4723]: wayneirvine : TTY=unknown ; PWD=/Applications/TeraScript Server 7/log_TeraScript_Server_7 ; USER=username ; COMMAND=/opt/local/bin/convert -thumbnail 215x300 /path/to/source.pdf[0] -flatten /path/to/target.jpg I added the following lines to the sudoers file: Default:username !requiretty username ALL=(ALL) NOPASSWD: ALL Now I get no error, but no JPG either. Any help from the unix gurus would be appreciated. Byteserve Pty Ltd w: <http://www.byteserve.com.au/> http://www.byteserve.com.au/ e: <mailto:[email protected]> [email protected] p: +61 02 9960 6099 m: 0409 960 609 f: +61 02 9960 6088 _____ To unsubscribe from this list, please send an email to <mailto:[email protected]> [email protected] with "unsubscribe terascript-talk" in the body. _____ To unsubscribe from this list, please send an email to <mailto:[email protected]> [email protected] with "unsubscribe terascript-talk" in the body. Byteserve Pty Ltd w: http://www.byteserve.com.au/ e: [email protected] <mailto:[email protected]> p: +61 02 9960 6099 m: 0409 960 609 f: +61 02 9960 6088 _____ To unsubscribe from this list, please send an email to [email protected] <mailto:[email protected]> with "unsubscribe terascript-talk" in the body. ---------------------------------------- To unsubscribe from this list, please send an email to [email protected] with "unsubscribe terascript-talk" in the body.
