Get PDFs from URLs using chrome
Project description
# Chrome-PrintToPDF
Latest Chrome Browser supports getting PDFs for websites.
## Install
Requires Python 3.5+
pip install chrome-printtopdf
## Usage
On the command line:
python -m chrome_printtopdf /path/to/chrome-bin http://example.org/ out.pdf
As a library. Have a look at the source for `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())
```
Latest Chrome Browser supports getting PDFs for websites.
## Install
Requires Python 3.5+
pip install chrome-printtopdf
## Usage
On the command line:
python -m chrome_printtopdf /path/to/chrome-bin http://example.org/ out.pdf
As a library. Have a look at the source for `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())
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file chrome_printtopdf-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: chrome_printtopdf-0.0.2-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03363b81137728ab203a37b48511c36278757152fa0019230383d8960572bde8 |
|
MD5 | 31586805342243b6bf24295bcc223bd2 |
|
BLAKE2b-256 | 02c3b0731be0c8b709d1eb4ef0eacf0af61603210023e74702f1e35225c26d7d |