Not sure if this is the right place to ask this but I’m sure some of you guys 
have been through similar situations.

I use Imagemagick (6.7.6-0) to convert manipulate images on my Terascript 
Server (Mac OSX 10.7.5, Terascript 6.2.1). Works well and resizing, blurring 
and combining images. My latest task is to create a jpeg thumbnail from a PDF.

convert -thumbnail x300 /path/to/file/sample.pdf -flatten 
/path/to/image/sample.jpg

If I enter the above in the terminal it works fine. The small jpeg is created 
in the images folder. However, if I use an External action in Terascript to 
call a shell script and pass the arguments through (which is how I do resizes) 
it fails.

The errors in Console are:
29/06/15 10:39:38.114 PM terascript: convert: `%s' (%d) "/opt/local/bin/gsx" -q 
-dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 
-dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 
-dGraphicsAlphaBits=4 "-r72x72"  
"-sOutputFile=/var/folders/vj/scmvh99n6sl0h152_6mrsjw80000gn/T/magick-wYNS9NxZ--0000001"
 "-f/var/folders/vj/scmvh99n6sl0h152_6mrsjw80000gn/T/magick-q1vOyVrY" 
"-f/var/folders/vj/scmvh99n6sl0h152_6mrsjw80000gn/T/magick-VFa6s5rk" @ 
error/utility.c/SystemCommand/1896.
29/06/15 10:39:38.114 PM terascript: convert: Postscript delegate failed 
`/path/to/file/sample.pdf': No such file or directory @ 
error/pdf.c/ReadPDFImage/668.
29/06/15 10:39:38.114 PM terascript: convert: missing an image filename 
/path/to/image/sample.jpg' @ error/convert.c/ConvertImageCommand/3017.

I believe the first line is Imagemagick (convert) calling Ghostscript (gsx).
The second is 'Postscript delegate failed' but then erroneously says 'No such 
file or directory’
The third says the target file is missing which is correct.

I also tested the TAF using a jpeg as the input file and it creates the 
thumbnail correctly.

So what we know is:
Terminal/Imagemagick/Ghostscript set up works
Terascript/Imagemagick/Ghostscript doesn’t work
Terascript/Imagemagick works

>From this I conclude that it is a permissions or path issue between Terascript 
>and Ghostscript.
Terascript is running under my local user account which is a member of the 
group ‘admin'.
gsx has the following permissions -rwxr-xr-x.

That is as far as I have got up to now. Any helps in next steps would be 
appreciated.

Wayne Irvine
w: http://www.byteserve.com.au/
p: +61 2 9960 6099
m: 0409 960 609




----------------------------------------

To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.

Reply via email to