Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
macOS - Apps and Programs
How print files in Preview to pdf from command line?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="vansmith" data-source="post: 1104408" data-attributes="member: 71075"><p>You can use the lpr tool to print from the CLI. Open up Terminal and execute the following:[code]lpr /path/to/file[/code]That will print the file from the default printer. If you want to specify a printer, execute the following to get the appropriate printer names:[code]lpstat -v | awk '{ print $3; }'[/code]Find the printer in that list and then specify for lpr by doing the following:[code]lpr -P <printer name> /path/to/file[/code]When inserting the printer name in this command, exclude the colon at the end.</p><p></p><p>Take a look at the man page for lpr to see some more options (man lpr).</p></blockquote><p></p>
[QUOTE="vansmith, post: 1104408, member: 71075"] You can use the lpr tool to print from the CLI. Open up Terminal and execute the following:[code]lpr /path/to/file[/code]That will print the file from the default printer. If you want to specify a printer, execute the following to get the appropriate printer names:[code]lpstat -v | awk '{ print $3; }'[/code]Find the printer in that list and then specify for lpr by doing the following:[code]lpr -P <printer name> /path/to/file[/code]When inserting the printer name in this command, exclude the colon at the end. Take a look at the man page for lpr to see some more options (man lpr). [/QUOTE]
Verification
Post reply
Forums
Apple Computing Products:
macOS - Apps and Programs
How print files in Preview to pdf from command line?
Top