This function allows us to print a PDF documents directly. No need for opening the PDF file in Adobe Reader or other PDF applications.
The PDF pages are rastered and sent to the printer without a dialog. We can specify a couple of options including margins, color/gray/b&w and rotation/scaling. If needed we could add the option to show a dialog and control more print settings.
For OS X you can use PDFKit.Print for similar functionality.