I'm getting PDF file as output stream and want to print it using Javascript. There're some tips about printing PDF file or iframe. But I need to print PDF files that is generated by server after print request.
1 Answer
JavaScript can't access any local resources like the file system or attached printers, so this isn't possible directly.
What you need is to convert the PDF to, say, HTML5. Then display that in your browser and call document.print() to print it.
The project pdf.js already does a pretty good job to convert PDF to HTML.