mirror of
https://github.com/metafy-social/python-scripts.git
synced 2024-11-23 20:11:10 +00:00
Add HTML url to PDF converter
Signed-off-by: Sarthak Roy <sarthakroy2002@gmail.com>
This commit is contained in:
parent
d192769244
commit
b8626f28f5
9
scripts/HTML-To-PDF/README.md
Normal file
9
scripts/HTML-To-PDF/README.md
Normal 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`
|
1
scripts/HTML-To-PDF/requirements.txt
Normal file
1
scripts/HTML-To-PDF/requirements.txt
Normal file
|
@ -0,0 +1 @@
|
|||
pdfkit==0.6.1
|
5
scripts/HTML-To-PDF/script.py
Normal file
5
scripts/HTML-To-PDF/script.py
Normal 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")
|
Loading…
Reference in New Issue
Block a user