Skip to main content

Incremental HTML to PDF converter with support for extremely large documents. Bericht does not hold the HTML or the PDF in memory as it generates PDF pages; instead, it requires you to pass a generator which produces HTML snippets and bericht gives you a PDF stream iterator. As you iterate the PDF stream bericht will parse just enough HTML to produce a single page and return one page at a time which you can either write to a file, send over http or do whatever you need.

Main features:

  • Quickly and efficiently generate on-demand PDFs from databases or other data sources.

  • Use familiar HTML and CSS to define your PDF layout.

  • Re-use the same code to produce HTML and PDF based reports for your users.

  • Ability to generate extremely large PDF files without storing any of the parts (input or output) in memory.

  • Many CSS extensions specifically for print/page related formatting:

    • @page:nth-child(an+b): at-rule to target/style individual pages (non-standard CSS).

    • @page { letterhead-page: 1; }: ability to apply specific pages from another PDF as a watermark/letterhead in your newly generated PDF (the other PDF must be passed as argument to bericht generator to be able to extract pages from it using letterhead-page CSS attribute).

    • thead:nth-child(an+b) and tfoot:nth-child(an+b): bericht can repeat table headers/footers on subsequent pages when the table does not fit on one page, this rule allows you to style those rows differently depending on what page they are on (non-standard CSS).

0.1.6

  • Font handling bug fix.

  • More tests.

0.1.5

  • Table rendering fix.

0.1.04

  • Added missing files in MANIFEST.in

0.1.03

  • Various bug fixes and refactoring.

0.1.02

  • Table cell rendering fix.

0.1.01

  • Major rewrite of parser and drawing code to be more forgiving for broken HTML.

Release files for bericht 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bericht 0.1.6
File Size Uploaded
bericht-0.1.6.tar.gz 30.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bericht 0.1.6
File Interpreter ABI Platform
bericht-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 68.2 kB

Release files / bericht-0.1.6.tar.gz

Download URL bericht-0.1.6.tar.gz
Size 30.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f428c3c8bfc6532486eb2ff76ece78dd45df2b753f0e1b5e4eca163d8e8dcf69
BLAKE2b-256 checksum
How to use checksums
5aa33d7129b9374050ba679fea63026487f6553c74b02114475c0afef0a440db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / bericht-0.1.6-py3-none-any.whl

Download URL bericht-0.1.6-py3-none-any.whl
Size 37.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9fa3386dbb66f3453d65fcf88edcbeefdda118a87427219a63a91b16a3466712
BLAKE2b-256 checksum
How to use checksums
ca13d65020302341131d905809f2fadfb75b1d53dbaa06468d183d474e0d6e4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release 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