diff --git a/scripts/HTML-To-PDF/README.md b/scripts/HTML-To-PDF/README.md new file mode 100644 index 0000000..8a79c9c --- /dev/null +++ b/scripts/HTML-To-PDF/README.md @@ -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` diff --git a/scripts/HTML-To-PDF/requirements.txt b/scripts/HTML-To-PDF/requirements.txt new file mode 100644 index 0000000..da9d589 --- /dev/null +++ b/scripts/HTML-To-PDF/requirements.txt @@ -0,0 +1 @@ +pdfkit==0.6.1 diff --git a/scripts/HTML-To-PDF/script.py b/scripts/HTML-To-PDF/script.py new file mode 100644 index 0000000..34c0e5c --- /dev/null +++ b/scripts/HTML-To-PDF/script.py @@ -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")