Given an HTML document, converts thereupon to a PDF using Selenium's DevTools.
Project description
selenium-to-pdf
Given an HTML document, converts thereupon to a PDF using Selenium's DevTools.
Requires selenium and ChromeDriver. For more information on how to install ChromeDriver, see here.
Example
from selenium_to_pdf import convert
url = "https://www.fulltextarchive.com/book/dante-s-inferno/#CANTO-1-2"
pdf_data = convert.html_to_pdf(url=url)
with open("dante.pdf", "wb") as f:
f.write(pdf_data)
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 Distribution
selenium_to_pdf-0.3.0.tar.gz
(3.0 kB
view details)
Built Distribution
File details
Details for the file selenium_to_pdf-0.3.0.tar.gz
.
File metadata
- Download URL: selenium_to_pdf-0.3.0.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.11.2 Darwin/22.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac49761e408ce210164972a4997591288d8038abaee803d7e28ad75dd504717d |
|
MD5 | 4145c2e1b9ab955ab0dc83e001a264a4 |
|
BLAKE2b-256 | fe624265e49ba792f2920d3e001f397516b48b07feb50213f1411154ecf43e12 |
File details
Details for the file selenium_to_pdf-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: selenium_to_pdf-0.3.0-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.11.2 Darwin/22.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff27e78627326418ec0a173b6cd8bfbc2e4a68aa28e2a0ad578ebf4a16db355c |
|
MD5 | 2846016fae953aca60ca8b4cfd482b4f |
|
BLAKE2b-256 | 761bdb8649d4381d86f8fda86658170d3cfee3c00afe80b929c4b458bab3a9a9 |