https://github.com/bbc-esq/batch_convert_html_to_pdf
Graphical user interface to use the popular wkhtmltopdf library
https://github.com/bbc-esq/batch_convert_html_to_pdf
Last synced: 3 months ago
JSON representation
Graphical user interface to use the popular wkhtmltopdf library
- Host: GitHub
- URL: https://github.com/bbc-esq/batch_convert_html_to_pdf
- Owner: BBC-Esq
- Created: 2025-05-21T10:29:31.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-05-21T11:02:27.000Z (5 months ago)
- Last Synced: 2025-05-21T11:49:04.558Z (5 months ago)
- Language: Python
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
### Step 1
Create a [virtual environment](https://realpython.com/python-virtual-environments-a-primer/):
```
python -m venv .
```
### Step 2
Activate the virtual environment:
```
.\Scripts\activate
```
### Step 3
```
pip install pdfkit
```
### Step 4
Download and install the appropriate executable for [wkhtmltopdf](https://wkhtmltopdf.org/)
> [!TIP]
> You can install to the folder that contains your virtual environment.
Wherever you install it, the executable will be within the ```bin``` folder.
### Step 5
Modify this portion of ```convert_html_to_pdf.py``` to point to the executable:

### Step 6
```
python convert_html_to_pdf.py
```
> [!IMPORTANT]
> IMPORTANT: The script will create a folder with the pdf files in the same directory that your script is located, NOT the directory containing the folder that you selected to process.
## Picture
