Python client for HTML2PDF4Doc JavaScript library.
Project description
html2pdf4doc_python
html2pdf4doc_python is the Python wrapper/CLI for the html2pdf4doc JavaScript library that prints HTML pages into PDFs using Chrome/Chromedriver.
This repository focuses strictly on the Python-side automation layer. The rendering logic remains in the JS core.
Installation
-
Install Google Chrome (or Chrome for Testing) on the machine that will run the CLI.
-
Install the package from PyPI:
pip install html2pdf4doc
Python 3.8+ is required.
See also: the Ubuntu-based container Dockerfile and the GitHub CI files found
in the .github/workflows folder.
Usage
TBD
Developer guide
Getting started
1. (Optional) Create and activate a virtual environment
python -m venv .venv && source .venv/bin/activate
2. Install the dependencies
git clone https://github.com/strictdoc-project/html2pdf4doc_python.git
cd html2pdf4doc_python
# Bootstrap minimal Python dependencies: Invoke and TOML.
pip install invoke toml
# Install all Python dependencies and update the submodule with the html2pdf4doc.js.
invoke bootstrap
3. The JS library is maintained in a Git submodule submodules/html2pdf.
When the submodule is updated after a release or during the development, rebuild
the JS library, i.e., regenerate the html2pdf4doc.min.js:
invoke build
4. To validate changes, use the following commands:
invoke lint
invoke test # Normal tests.
invoke test-fuzz # More robust testing.
License
The project is distributed under the Apache License 2.0 (see LICENSE).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file html2pdf4doc-0.0.33.tar.gz.
File metadata
- Download URL: html2pdf4doc-0.0.33.tar.gz
- Upload date:
- Size: 61.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5eee7f3f1fec69c46dae376f9a57c2c162da2ac37a38be60098be8e883fec759
|
|
| MD5 |
a70724ed5bee11d47850db1bf9bf9a7d
|
|
| BLAKE2b-256 |
303a81a53441195f373dbcb171236a801d2849f4efa42dfff7d36feb48484ae7
|
File details
Details for the file html2pdf4doc-0.0.33-py3-none-any.whl.
File metadata
- Download URL: html2pdf4doc-0.0.33-py3-none-any.whl
- Upload date:
- Size: 63.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2c540cc367c7b441928fc686a128493a552dabf0fe8c3024ac2e247e3bba833
|
|
| MD5 |
fbdc4d6bc1c253e3360c0ddf1838a0e5
|
|
| BLAKE2b-256 |
df95122d5439bb8d60ee630f0a6fdacd7a273aa66c690e4d7a526875de766736
|