Skip to main content

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())
```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
chrome_printtopdf-0.0.2-py3-none-any.whl (5.5 kB) Copy SHA256 hash SHA256 Wheel py3

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page