Skip to main content

Python bindings for fulgur — offline HTML/CSS to PDF conversion

Project description

pyfulgur

Python bindings for fulgur — an offline, deterministic HTML/CSS to PDF conversion library written in Rust.

Status

This package is a name reservation. The implementation is under active development.

Planned API

from pyfulgur import Engine, AssetBundle

bundle = AssetBundle()
bundle.add_css("body { font-family: sans-serif; }")
bundle.add_font_file("fonts/NotoSans-Regular.ttf")

engine = Engine.builder().page_size("A4").assets(bundle).build()
pdf_bytes = engine.render_html("<h1>Hello, world!</h1>")

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

Links

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

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

pyfulgur-0.0.1.tar.gz (2.0 kB view details)

Uploaded Source

File details

Details for the file pyfulgur-0.0.1.tar.gz.

File metadata

  • Download URL: pyfulgur-0.0.1.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for pyfulgur-0.0.1.tar.gz
Algorithm Hash digest
SHA256 dd644a5f0357e3748780e66c3553a1b5ed401eb5102a04721d721d035eaa55b2
MD5 fb5c924e42f74d202c37508b00b479b5
BLAKE2b-256 2447e6bed9003058462e8d332913daa3389a24fe88da22f6de5699e27c9d85c7

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