Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-13-2009, 06:55 AM   #1
Registered: May 2007
Location: Bulgaria
Distribution: Slackware, SCO Unix
Posts: 62

Rep: Reputation: 20
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

This is the right command:
gs -sDEVICE=pdfwrite -sOutputFile="output.pdf" -dNOPAUSE -dEPSCrop -c "<</Orientation 2>> setpagedevice" -f "" -c quit

Last edited by kofucii; 12-13-2009 at 08:13 AM.
Old 12-13-2009, 04:59 PM   #2
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927
And a response to stop the auto-bounce.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ghostscript & pdf mania arunswarup General 0 11-07-2005 02:45 PM
Ghostscript: why is pdf size sometimes increased so much? J_Szucs Linux - Software 2 08-27-2004 10:19 AM
printing landscape pdf Caysho Linux - Newbie 2 01-22-2004 05:26 AM
Anyone using Ghostscript to create pdf files in Central Europe? J_Szucs Linux - Software 0 10-17-2003 06:30 AM
Ghostscript and pdf creation J_Szucs Linux - Software 0 05-29-2003 03:55 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:56 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration