Skip to main content

LaTeX-based PDF generator from a JSON document description

Project description

pdf-generator

LaTeX-based PDF generator — renders a PDF from a JSON document description (headings, text, images, lines) via pylatex and a LaTeX engine.

Installation

pip install entirius-py-pdf-generator

PDF generation requires a LaTeX engine (e.g. xelatex) on the system:

sudo apt install texlive-xetex

Usage

from pdf_generator.worker.latex import PDFGenerator

pdf = PDFGenerator(
    in_out_file="/tmp/report",
    json_data={"document_contents": [{"type": "h1", "content": "Hello"}]},
    document_variables={},
)
pdf.generate_pdf(compiler="xelatex")

Development

make install     # sync dependencies (uv)
make check       # lint + format check (ruff)
make test        # test suite (pytest) — PDF test skipped where xelatex is absent

Development and agent instructions: AGENTS.md.

License

Mozilla Public License 2.0 — see LICENSE.

Project details


Download files

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

Source Distribution

entirius_py_pdf_generator-2.0.0.tar.gz (26.0 kB view details)

Uploaded Source

Built Distribution

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

entirius_py_pdf_generator-2.0.0-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file entirius_py_pdf_generator-2.0.0.tar.gz.

File metadata

  • Download URL: entirius_py_pdf_generator-2.0.0.tar.gz
  • Upload date:
  • Size: 26.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for entirius_py_pdf_generator-2.0.0.tar.gz
Algorithm Hash digest
SHA256 67c4d6c4a9011492685652c751600123c86d93e9cb923e6246ac315b5b179e10
MD5 fe076a619705e25330a1e554e807cf60
BLAKE2b-256 3b3612c8277708a93c7c95675b6e085dbe6d3ba27f143aec4c23dd57bc64b682

See more details on using hashes here.

File details

Details for the file entirius_py_pdf_generator-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: entirius_py_pdf_generator-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for entirius_py_pdf_generator-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 180f453e745fc37c8636fe957446269edee1f54cab7109ac9b5bacd924498573
MD5 4d289c14f8940df2ccaffb6f8f795458
BLAKE2b-256 3e0853c80c89081ed325f15c1b2c3c2d601e6716a307a127f74040a5b32c3b63

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page