Solved

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

Posted on 2009-04-04
5
1,553 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 78

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 78

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 78

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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Suggested Solutions

Do you come here a lot? Are you lazy like me and don't want to go through the "trouble" of having to click your Dock's Safari icon and then having to click your Experts Exchange Favorites bookmark to get here? Well then this article is for you.
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 …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

751 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