简体   繁体   English

NodeJS - npm package - html-pdf 备用

[英]NodeJS - npm package - html-pdf alternate

I am creating a pdf from a static HTML code in nodejs using html-pdf npm package. I am creating a pdf from a static HTML code in nodejs using html-pdf npm package. But it is critical severity vulnerability.但它是严重的严重漏洞。 I want to change this package.我想改变这个 package。 Is there any package available to convert an HTML code to PDF on the server-side.是否有任何 package 可用于在服务器端将 HTML 代码转换为 PDF。

yes, sir... u can use Puppeteer.是的,先生……您可以使用 Puppeteer。 Puppeteer is a Node library which provides a high-level API to control Chrome or Chromium over the DevTools Protocol. Puppeteer 是一个 Node 库,它提供了一个高级 API 来通过 DevTools 协议控制 Chrome 或 Chromium。 Puppeteer runs headless by default but can be configured to run full (non-headless) Chrome or Chromium. Puppeteer 默认运行无头,但可以配置为运行完整(非无头)Chrome 或 Chromium。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM