How to create landscape oriented pdf with ghostscript?
Hello, im using cups filter 'texttops', to generate postscript file, then I;m using ghostscript to create pdf file. The problem is, that file generated from texttops don't contain landscape orientation instructions. How can I force ghostscript to do that. Here is the command Im using:
gs -sDEVICE=pdfwrite -sOutputFile=<outfile> -dBATCH -dNOPAUSE -f <infile>
I've found on the internet these instructions, but they don't work for me:
gs -dBATCH -dNOPAUSE -sOutputFile=myfile.pdf -sDEVICE=pdfwrite -dAutoRotatePages=/None -c "<< /PageSize [612 792] /Orientation 3 >> setpagedevice" 90 rotate 0 -612 translate -f myfile.eps
gs -dBATCH -dNOPAUSE -sOutputFile=myfile.pdf -sDEVICE=pdfwrite -c "<< /PageSize [792 612] >> setpagedevice" -f myfile.eps
SOLVED:
This is the right command:
gs -sDEVICE=pdfwrite -sOutputFile="output.pdf" -dNOPAUSE -dEPSCrop -c "<</Orientation 2>> setpagedevice" -f "input.ps" -c quit
Last edited by kofucii; 12-13-2009 at 08:13 AM.
|