Solved

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

Posted on 2009-04-04
5
1,535 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
  • 3
  • 2
5 Comments
 
LVL 76

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 76

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 76

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Deploystudio is a system which can be used to deploy OSX clients and servers within the small/medium or large business environments. The system is built onto of the OSX Server NetBoot system and uses images & workflows as its core assets. While work…
A common question or need, when setting-up a new Mac for someone would be to make all of the applications, installed, available from the dock. Many people often do not realize an application is installed unless it is in the dock. Creating a custo…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

758 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now