chrome headless 无头浏览器 应用

1. 根据html生成pdf

chrome.exe --headless --disable-gpu --print-to-pdf ...../index.html

2. puppeteer --- nodejs chrome headless 操作库(文档)

这个库可以在nodejs实现 绝大部分的浏览器动作,截图、爬虫.....

具体代码看官方文档,十分详尽

原文地址:https://www.cnblogs.com/amiezhang/p/10405404.html