0

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 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.