Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mac OS: print PDF in landscape orientation from command line

I am trying to print a pdf in landscape orientation (90 degrees rotated) from the command line with this command:

lp -o landscape test.pdf

Besides the fact that it is minimized from A4 to A5 (which is correct) it is still printed in portrait modein the lower left corner of the paper.

This command has the same effect:

lp -o orienation-requested=4 test.pdf

When I try it from the preview app, it works, but I have to switch off "rotate automatically". Unfortunately there is no command line equivalent for the lp command (I know). Can anyone help?

P.S. When i try this with a text file everything works fine...

like image 403
heinob Avatar asked Dec 29 '25 12:12

heinob


1 Answers

heinob--

I believe this is the proper syntax to enter in the command line for what you're trying to do:

lp -o landscape -o fit-to-page -o media=A4 test.pdf

Then again, it could just be a weird issue with your printer.

like image 59
user3607119 Avatar answered Jan 01 '26 03:01

user3607119



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!