I am trying to add print functionality to a multi-page PDF embedded in a web page using the PDF.js. This is problematic because I only have one page displayed while the user is viewing it, and the page actually displays as an image in the canvas element.
This question does not help in this case, because it is for a single PDF page where printing the current contents of the canvas is acceptable. Same thing with this question . I also want you to not open the PDF in another tab / window and not tell the user to print, which is detrimental to the goal of embedding it in the page.
Looking through the documentation from Mozilla, I did not find any of my own functions that would simply print PDF, however I will start playing with renderingIntent , which seems to be set to "print".
EDIT: redingIntent does not seem to affect anything, and PDF files are saved the same way, regardless of whether it is set to "display" or "print."
source share