WeasyPrint

The awesome document factory

BSD-3-CLAUSE License

Downloads
2.2M
Stars
6.6K
Committers
115
WeasyPrint - Latest Release

Published by liZe 6 months ago

Read about this release on our blog.

Dependencies

  • Python 3.9+ is now needed, Python 3.7 and 3.8 are not supported anymore
  • pydyf 0.10.0+ is now needed
  • tinycss2 1.3.0+ is now needed

Features

  • #543, #2121: Support CSS Grid layout
  • #2124, #2125: Support border-image-* properties
  • #2084, #2077: Support CSS nesting
  • #2101: Support HTML maxlength attribute for form fields
  • #2095: Apply overflow to replaced boxes
  • 245e4f5: Add support of PDF/A-?u

Bug fixes

  • #2136: Don’t clip aligned text in SVG
  • #2135: Allow column-direction flex containers to use percentage-based heights
  • #2128: Don’t crash when a FontConfig object is destroyed early
  • #2079: Fix executable file for some Windows versions
  • #2131: Fix alpha for images before/after transparent text
  • #2111: Handle auto and none values for CSS quotes property
  • #2103: Don’t crash with overconstrained columns
  • #2100: Fix rounding error when detecting overflows
  • #2093, #2097, #2094: Mark use of md5() and sha1() as not for security
  • #1956, #2087: Use CSS table module level 3 to compute widths
  • #2086: Fix selects with empty values displaying None
  • #1112, #2082, #2085: Fix computation for outer min-content width for table cells
  • 016bd81: Fix many different bugs with SVG markers

Performance

  • #2130: Cache font key instead of whole font content

Documentation

  • #2108: Update documentation about CSS leader() function

Contributors

  • Guillaume Ayoub
  • Lucie Anglade
  • Xavid Pretzer
  • kygoh
  • Germain Gueutier
  • Vagner José Nicolodi

Backers and sponsors:

  • Spacinov
  • Kobalt
  • Grip Angebotssoftware
  • Manuel Barkhau
  • SimonSoft
  • Menutech
  • KontextWork
  • Simon Sapin
  • René Fritz
  • TrainingSparkle
  • Healthchecks.io
  • Docraptor
  • Yanal-Yvez Fargialla
  • Douwe van Loenen
  • Morntag
  • Xavid
WeasyPrint -

Published by liZe 8 months ago

This is a security update.

We strongly recommend to upgrade WeasyPrint to the latest version if you use WeasyPrint 61.0 or 61.1. Older versions are not impacted.

Security

  • Always use URL fetcher for attachments

Contributors

  • Guillaume Ayoub
  • Ilia Novoselov

Backers and sponsors

  • Spacinov
  • Kobalt
  • Grip Angebotssoftware
  • Manuel Barkhau
  • SimonSoft
  • Menutech
  • KontextWork
  • René Fritz
  • Simon Sapin
  • Arcanite
  • TrainingSparkle
  • Healthchecks.io
  • Hammerbacher
  • Docraptor
  • Yanal-Yvez Fargialla
  • Morntag
  • NBCO
WeasyPrint -

Published by liZe 8 months ago

Released on 2024-02-26.

Bug fixes

  • #2075: Use default value when variable is not defined
  • #2070: Don’t crash when rendering SVGs with non-text a children
  • Don’t crash when SVG file can’t be rendered

Documentation

  • #2067: Suggest "dnf" instead of "yum" to install Fedora packages
  • Improve documentation for Windows
  • Fix required version of TinyCSS2

Contributors

  • Guillaume Ayoub
  • Felix Schwarz
  • Lucie Anglade

Backers and sponsors

  • Spacinov
  • Kobalt
  • Grip Angebotssoftware
  • Manuel Barkhau
  • SimonSoft
  • Menutech
  • KontextWork
  • René Fritz
  • Simon Sapin
  • Arcanite
  • TrainingSparkle
  • Healthchecks.io
  • Hammerbacher
  • Docraptor
  • Yanal-Yvez Fargialla
  • Morntag
  • NBCO
WeasyPrint -

Published by liZe 9 months ago

Read about this release on our blog.

Python API

  • DocumentMetadata.attachments is now a list of Attachment objects, not
    a list of (url, description) tuples.

