Page 1 of 1

Ghostscript PDF to TIF

Posted: Thu Oct 16, 2014 8:14 am
by congomonster
Hello,



i need some help for a conversion from PDF to TIF. I have Ghostscript installed and it worked with the terminal. I think my problem has something to do with the output path.



Arguments: -q -dNOSAFER -dNOPAUSE -dBATCH -r300 -sDEVICE=tiffg4 -sPAPERSIZE=a4 -deletfile "%2" "%1"



Output: file in path



Extension: Tiff



And i turned the endcode of. Switch says the it come out with the code=1



I think i must put -OutputFile= in my code. But that doe's not work. Can anybody help please?

Ghostscript PDF to TIF

Posted: Thu Oct 16, 2014 10:14 am
by _olq
I think you forgot "-o" operator

See code below.

-q -dNOSAFER -dBATCH -dNOPAUSE -sDEVICE=tiffg4 -r300 -o "%2" "%1"

Ghostscript PDF to TIF

Posted: Thu Oct 16, 2014 10:18 am
by freddyp
Yes, you must add an argument for the output file, but it is not -OutputFile, but -sOutputFile.



Apart from that, I advise to put the whole command in a shell script or BAT file. So, in "Command or path" you choose the script file, in "Arguments" you just put "%1" "%2" and in the shell script (in my case) you write:

#!/bin/bash

/usr/local/bin/gs -q -dNOSAFER -dNOPAUSE -dBATCH -r300 -sDEVICE=tiffg4 -sPAPERSIZE=a4 -sOutputFile="$2" "$1"

exit



Do not forget to chmod +x the shell script! On Windows it is similar, but in the BAT file you do not use $1 and $2 but %1 and %2.



Freddy

Ghostscript PDF to TIF

Posted: Thu Oct 16, 2014 10:18 am
by congomonster
Awesome! it workss now! BIG Thank You!