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.6.tar.gz (23.5 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.6-py3-none-win_amd64.whl (7.8 MB view details)

Uploaded Python 3Windows x86-64

gowkhtmltopdf-0.2.6-py3-none-musllinux_1_2_x86_64.whl (8.0 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

gowkhtmltopdf-0.2.6-py3-none-musllinux_1_2_aarch64.whl (7.4 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

gowkhtmltopdf-0.2.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl (7.4 MB view details)

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

gowkhtmltopdf-0.2.6-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (8.0 MB view details)

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

gowkhtmltopdf-0.2.6-py3-none-macosx_11_0_arm64.whl (7.3 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: gowkhtmltopdf-0.2.6.tar.gz
  • Upload date:
  • Size: 23.5 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.6.tar.gz
Algorithm Hash digest
SHA256 059ca9ebccd74025b6ac463679391c0887d2835527522ff0006564ac5b4851ee
MD5 ef4e12b92bc2c4d1108f533e81718c86
BLAKE2b-256 ea271d85805c4782d0b69804e0a8f16b104ca2ee14babd1dd38782259933c1e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for gowkhtmltopdf-0.2.6.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.6-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for gowkhtmltopdf-0.2.6-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 56d9f456ca28deca7d0c1896d3a66e9925a5791563a961fc51693d54909e6a23
MD5 639023bfa97ea07979d3a651f14facd7
BLAKE2b-256 a154bbf044891c89ac6e7a5b1ee61e2866b0d648678a5adfd65d842e52561345

See more details on using hashes here.

Provenance

The following attestation bundles were made for gowkhtmltopdf-0.2.6-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.6-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for gowkhtmltopdf-0.2.6-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5ec929271203fd1249c5646a0431780bb40276723d5bdb618f3c5788276511bf
MD5 af83b04d87f8966635a3d421874e0126
BLAKE2b-256 e055a0f2c52fe7071572d108743b1505a631f3d138466d7260550539ddc169c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for gowkhtmltopdf-0.2.6-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.6-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for gowkhtmltopdf-0.2.6-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 5ec208aa0529742dbc3a73c95c56f6d58b2bd1caaef116a9684779c79140a808
MD5 be8dbe5769e1aadcdd5bffa48634fd15
BLAKE2b-256 abe75a2e2997c4a7bdf0fbfe15da84f28584ce84eab13ec5dd44fd0c96a9bbc8

See more details on using hashes here.

Provenance

The following attestation bundles were made for gowkhtmltopdf-0.2.6-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.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for gowkhtmltopdf-0.2.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 bda6f5a501b1e29956391551f89f0d440da78416ec7da14537d58dca8c9c20c5
MD5 c640d60a7a484e377eafa4ea0ba6c4ba
BLAKE2b-256 f92531905918c22178d749f27f75bc4448e5fdc73a5d72b615ae5169020870cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for gowkhtmltopdf-0.2.6-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.6-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.6-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8a6d83aeedda613ead2bf50883730be76d082aa55845fc38bdba715632267fb6
MD5 ae302e987969f0eab2d5272b44e5018b
BLAKE2b-256 3031b3189e1dd5b0cd2951fcdd71a2e5584505e155bd7e20ec75a87058b385b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for gowkhtmltopdf-0.2.6-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.6-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gowkhtmltopdf-0.2.6-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e355d8ac7cd45f115a21462669639e567db5b8af08f57addbb89e6cf00a8c5c6
MD5 51e9851906b5c271e757023a0f9a969e
BLAKE2b-256 aca2b8df0b8f3845d278f159986054a92f78d1fb4e8dd6f0c12eea73be4ce6ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for gowkhtmltopdf-0.2.6-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

This release

0.2.6 This release

7 files

0.2.5

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