Merge pull request #43 from sarthakroy2002/html-pdf

Add HTML url to PDF converter
This commit is contained in:
Advaita Saha 2022-10-02 11:48:42 +05:30 committed by GitHub
commit e43a912aa0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,9 @@
# HTML to PDF
This is a simple script that lets you convert HTML url to pdf.
## Usage
* Clone the repo
* download the requirements
* Install [wkhtmltopdf](https://wkhtmltopdf.org/downloads.html) as per your operating system
* run `python script.py`

View File

@ -0,0 +1 @@
pdfkit==0.6.1

View File

@ -0,0 +1,5 @@
import pdfkit
url = input('Enter the URL of the HTML: ')
pdf = input('Enter name of output pdf file without extension :')
pdfkit.from_url(url, pdf + '.pdf')
print("Done, The HTML url has been converted to PDF")