New features

  • #1219, #2017: Support var() in shorthand and multiple-value functions
  • #1986: Support percentages for opacity
  • #2050: Build executable file for Windows
  • #2000: Support select fields
  • #1993: Handle background-attachment: fixed to cover the whole page
  • #2023, #2022: Allow text-based file objects for HTML and CSS classes
  • #2014: Remove warnings for PDF/A and PDF/UA compatibility

Bug fixes

  • #2052, #1869: Handle attachments for PDF/A documents
  • #2013, #2051: Apply margin to running tables
  • #1278, #1884: Draw collapsed borders of running tables
  • #2029: Fix page counter in non-root absolute boxes
  • #2043: Fix text-anchor on SVG tspan elements
  • #1968, #2039: Use cell's border-height to calculate table row height
  • #2030: Ensure that bounding box is set to invisible text tags
  • #2040, #2041: Don’t crash on malformed URLs
  • #2026: Don’t break pages when fixed-height elements don’t overflow page
  • #2038: Don’t mix original streams when drawing transparent text
  • #2016: Avoid duplication when breaking out-of-flow boxes
  • #2012: Don’t crash when CSS properties have no value
  • #2010, #1287: Fix many corner cases with CSS variables
  • #1996: Don’t crash when drawing groove/ridge collapsed borders
  • #1982: Fix SVG markers size, position and drawing

Contributors

  • Guillaume Ayoub
  • kygoh
  • Lucie Anglade
  • Timo Ramsauer
  • Alexander Gitter
  • Michael Lisitsa
  • Vagner José Nicolodi
  • Manolis Stamatogiannakis
  • Pascal de Bruijn
  • Viktor Shevtsov
  • Eduardo Gonzalez
  • Kesara Rathnayake

Backers and sponsors

  • Spacinov
  • Kobalt
  • Grip Angebotssoftware
  • Manuel Barkhau
  • SimonSoft
  • Menutech
  • KontextWork
  • René Fritz
  • Simon Sapin
  • Arcanite
  • TrainingSparkle
  • Healthchecks.io
  • Hammerbacher
  • Docraptor
  • Yanal-Yvez Fargialla
  • Morntag
  • NBCO
WeasyPrint -

Published by liZe 11 months ago

Bug fixes

  • #1982: Fix SVG markers size, position and drawing
  • 23cfc775: Draw background behind absolutely positioned replaced boxes
  • fe2f0c69: Don’t crash with bitmap fonts with no "glyf" table
  • 14605225: Improve SVG text-anchor attribute

Contributors

  • Guillaume Ayoub

Backers and sponsors

  • Spacinov
  • Kobalt
  • Grip Angebotssoftware
  • Manuel Barkhau
  • SimonSoft
  • Menutech
  • KontextWork
  • NCC Group
  • René Fritz
  • Nicola Auchmuty
  • Syslifters
  • Hammerbacher
  • TrainingSparkle
  • Daniel Kucharski
  • Healthchecks.io
  • Yanal-Yvez Fargialla
  • WakaTime
  • Paheko
  • Synapsium
  • DocRaptor
WeasyPrint - v60.1

Published by liZe about 1 year ago

Bug fixes

  • #1973: Fix crash caused by wrong UTF-8 indices

Contributors

  • Guillaume Ayoub

Backers and sponsors

  • Spacinov
  • Kobalt
  • Grip Angebotssoftware
  • Manuel Barkhau
  • SimonSoft
  • Menutech
  • KontextWork
  • NCC Group
  • René Fritz
  • Nicola Auchmuty
  • Syslifters
  • Hammerbacher
  • TrainingSparkle
  • Daniel Kucharski
  • Healthchecks.io
  • Yanal-Yvez Fargialla
  • WakaTime
  • Paheko
  • Synapsium
  • DocRaptor
WeasyPrint - v60.0

Published by liZe about 1 year ago

Read about this release on our blog.

New features

  • #1903: Print form fields
  • #1922: Add support for textLength and lengthAdjust in SVG text elements
  • #1965: Handle tag
  • #1970: Handle y offset of glyphs
  • #1909: Add a --timeout option

Bug fixes

  • #1887: Fix footnote-call displayed incorrectly for some fonts
  • #1890: Fix page-margin boxes layout algorithm
  • #1908: Fix IndexError when rendering PDF version 1.4
  • #1906: Apply text transformations to first-letter pseudo elements
  • #1915: Avoid footnote appearing before its call
  • #1934: Fix balance before "column-span: all"
  • #1935: Only draw required glyph with OpenType-SVG fonts
  • #1595: Don’t draw clipPath when defined after reference
  • #1895: Don’t ignore min-width when computing cell size
  • #1899: Fix named pages inheritance
  • #1936: Avoid page breaks caused by children of overflow hidden boxes
  • #1943: Use bleed area for page’s painting area
  • #1946: Use margin box of children to define available width for leaders

Contributors

  • Guillaume Ayoub
  • Sahil Rohilla
  • Azharuddin Syed
  • kygoh
  • Andy Lenards
  • Gaurav Samudra
  • Michael Wedl
  • Lucie Anglade
  • Obeida Shamoun
  • Evgeniy Krysanov

Backers and sponsors

  • Spacinov
  • Kobalt
  • Grip Angebotssoftware
  • Manuel Barkhau
  • SimonSoft
  • Menutech
  • KontextWork
  • NCC Group
  • René Fritz
  • Nicola Auchmuty
  • Syslifters
  • Hammerbacher
  • TrainingSparkle
  • Daniel Kucharski
  • Healthchecks.io
  • Yanal-Yvez Fargialla
  • WakaTime
  • Paheko
  • Synapsium
  • DocRaptor
WeasyPrint -

Published by liZe over 1 year ago

This version also includes the changes from unstable b1 version listed below.

Read about this release on our blog.

Bug fixes

  • #1864: Handle overflow for svg and symbol tags in SVG images
  • #1867: Remove duplicate compression of attachments
  • d0ad5c1: Override use tag children instead of drawing their references
  • 93df1a5: Don’t resize the same image twice when the --dpi option is set
  • #1874: Drawn underline and overline behind text

Contributors

  • Guillaume Ayoub
  • Timo Ramsauer
  • Alexander Mankuta

Backers and sponsors

  • Castedo Ellerman
  • Kobalt
  • Spacinov
  • Grip Angebotssoftware
  • Crisp BV
  • Manuel Barkhau
  • SimonSoft
  • Menutech
  • KontextWork
  • NCC Group
  • René Fritz
  • Moritz Mahringer
  • Yanal-Yvez Fargialla
  • Piotr Horzycki
  • Healthchecks.io
  • TrainingSparkle
  • Hammerbacher
  • Synapsium
WeasyPrint -

Published by liZe over 1 year ago

This version is experimental, don't use it in production. If you find bugs, please report them!

Read about this release on our blog.

Command-line API

  • The --optimize-size option and its short equivalent -O have been deprecated. To activate or deactivate different size optimizations, you can now use:

    • --uncompressed-pdf,
    • --optimize-images,
    • --full-fonts,
    • --hinting,
    • --dpi <resolution>, and
    • --jpeg-quality <quality>.
  • A new --cache-folder <folder> option has been added to store temporary data in the given folder on the disk instead of keeping them in memory.

Python API

  • Global rendering options are now given in **options instead of dedicated parameters, with slightly different names. It means that the signature of the HTML.render(), HTML.write_pdf() and Document.write_pdf() has changed. Here are the steps to port your Python code to v59.0:

    1. Use named parameters for these functions, not positioned parameters.

    2. Rename some the parameters:

      • image_cache becomes cache (see below),
      • identifier becomes pdf_identifier,
      • variant becomes pdf_variant,
      • version becomes pdf_version,
      • forms becomes pdf_forms,
  • The optimize_size parameter of HTML.render(), HTML.write_pdf() and Document() has been removed and will be ignored. You can now use the uncompressed_pdf, full_fonts, hinting, dpi and jpeg_quality parameters that are included in **options.

  • The cache parameter can be included in **options to replace image_cache. If it is a dictionary, this dictionary will be used to store temporary data in memory, and can be even shared between multiple documents. If it’s a folder Path or string, WeasyPrint stores temporary data in the given temporary folder on disk instead of keeping them in memory.

New features

  • #1853, #1854: Reduce PDF size, with financial support from Code & Co.
  • #1824, #1829: Reduce memory use for images
  • #1858: Add an option to keep hinting information in embedded fonts

