Add HTML url to PDF converter

Signed-off-by: Sarthak Roy <sarthakroy2002@gmail.com>
This commit is contained in:
Sarthak Roy 2022-10-02 10:09:30 +05:30
parent d192769244
commit b8626f28f5
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")