We have files on server of several types (.pdf, .docx, .jpeg). The scenario is a user press a button (a link) and the print dialog opens which will print the content of a file chosen. Can you please advise solutions to do it?
I think it's gonna be a link to another page where we fill in response with a file content and JavaSc开发者_开发知识库ript window.print();
The option you've considered (opening the file in a new page) is a good one. You could also try doing the same thing but in an iframe
. That would maybe be a better user experience if you want to avoid a new page/tab opening up.
精彩评论