I know that there are ways to print a PDF file on a network printer located on the same network as the server, but this does not help me, since the server is remote. In my situation, the user clicks the link to “print labels”, which then generates and displays a PDF file formatted for them. I am currently “transferring” the output of the file to the browser, so Adobe Reader automatically opens it using the following code:
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Content-type: application/pdf"); header('Content-Disposition: attachment; filename="labels.pdf"'); readfile($ServerPathToFile);
Is there anything else I can add to this code that will automatically launch the print dialog to open so that they only press print? In this case, Google CloudPrint is not an option, as well as other things that require a “special setup” at the end of the user ... as this will be used by different users.
source share