LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 12-13-2009, 05:55 AM   #1
kofucii
Member
 
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

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 07:13 AM.
 
Old 12-13-2009, 03:59 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

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


Reply



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 01:45 PM
Ghostscript: why is pdf size sometimes increased so much? J_Szucs Linux - Software 2 08-27-2004 09:19 AM
printing landscape pdf Caysho Linux - Newbie 2 01-22-2004 04:26 AM
Anyone using Ghostscript to create pdf files in Central Europe? J_Szucs Linux - Software 0 10-17-2003 05:30 AM
Ghostscript and pdf creation J_Szucs Linux - Software 0 05-29-2003 02:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:09 AM.

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