The external action creates a resultset – are you displaying this to see if 
there is anything useful in it?



From: Wayne Irvine [mailto:wa...@byteserve.com.au]
Sent: Thursday, April 14, 2016 9:29 PM
To: TeraScript-Talk@terascript.com
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/
e: i...@byteserve.com.au <mailto:i...@byteserve.com.au>
p: +61 02 9960 6099
m: 0409 960 609
f: +61 02 9960 6088





  _____

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




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

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

Reply via email to