Originally posted by arQon
View Post
I work on an e-government web app that due to some stupid legal issues has to be able to print a pdf from the browser directly, without showing it on the screen.
To do that we set print() as an open action to the PDF document and then send it to the browser, where we use a simple hidden iframe and 2 lines of JS to set the PDF data as a source to the hidden iframe. Browsers then parse the PDF document and open a print dialog to print the document, while users see nothing.
With moderate size PDF documents - e.g. 1MB the speed difference is massive. Chrome opens up the print dialog and prints the pdf almost instantaneously (less than 1s), while Firefox may take anywhere up to 15 seconds to process the PDF and display the print dialog.
So yeah. Firefox is slow. Good in other ways, but slow.
To do that we set print() as an open action to the PDF document and then send it to the browser, where we use a simple hidden iframe and 2 lines of JS to set the PDF data as a source to the hidden iframe. Browsers then parse the PDF document and open a print dialog to print the document, while users see nothing.
With moderate size PDF documents - e.g. 1MB the speed difference is massive. Chrome opens up the print dialog and prints the pdf almost instantaneously (less than 1s), while Firefox may take anywhere up to 15 seconds to process the PDF and display the print dialog.
So yeah. Firefox is slow. Good in other ways, but slow.
Leave a comment: