Forrest logo
tool overview
On this page you find all important commands for the CLI tool weasyprint. If the command you are looking for is missing please ask our AI.

weasyprint

WeasyPrint is a command line tool used for converting web pages to PDF documents and generating printed copies of them. It is built on top of various libraries like CSS Parsers, HTML Parsers, and Cairo rendering engine. WeasyPrint supports a wide range of web standards such as HTML5, CSS3, and JavaScript. It can also handle complex layouts and multiple pages, making it suitable for creating reports, invoices, and documentation. The tool has support for advanced features like page numbering, headers, footers, and table of contents. WeasyPrint provides extensive customization options to control page size, margins, fonts, and colors. It runs on Python and can be installed via pip, making it easy to use on multiple platforms. WeasyPrint supports various output formats other than PDF, such as PNG, SVG, and TIFF. It offers a simple, user-friendly command line interface with flexible options for input and output files and additional configuration settings. WeasyPrint is an open-source tool released under the BSD license, allowing users to modify and distribute it freely.

List of commands for weasyprint:

  • weasyprint:tldr:0c827 weasyprint: Specify a custom resolution when outputting to PNG.
    $ weasyprint ${path-to-input-html} ${path-to-output}.png --resolution ${300}
    try on your machine
    explain this command
  • weasyprint:tldr:47091 weasyprint: Specify a base URL for relative URLs in the input HTML file.
    $ weasyprint ${path-to-input-html} ${path-to-output}.png --base-url ${url_or_filename}
    try on your machine
    explain this command
  • weasyprint:tldr:62929 weasyprint: Output additional debugging information when rendering.
    $ weasyprint ${path-to-input-html} ${path-to-output}.pdf --verbose
    try on your machine
    explain this command
  • weasyprint:tldr:6dbc1 weasyprint: Render an HTML file to PDF.
    $ weasyprint ${path-to-input-html} ${path-to-output}.pdf
    try on your machine
    explain this command
  • weasyprint:tldr:a1bae weasyprint: Render an HTML file to PNG, including an additional user stylesheet.
    $ weasyprint ${path-to-input-html} ${path-to-output}.png --stylesheet ${path-to-stylesheet-css}
    try on your machine
    explain this command
tool overview