Bug fixes

  • #1855: Fix position of emojis in justified text
  • #1852: Don’t crash when line can be split before trailing spaces
  • #1843: Fix syntax of dates in metadata
  • #1827, #1832: Fix word-spacing problems with nested tags

Documentation

  • #1841: Add a paragraph about unsupported calc() function

Contributors

  • Guillaume Ayoub
  • Lucie Anglade
  • Alex Ch
  • whi_ne
  • Jonas Castro

Backers and sponsors

  • Castedo Ellerman
  • Kobalt
  • Spacinov
  • Grip Angebotssoftware
  • Crisp BV
  • Manuel Barkhau
  • SimonSoft
  • Menutech
  • KontextWork
  • NCC Group
  • René Fritz
  • Moritz Mahringer
  • Yanal-Yvez Fargialla
  • Piotr Horzycki
  • Healthchecks.io
  • TrainingSparkle
  • Hammerbacher
  • Synapsium
WeasyPrint -

Published by liZe over 1 year ago

Bug fixes

  • #1815: Fix bookmarks coordinates
  • #1822, #1823: Fix vertical positioning for absolute replaced elements

Documentation

  • #1814: Fix broken link pointing to samples

Contributors

  • Guillaume Ayoub
  • Jonas Castro
  • Lucie Anglade
  • Menelaos Kotoglou

Backers and sponsors

  • Kobalt
  • Grip Angebotssoftware
  • Spacinov
  • Crisp BV
  • Castedo Ellerman
  • Manuel Barkhau
  • SimonSoft
  • Menutech
  • KontextWork
  • NCC Group
  • René Fritz
  • Moritz Mahringer
  • Yanal-Yvez Fargialla
  • Piotr Horzycki
  • Healthchecks.io
  • Hammerbacher
  • TrainingSparkle
  • Synapsium
WeasyPrint -

Published by liZe over 1 year ago

This version also includes the changes from unstable b1 version listed below.

Read about this release on our blog.

Bug fixes

  • #1807: Don’t crash when out-of-flow box is split in out-of-flow parent
  • #1806: Don’t crash when fixed elements aren’t displayed yet in aborted line
  • #1809: Fix background drawing for out-of-the-page transformed boxes

Contributors

  • Guillaume Ayoub

Backers and sponsors

  • Kobalt
  • Grip Angebotssoftware
  • Crisp BV
  • Spacinov
  • Castedo Ellerman
  • Manuel Barkhau
  • SimonSoft
  • Menutech
  • KontextWork
  • NCC Group
  • René Fritz
  • Moritz Mahringer
  • Yanal-Yvez Fargialla
  • Piotr Horzycki
  • Healthchecks.io
WeasyPrint -

Published by liZe over 1 year ago

This version is experimental, don't use it in production. If you find bugs, please report them!

Read about this release on our blog.

New features

  • #61, #1796: Support PDF forms, with financial support from Personalkollen
  • #1173: Add style for form fields

Bug fixes

  • #1777: Detect JPEG/MPO images as normal JPEG files
  • #1771: Improve SVG gradients

Contributors

  • Guillaume Ayoub
  • Lucie Anglade

Backers and sponsors

  • Kobalt
  • Grip Angebotssoftware
  • Crisp BV
  • Spacinov
  • Castedo Ellerman
  • Manuel Barkhau
  • SimonSoft
  • Menutech
  • KontextWork
  • NCC Group
  • René Fritz
  • Moritz Mahringer
  • Yanal-Yvez Fargialla
  • Piotr Horzycki
  • Healthchecks.io
WeasyPrint -

Published by liZe almost 2 years ago

Bug fixes

  • 0f2e377: Print annotations with PDF/A
  • 0e9426f: Hide annotations with PDF/UA
  • #1764: Use reference instead of stream for annotation appearance stream
  • #1783: Fix multiple font weights for @font-face declarations

Contributors

  • Guillaume Ayoub

Backers and sponsors

  • Grip Angebotssoftware
  • Manuel Barkhau
  • Crisp BV
  • SimonSoft
  • Menutech
  • Spacinov
  • KontextWork
  • René Fritz
  • NCC Group
  • Kobalt
  • Tom Pohl
  • Castedo Ellerman
  • Moritz Mahringer
  • Piotr Horzycki
  • Gábor Nyers
  • Sidharth Kapur
