Solved

Mac OS X - how to print landscape pdfs from command line interface using lpr

Posted on 2009-04-04
5
1,559 Views
Last Modified: 2012-05-06
My question is similar to ID:22526539 - I develop using RealBasic and am trying to print pdfs without launching Preview.  I create pdfs(in landscape) in my program then want to print a batch of them. I can use the command line through RealBasic, so I have tried 'lpr -o landscape filename.pdf' and I do not get landscape - the page is portrait and the printing begins about 1/3 of the way down the page.

I can get landscape orientation if I use 'lpr -o orientation-requested=4', but then the left margin doesn't exist. I tried 'lpr -o orientation-requested=4 -o page-left=36' and the margin still does not exist.

Not sure what I'm doing wrong... please help!

0
Comment
Question by:akhakh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 79

Expert Comment

by:arnold
ID: 24070102
http://www.cups.org/documentation.php/options.html
http://www.unix.com/unix-dummies-questions-answers/14973-lpr-landscape.html

The common thread is to see what options the printer supports:
/etc/lp/interface/printername
0
 

Author Comment

by:akhakh
ID: 24071772
I will have no control over what printers/options are installed.  I can't believe that printing a pdf on a Mac is this difficult.  Is there any approach you can recommend that would enable me to batch print pdfs from either the command line or applescript?  Should I start a new question?
0
 
LVL 79

Accepted Solution

by:
arnold earned 500 total points
ID: 24071955
You have to see whether the interface that is defined for the printer supports the landscape option.  

What happens if you print a plain text document with the -o landscape option?

Try using the lp rather than LPR?
http://www.cups.org/documentation.php/options.html

Approaching this from a Unix perspective and the use of the lpr.

not sure whether using a preprocessing filter for pdf files i.e. with enscript.

not sure whether with the -o landscape you need to provide the media type as well depending on the printer in use?
0
 

Author Comment

by:akhakh
ID: 24123773
I've decided to go in a different direction on this - should I award the points anyway?
0
 
LVL 79

Expert Comment

by:arnold
ID: 24124002
If the comments did not help you, but the links are useful, close the question selecting one of your comments as the solution.  If the comments/links were of no use, delete the question.
0

Featured Post

Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There is a security feature on iOS devices that is nearly impenetrable when it has been activated.  This article will provide some possible solutions as well as necessary steps to take to ensure you do not end up with a locked device.
In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question