Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2009-04-04
5
Medium Priority
?
1,567 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 2000 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

How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

Question has a verified solution.

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

A lot of new and distinct gadgets are making their appearance every other day. The latest gadget that has wooed the attention of all gadget lovers and non gadget lovers alike is the Smartwatch. This tiny gadget is capable of offering live access to …
A professional opinion on which Apple product to buy, and a tidbit about the WWDC.
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 …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

688 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