strict warning: Only variables should be assigned by reference in /home/itechpros/servoyguy.com/sites/all/modules/links/links.inc on line 1434.

Mac: Print a PDF directly to a printer

LPR is the unix based printing built into the Mac. You can get a list of your available printers at http://servoyguy.com/modules/extlink/extlink.png); background-repeat: no-repeat; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: initial; padding-right: 12px; color: #022726; text-decoration: none; background-position: 100% 50%;" title="http://localhost:631/printers" href="http://localhost:631/printers" target="_blank">http://localhost:631/printers .  When passing in a printer name, make sure you use the name listed on the left (the one without spaces).

var jobName = "print.pdf"
var printerName = arguments[0]
var printQuantity = arguments[1]
var printerTray = arguments[2]

//print out to PDF 
currentcontroller.print(true,false,plugins.pdf_output.getPDFPrinter(jobName));

//send the PDF to the printer 
application.executeProgram( '/usr/bin/lpr', "-T", jobName, "-P", printerName, "-#" , printQuantity, "-o", "media=" + printerTray, jobName );