WeasyPrint -

Published by liZe almost 2 years ago

Dependencies

  • #1754: Pillow 9.1.0 is now needed

Bug fixes

  • #1756: Fix rem font size for SVG images
  • #1755: Keep format when transposing images
  • #1753: Don’t use deprecated read_text function when files is available
  • #1741: Generate better manpage
  • #1747: Correctly set target counters in pages’ absolute elements
  • #1748: Always set font size when font is changed in line
  • 2b05137: Fix stability of font identifiers

Documentation

  • #1750: Fix documentation spelling

Contributors

  • Guillaume Ayoub
  • Eli Schwartz
  • Mikhail Anikin
  • Scott Kitterman

Backers and sponsors

  • Grip Angebotssoftware
  • Manuel Barkhau
  • Crisp BV
  • SimonSoft
  • Menutech
  • Spacinov
  • KontextWork
  • René Fritz
  • NCC Group
  • Kobalt
  • Tom Pohl
  • John R Ellis
  • Castedo Ellerman
  • Moritz Mahringer
  • Gábor
  • Piotr Horzycki
WeasyPrint -

Published by liZe about 2 years ago

This version also includes the changes from unstable b1 version listed below.

Read about this release on our blog.

New features

  • a4fc7a1: Support image-orientation

Bug fixes

  • #1739: Set baseline on all flex containers
  • #1740: Don’t crash when currentColor is set on root svg tag
  • #1718: Don’t crash with empty bitmap glyphs
  • #1736: Always use the font’s vector variant when possible
  • eef8b4d: Always set color and state before drawing
  • #1662: Use a stable key to store stream fonts
  • #1733: Don’t remove attachments when adding internal anchors
  • 3c4fa50, c215697, d275dac, b04bfff: Fix many bugs related to PDF/UA structure

Performance

  • dfccf1b: Use faces as fonts dictionary keys
  • 0dc12b6: Cache add_font to avoid calling get_face too often
  • 75e17bf: Don’t call process_whitespace twice on many children
  • 498d3e1: Optimize missing functions

Documentation

  • 863b3d6: Update documentation of installation on macOS with Homebrew

Contributors

  • Guillaume Ayoub

Backers and sponsors

  • Grip Angebotssoftware
  • Manuel Barkhau
  • Crisp BV
  • SimonSoft
  • Menutech
  • Spacinov
  • KontextWork
  • René Fritz
  • NCC Group
  • Kobalt
  • Tom Pohl
  • John R Ellis
  • Castedo Ellerman
  • Moritz Mahringer
  • Gábor
  • Piotr Horzycki
WeasyPrint -

Published by liZe about 2 years ago

This version is experimental, don't use it in production. If you find bugs, please report them!

Read about this release on our blog.

New features

  • #1704: Support PDF/UA, with financial support from Novareto
  • #1454: Support variable fonts

Bug fixes

  • #1058: Fix bullet position after page break, with financial support from OpenZeppelin
  • #1707: Fix footnote positioning in multicolumn layout, with financial support from Code & Co.
  • #1722: Handle skew transformation with only one parameter
  • #1715: Don’t crash when images are truncated
  • #1697: Don’t crash when attr() is used in text-decoration-color
  • #1695: Include language information in PDF metadata
  • #1612: Don’t lowercase letters when capitalizing text
  • #1700: Fix crash when rendering footnote with repagination
  • #1667: Follow EXIF metadata for image rotation
  • #1669: Take care of floats when remvoving placeholders
  • #1638: Use the original box when breaking waiting children

Contributors

  • Guillaume Ayoub
  • Konstantin Weddige
  • VeteraNovis
  • Lucie Anglade

Backers and sponsors

  • Grip Angebotssoftware
  • Manuel Barkhau
  • Crisp BV
  • SimonSoft
  • Menutech
  • Spacinov
  • KontextWork
  • René Fritz
  • NCC Group
  • Kobalt
  • Tom Pohl
  • John R Ellis
  • Moritz Mahringer
  • Gábor
  • Piotr Horzycki
  • Andrew Ittner
WeasyPrint -

