# html-to-pdf
**Repository Path**: zmmsdk_admin/html-to-pdf
## Basic Information
- **Project Name**: html-to-pdf
- **Description**: 使用puppeteer将html页面转为pdf
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 1
- **Created**: 2024-09-20
- **Last Updated**: 2024-09-20
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
安装包(需注意Chrome是否成功安装)
```
pnpm i
```
启动服务
```
node index.js
```
启动成功后可用 `http://127.0.0.1:3080/create-pdf?link=https://www.baidu.com/` 来生成pdf
如不想用puppeteer,可看下print.html
print.html是使用原生的window.print()的示例代码