Ghostscript PDF to TIF

Post Reply
congomonster
Member
Posts: 25
Joined: Wed Jul 03, 2013 5:40 pm
Location: Germany
Contact:

Ghostscript PDF to TIF

Post 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?
_olq
Member
Posts: 36
Joined: Fri Aug 23, 2013 10:21 am
Location: Poland

Ghostscript PDF to TIF

Post by _olq »

I think you forgot "-o" operator

See code below.

-q -dNOSAFER -dBATCH -dNOPAUSE -sDEVICE=tiffg4 -r300 -o "%2" "%1"
Aleksander
freddyp
Advanced member
Posts: 1022
Joined: Thu Feb 09, 2012 3:53 pm

Ghostscript PDF to TIF

Post 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
congomonster
Member
Posts: 25
Joined: Wed Jul 03, 2013 5:40 pm
Location: Germany
Contact:

Ghostscript PDF to TIF

Post by congomonster »

Awesome! it workss now! BIG Thank You!
Post Reply