Published by liZe over 2 years ago

Bug fixes

  • #1674: Follow max-height on footnot area, with financial support from Code & Co.
  • #1678: Fix gradients with opacity set

Contributors

  • Guillaume Ayoub
  • Lucie Anglade

Backers and sponsors

  • Grip Angebotssoftware
  • Manuel Barkhau
  • Crisp BV
  • SimonSoft
  • Menutech
  • Spacinov
  • KontextWork
  • René Fritz
  • NCC Group
  • Kobalt
  • Tom Pohl
  • Moritz Mahringer
  • Florian Demmer
  • Yanal-Yvez Fargialla
  • Gábor
  • Piotr Horzycki
  • Andrew Ittner
WeasyPrint -

Published by liZe over 2 years ago

This version also includes the changes from unstable b1 version listed below.

Read about this release on our blog.

New features

  • 70f9b62: Support format 5 for bitmap glyphs

Bug fixes

  • #1666: Fix reproducible PDF generation with embedded images
  • #1668: Fix @page:nth() selector
  • 3bd9a8e: Don’t limit the opacity groups to the original box size
  • cb9540b, 76d174f, 9ce6547: Minor bugfixes for split table rows

Contributors

  • Guillaume Ayoub

Backers and sponsors

  • Grip Angebotssoftware
  • Manuel Barkhau
  • Crisp BV
  • SimonSoft
  • Menutech
  • Spacinov
  • KontextWork
  • René Fritz
  • NCC Group
  • Kobalt
  • Des images et des mots
  • Andreas Zettl
  • Tom Pohl
  • Moritz Mahringer
  • Florian Demmer
  • Yanal-Yvez Fargialla
  • Gábor
  • Piotr Horzycki
WeasyPrint -

Published by liZe over 2 years ago

This version is experimental, don't use it in production. If you find bugs, please report them!

Read about this release on our blog.

Dependencies

  • pydyf 0.2.0+ is now needed

Features

  • #1660: Support nested line-clamp, with financial support from Expert Germany
  • #1644, #1645: Support bitmap fonts, with financial support from Expert Germany
  • #1651, #630: Support PDF/A, with financial support from Blueshoe

Bug fixes

  • #1656: Fix chained variables in the same selector block
  • #1028: Fix font weight management in @font-face rules
  • #1653: Don’t crash when @font-face’s src ends with a comma
  • #1650: Don’t check origin when URL only contains fragment
  • e38bff8: Don’t crash when inherited SVG attributes are not set on the parent

Performance

  • e6021da: Launch tests in parallel by default

Contributors

  • Guillaume Ayoub
  • aschmitz
  • Lucie Anglade

Backers and sponsors

  • Grip Angebotssoftware
  • Manuel Barkhau
  • Crisp BV
  • SimonSoft
  • Menutech
  • Spacinov
  • KontextWork
  • René Fritz
  • NCC Group
  • Kobalt
  • Des images et des mots
  • Andreas Zettl
  • Tom Pohl
  • Moritz Mahringer
  • Florian Demmer
  • Yanal-Yvez Fargialla
  • Gábor
  • Piotr Horzycki
WeasyPrint -

Published by liZe over 2 years ago

This version also includes the changes from unstable b1 version listed below.

Read about this release on our blog.

Bug fixes

  • #1626, 3802f88: Fix the vertical position and available height of absolute boxes
  • 9641098, e5e6b88: Minor fixes for multi-column layout
  • 0fcc7de: Don’t stop rendering SVG when CSS parsing fails
  • #1636: Fix sequential footnotes that could disappear when overflowing
  • #1637: Fix position of absolute boxes with right-to-left direction
  • #1641: Fix relative paths for SVG files stored as data URLs

Contributors

  • Guillaume Ayoub
  • aschmitz

Backers and sponsors

  • Grip Angebotssoftware
  • Manuel Barkhau
  • Crisp BV
  • SimonSoft
  • Menutech
  • Spacinov
  • KontextWork
  • René Fritz
  • NCC Group
  • Kobalt
  • Nathalie Gutton
  • Andreas Zettl
  • Tom Pohl
  • Moritz Mahringer
  • Florian Demmer
  • Yanal-Yvez Fargialla
  • Gábor
  • Piotr Horzycki