Solved

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

Posted on 2009-04-04
5
1,543 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 77

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 77

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 77

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
iOS vulnerability (9.3.5) 5 80
Q-See QT View from the Apple Store or ..,.. ? 2 92
Load Mac OS 10.12 Sierra within Windows virtual machine 8 70
Mac Infection 16 46
Information security is a multi-billion dollar industry. Just as lucrative is the black market industry which trades stolen identities, credit card numbers and software exploits all over the world. Nothing is hack-proof. The best one can do is make …
iCloud Drive was introduced after iOS 8 was launched last year. This drive is Apple’s online storage device that lets users sync their files and access them from all their Apple devices.   There is a lot of data that is not automatically backed up…
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 …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

920 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

12 Experts available now in Live!

Get 1:1 Help Now