Skip to main content

A PDF library for Python powered by bindings to github.com/carlos7ags/folio in GO

Project description

Folio PDF

Downloads Downloads Downloads

A Python PDF library powered by bindings to the Go-based Folio PDF library. It provides features such as a layout engine, HTML-to-PDF rendering, forms, digital signatures, barcodes, and PDF/A support.

Folio PDF is currently under active development, so some functionality may not yet work as expected and APIs may change over time. Suggestions and bug reports are welcome at folio-pdf issues.

Installation

With uv

uv add folio-pdf

With pip

pip install folio-pdf

Usage

Building a pdf from scratch

from folio_pdf import Document, Font

doc = Document.new_a4()
doc.set_title("PDF Document Example")
doc.set_watermark("Made with Folio PDF")

page = doc.add_page()
font = Font(StandardPDFFonts.HELVETICA_BOLD)
page.add_text("I love folio pdf", font, 14, 100, 100)
doc.save("result.pdf")

Generating a pdf from html

from folio_pdf import html_to_pdf

html = '''
<h1 style="color: red;">Hello, world!</h1>
'''
html_to_pdf(html, "result.pdf")
# see generated result.pdf the generated pdf

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

folio_pdf-0.0.1.tar.gz (30.6 MB view details)

Uploaded Source

Built Distribution

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

folio_pdf-0.0.1-py3-none-any.whl (30.6 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: folio_pdf-0.0.1.tar.gz
  • Upload date:
  • Size: 30.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","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 folio_pdf-0.0.1.tar.gz
Algorithm Hash digest
SHA256 8da84a7ce08fc6ecdcafc95716223f284da0edd6bcdb58de9bd15fabbef7aca3
MD5 21b54cb721c9e1e538311fa9e74c81cc
BLAKE2b-256 50ac4a7adea442c35485cd14b38215a97294a01e68b439d160d34ac733f41ac9

See more details on using hashes here.

File details

Details for the file folio_pdf-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: folio_pdf-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 30.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","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 folio_pdf-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 052fe0fc15860a3eeefcc29f736d462afb119600541927007c319919528a0805
MD5 745494147c6e503ebc248f54f047c8c1
BLAKE2b-256 a97fc7e5de9cedc4e3730479a4f1c77faeacadfd9cf6d6cc6a8c766839a1db20

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