Reputation: 11
I am plotting the (postscript) ps file using the ghostscript in the terminal.
When I use the command"gs file.ps", it always gives the portrait orientation like following enter image description here
do you know how could I rotate the plot with 90 degree with landscape orientation?
Upvotes: 0
Views: 663
Reputation: 31139
Without seeing the input file its not really possible to tell. However, the simple answer is that you need to produce your PostScript program so that it prints on landscape media.
Most likely you created the program by printing to a device which was described as using portrait media. So the application generated PostScript which would fit on that media.
You could edit the PostScript program, or you could try getting Ghostscript to do this for you. It may not work, it depends on how the program is written.
If you set the Ghostscript media to the size and orientation you want, tell Ghostscript the media is 'fixed' so that programs can't change it, and then tell Ghostscript to 'fit' the content, then it will choose the orientation which fits best.
Example command line:
gs -sDEVICE=<insert here> -sOutputFile=<your path> -dDEVICEWIDTHPOINTS=612 -dDEVICEHEIGHTPOINTS=792 -dFIXEDMEDIA -dFitPage <input.ps>
That sets up US Letter media (612x792 points), makes it fixed and requests the content fit the page.
If that doesn't work for you then I'd need to see the inptu PostScript program before offering further suggestions.
Upvotes: 1