git404hub

what is weasyprint fr?

kozea/weasyprint — explained in plain English

Analysis updated 2026-06-24

9,115PythonAudience · developerComplexity · 2/5LicenseSetup · easy

tl;dr

WeasyPrint is a Python library that converts HTML and CSS into PDFs, great for generating invoices, reports, and tickets from web templates without needing a full browser or a separate document-layout tool.

vibe map

mindmap
  root((repo))
    What it does
      HTML to PDF
      CSS layout engine
      Paginated output
    Use cases
      Invoices
      Reports and tickets
      Web to print
    Tech details
      Python 3.10 plus
      CPython and PyPy
      No browser needed
    Audience
      Web developers
      Python app builders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Generate PDF invoices or reports from HTML templates inside a Python web app.

VIBE 2

Convert a styled HTML page to a printable PDF using the same CSS skills you already use for web design.

VIBE 3

Automate PDF creation in a Django or Flask app without running a slow, heavyweight headless browser.

what's the stack?

Python

how it stacks up fr

kozea/weasyprinthttpie/http-promptcadene/pretrained-models.pytorch
Stars9,1159,1169,111
LanguagePythonPythonPython
Setup difficultyeasyeasyeasy
Complexity2/52/52/5
Audiencedeveloperdeveloperresearcher

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · easy time til it works · 30min

Requires Python 3.10 or later.

BSD license, use freely for any purpose, including commercial use, as long as you keep the copyright notice.

in plain english

WeasyPrint is a Python library that converts HTML and CSS into PDF files. If you know how to build a web page, you already know how to describe a document for WeasyPrint: write the content in HTML, style it with CSS, and hand it to the library to produce a finished PDF. The project is free to use under a BSD license. The main use cases are things like invoices, reports, tickets, and other documents that need consistent formatting across many pages. Web designers often find this appealing because they can apply the same CSS skills they already use, rather than learning a separate document-layout tool or dealing with word processor export quirks. Under the hood, WeasyPrint does not rely on a full browser engine like the ones powering Chrome or Firefox. Instead, it has its own CSS layout engine written in Python, built specifically for paginated output. This makes it smaller and easier to modify than a full browser, but it also means it supports a focused subset of CSS aimed at printing, not every feature a browser handles. The library requires Python 3.10 or later and works on both CPython (the standard Python runtime) and PyPy. It is developed and maintained by CourtBouillon, a company that also offers professional support and maintenance contracts for organizations that need reliability guarantees. Documentation and working examples are hosted on the project's own website, and the code, issue tracker, and releases all live on GitHub. If you need to generate PDFs programmatically from HTML templates, this library is a direct way to do it without a headless browser.

prompts (copy fr)

prompt 1
Show me how to use WeasyPrint in a Python script to convert an HTML file with CSS styles into a PDF.
prompt 2
Help me generate a PDF invoice from a Jinja2 HTML template in a Flask app using WeasyPrint.
prompt 3
Walk me through setting up WeasyPrint in a Django project so users can download their order history as a PDF.
prompt 4
Help me style a multi-page WeasyPrint PDF with page numbers, a repeating header, and CSS print-specific rules.
prompt 5
Show me how to convert an HTML string built in memory into a PDF using WeasyPrint in Python, without writing a temp file.

Frequently asked questions

what is weasyprint fr?

WeasyPrint is a Python library that converts HTML and CSS into PDFs, great for generating invoices, reports, and tickets from web templates without needing a full browser or a separate document-layout tool.

What language is weasyprint written in?

Mainly Python. The stack also includes Python.

What license does weasyprint use?

BSD license, use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is weasyprint to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is weasyprint for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.