javascript文档
A teeny-tiny javascript library that made printing from the web incredibly simple.
一个很小的javascript库,使从网络打印变得异常简单。
![Image for post](https://img-blog.csdnimg.cn/img_convert/28aef160fe7bb2fd1efb6064d7a27e04.png)
Print.js was primarily written to help us print PDF files directly within our apps, without leaving the interface, and no use of embeds. For unique situations where there is no need for users to open or download the PDF files, and instead, they just need to print them. One scenario where this is useful, for example, is when users request to print reports that are generated on the server-side. These reports are sent back as PDF files. There is no need to open these files before printing them. Print.js offers a quick way to print these files within our apps.
Print.js的主要目的是帮助我们直接在我们的应用程序中打印PDF文件,而无需离开界面,也不使用嵌入。 对于不需要用户打开或下载PDF文件的独特情况,他们只需要打印即可。 例如,当用户请求打印服务器端生成的报告时,这种方法很有用。 这些报告以PDF文件的形式发送回。 无需在打印之前打开这些文件。 Print.js提供了一种在我们的应用程序中打印这些文件的快速方法。
1)下载并安装 (1) Download and Install)
You can either download the latest version(v1.2.0) of Print.js from the GitHub releases or use one of the two steps given below depending on your package manager.