跳转到主要内容

使用chrome从URL获取PDF

项目描述

# Chrome-PrintToPDF

最新版的Chrome浏览器支持获取网站的PDF文件。

## 安装

需要Python 3.5+

pip install chrome-printtopdf


## 使用方法

在命令行中

python -m chrome_printtopdf /path/to/chrome-bin http://example.org/ out.pdf

作为库。请查看源代码了解`asyncio` API。
```python
from chrome_printtopdf import get_pdf_with_chrome_sync

pdf_file = get_pdf_with_chrome_sync('http://example.org',
chrome_binary='/path/to/chrome-bin')

with open('example.org.pdf', 'wb') as f
f.write(pdf_file.read())
```

项目详细信息


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于安装软件包的信息。

源代码分发

此版本没有可用的源代码分发文件。请参阅生成分发存档的教程

构建分发

chrome_printtopdf-0.0.2-py3-none-any.whl (5.5 kB 查看哈希值)

上传时间: Python 3

支持者