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 hashes)
Built Distribution
Close
Hashes for selenium_to_pdf-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff27e78627326418ec0a173b6cd8bfbc2e4a68aa28e2a0ad578ebf4a16db355c |
|
MD5 | 2846016fae953aca60ca8b4cfd482b4f |
|
BLAKE2b-256 | 761bdb8649d4381d86f8fda86658170d3cfee3c00afe80b929c4b458bab3a9a9 |