How to print a PDF from the browser

前端 未结 7 1588
天涯浪人
天涯浪人 2020-11-28 07:53

In a Web application, is it possible to force a PDF file to be printed on the client? If the browser is configured to open the PDF inside the window, I guess that calling wi

7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-28 08:16

    The way google docs does it is by embedding JavaScript into the PDF that tells Acrobat Reader or any other compliant reader to print it.

    You would need a PDF toolkit to do this with a random PDF.

提交回复
热议问题