Skip to main content

gowkhtmltopdf (Python)

In-process Python bindings for the gowkhtmltopdf HTML-to-PDF engine. The package loads libgowkhtmltopdf (a Go -buildmode=c-shared library) with stdlib ctypes; there is no subprocess and no compiled Python extension.

Requires Python 3.8+. Linux is the first-supported platform; macOS and Windows builds follow the wheel matrix.

Document style

Mirrors the Go Document API:

from gowkhtmltopdf import Document, Page, Content

doc = Document(
    pages=[Page(source=Content(html=b"<html><body><h1>Invoice</h1></body></html>"))],
    page_size="A4",
)
pdf_bytes: bytes = doc.pdf()  # or doc.pdf(timeout=30)

Helper style

from gowkhtmltopdf import convert_html_to_pdf, PDFOptions

pdf_bytes = convert_html_to_pdf(
    html=b"<html><body><h1>Invoice #42</h1><p>Total: $19.00</p></body></html>",
    options=PDFOptions(page_size="A4", orientation="portrait"),
)

with open("invoice.pdf", "wb") as f:
    f.write(pdf_bytes)

Images work the same way via ImageDocument or convert_html_to_image(html, options=ImageOptions(width=1024)).

The full build, install, security (ACL / NetworkPolicy), and ABI stability guide lives in documentation/python.md.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gowkhtmltopdf-0.2.5.tar.gz (23.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

gowkhtmltopdf-0.2.5-py3-none-win_amd64.whl (7.4 MB view details)

Uploaded Python 3Windows x86-64

gowkhtmltopdf-0.2.5-py3-none-musllinux_1_2_x86_64.whl (7.6 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

gowkhtmltopdf-0.2.5-py3-none-musllinux_1_2_aarch64.whl (7.1 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

gowkhtmltopdf-0.2.5-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl (7.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

gowkhtmltopdf-0.2.5-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (7.6 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

gowkhtmltopdf-0.2.5-py3-none-macosx_11_0_arm64.whl (6.9 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

Details for the file gowkhtmltopdf-0.2.5.tar.gz.

File metadata

  • Download URL: gowkhtmltopdf-0.2.5.tar.gz
  • Upload date:
  • Size: 23.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for gowkhtmltopdf-0.2.5.tar.gz
Algorithm Hash digest
SHA256 20b90a1d7ed23fd04b1ff06e7db65fc16d7cec0da283c221b12e1eae1e702416
MD5 2ebe498dc43379c1a54d43f5bc32e0c4
BLAKE2b-256 0f01ae6e4f2e2b66842230cca192bbf362a152bf5aaa72a1e4210f6342771493

See more details on using hashes here.

Provenance

The following attestation bundles were made for gowkhtmltopdf-0.2.5.tar.gz:

Publisher: publish-pypi.yml on chinmay-sawant/gowkhtmltopdf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gowkhtmltopdf-0.2.5-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for gowkhtmltopdf-0.2.5-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 cef2e0586b63a8a6adc71d2e3bc6abb49e6d519f69554e1470c819c66964e45c
MD5 3eb63f6a5b6e85db438991dd485cf37e
BLAKE2b-256 2ee28530b39d57415aeb0674a3fb7aae94a83fb6b176d74b6cbb76c62833893e

See more details on using hashes here.

Provenance

The following attestation bundles were made for gowkhtmltopdf-0.2.5-py3-none-win_amd64.whl:

Publisher: publish-pypi.yml on chinmay-sawant/gowkhtmltopdf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gowkhtmltopdf-0.2.5-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for gowkhtmltopdf-0.2.5-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 18969dc7386800b54743843dd00767d2638d013159ffdb62aa3b319dea9721c8
MD5 3b3fe82f884a8aa5c8842dfe789e0948
BLAKE2b-256 d3be912e78682a23253a72e5d52a6a26d482be3f9ed930183cd9627413152015

See more details on using hashes here.

Provenance

The following attestation bundles were made for gowkhtmltopdf-0.2.5-py3-none-musllinux_1_2_x86_64.whl:

Publisher: publish-pypi.yml on chinmay-sawant/gowkhtmltopdf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gowkhtmltopdf-0.2.5-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for gowkhtmltopdf-0.2.5-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 3570ec7ba5ecebba561291b5d60be48869fb5d025b6b1fb97a2ba786afdb1cde
MD5 3d94ed8e3e4d7b5654008d4cdaf72e54
BLAKE2b-256 303280739db30615b3c1054879e3c1d9b4428e7ba471be751e8398f9c2a9bb11

See more details on using hashes here.

Provenance

The following attestation bundles were made for gowkhtmltopdf-0.2.5-py3-none-musllinux_1_2_aarch64.whl:

Publisher: publish-pypi.yml on chinmay-sawant/gowkhtmltopdf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gowkhtmltopdf-0.2.5-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for gowkhtmltopdf-0.2.5-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 5325d90225f581fcc90464633730d155daf03dd5e0db9f3f4b2aa331d45ea4c1
MD5 e17b0755d2d9b3c7eb55d3101618300b
BLAKE2b-256 1c8f995305dd463b8cb0fd5ace14cb2b672a1f1e0948ee46cee3c3a0ae83605e

See more details on using hashes here.

Provenance

The following attestation bundles were made for gowkhtmltopdf-0.2.5-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish-pypi.yml on chinmay-sawant/gowkhtmltopdf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gowkhtmltopdf-0.2.5-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for gowkhtmltopdf-0.2.5-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8765a164b4ee562319cf52415b16fc0aaa53369da92fa3b546726f6f89755c27
MD5 508e64064b3bbd805a591011b7de60e0
BLAKE2b-256 0d93acd8054792e1376271e37aff2e87f0cb5a0a0235e103ee36f6d0db155e66

See more details on using hashes here.

Provenance

The following attestation bundles were made for gowkhtmltopdf-0.2.5-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish-pypi.yml on chinmay-sawant/gowkhtmltopdf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gowkhtmltopdf-0.2.5-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gowkhtmltopdf-0.2.5-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bd0ccff2c0fda59829e4f2e269a4e3d87f20d9f8870ae3bf9e46ae1886db3600
MD5 ba9c3b2f78fd1c8071f98e5bca40655c
BLAKE2b-256 1ca6edb8081a625f668f5f1e4804c9774fe2f4e11787bafa3a9955ff343f1a1a

See more details on using hashes here.

Provenance

The following attestation bundles were made for gowkhtmltopdf-0.2.5-py3-none-macosx_11_0_arm64.whl:

Publisher: publish-pypi.yml on chinmay-sawant/gowkhtmltopdf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.2.6

7 files

This release

0.2.5 This release

7 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page