Scroll to navigation

WEASYPRINT(1) WeasyPrint WEASYPRINT(1)

NAME

weasyprint - The Awesome Document Factory

The weasyprint program takes at least two arguments:

weasyprint [options] <input> <output>




URL or filename of the HTML input, or - for stdin.

Filename where output is written, or - for stdout.

Force the input character encoding.

URL or filename for a user CSS stylesheet.

This option can be passed multiple times.


Media type to use for @media, defaults to print.

Base for relative URLs in the HTML input, defaults to the input’s own filename or URL or the current directory for stdin.

URL or filename of a file to attach to the PDF document.

This option can be passed multiple times.


PDF file identifier.

PDF variant to generate.

Possible choices: pdf/a-1b, pdf/a-2b, pdf/a-3b, pdf/a-4b, pdf/ua-1.


PDF version number.

Include PDF forms.

Do not compress PDF content, mainly for debugging purpose.

Include custom HTML meta tags in PDF metadata.

Follow HTML presentational hints.

Optimize size of embedded images with no quality loss.

JPEG quality between 0 (worst) to 95 (best).

Embed unmodified font files when possible.

Keep hinting information in embedded fonts.

Store cache on disk instead of memory, folder is created if needed and cleaned after the PDF is generated.

Set maximum resolution of images embedded in the PDF.

Show warnings and information messages.

Show debugging messages.

Hide logging messages.

Print WeasyPrint’s version number and exit.

Print system information and exit.

Set timeout in seconds for HTTP requests.

Show this help message and exit.


The Awesome Document Factory

WeasyPrint is a smart solution helping web developers to create PDF documents. It turns simple HTML pages into gorgeous statistical reports, invoices, tickets…

From a technical point of view, WeasyPrint is a visual rendering engine for HTML and CSS that can export to PDF. It aims to support web standards for printing. WeasyPrint is free software made available under a BSD license.

It is based on various libraries but not on a full rendering engine like WebKit or Gecko. The CSS layout engine is written in Python, designed for pagination, and meant to be easy to hack on.


WeasyPrint has been created and developed by Kozea (https://kozea.fr/). Professional support, maintenance and community management is provided by CourtBouillon (https://www.courtbouillon.org/).

Copyrights are retained by their contributors, no copyright assignment is required to contribute to WeasyPrint. Unless explicitly stated otherwise, any contribution intentionally submitted for inclusion is licensed under the BSD 3-clause license, without any additional terms or conditions. For full authorship information, see the version control history.

AUTHOR

Simon Sapin and contributors

COPYRIGHT

Simon Sapin and contributors

March 15, 2024 61.2