Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Print from the command line via Print Center UNIX
You can print from the command line using the Print Center's default printer like this:
open -a Print\ Center /path/to/file_to_print.pdf
[rob adds: We've covered printing from the command line via lpr a number of times, but I don't think we've talked about printing via the Print Center from the command line. This works just like lpr /path/to/file_to_print.pdf, but you'll see the Print Center open, showing the spooling status of the job (assuming you're local to the Mac in question, of course!).]
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[4,590 views]  

Print from the command line via Print Center | 2 comments | Create New Account
Click here to return to the 'Print from the command line via Print Center' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Print from the command line via Print Center
Authored by: whays on Feb 09, '05 02:10:32AM

I have been working on a script to print a document that is dropped into a folder. When using a script such as the one in this hint the default page size and settings (defined in printing pref pane) are used. The roadblock I am running into is that the size of my documents are not a standard paper size (20"x27"). Does anyone know how to add a custom page size as the default page size for a printer? You can set the default page size in the printing pref pane, but the only options are standard sizes (The largest being Super B which is 13"x19"). Adding a custom page size in a page setup dialog box does not help.



[ Reply to This | # ]
Print from the command line via Print Center
Authored by: Eravau on Feb 09, '05 02:49:26PM

I'm guessing you would have to edit the Printer Description File (PPD) for that printer and add in that page size. I don't know the syntax for doing such, but poke around and you can probably figure it out.



[ Reply to This | # ]