CSS for Printing to Paper

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. paper-css

    Paper CSS for happy printing

    I appreciated the read, but in real life just link to the css file in Paper-CSS[1].

    It may not be a lot of CSS, but it is much easier for me to just include the page and have it deal with my page size than to review articles like this when I want to pint.

    [1]: https://github.com/cognitom/paper-css

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. utilitarianism.net

    Official repository for utilitarianism.net

  4. stylo

    CSS engine that powers Servo and Firefox (by servo)

    > Is there any easy to use/hack HTML layouting engine where I could experiment with custom CSS attributes and bridge that gap? Would anything from Servo be suitable?

    Servo could be used for this. You'd want to add support for parsing the CSS properties themselves to the style crate in https://github.com/servo/stylo and then the layout implementation to the layout2020 crate in https://github.com/servo/servo. You do effectively get a whole browser though.

    I'm currently working on building a lighter weight / hackable layout engine based on a combination of https://github.com/servo/stylo (for css parsing and selector resolution), https://github.com/DioxusLabs/taffy (for box-level layout) and https://github.com/pop-os/cosmic-text (for flow/inline layout). I expect to have something decent in around 6 months

    Neither of these setups currently have any support for pagination though.

  5. Servo

    Servo aims to empower developers with a lightweight, high-performance alternative for embedding web technologies in applications.

    > Is there any easy to use/hack HTML layouting engine where I could experiment with custom CSS attributes and bridge that gap? Would anything from Servo be suitable?

    Servo could be used for this. You'd want to add support for parsing the CSS properties themselves to the style crate in https://github.com/servo/stylo and then the layout implementation to the layout2020 crate in https://github.com/servo/servo. You do effectively get a whole browser though.

    I'm currently working on building a lighter weight / hackable layout engine based on a combination of https://github.com/servo/stylo (for css parsing and selector resolution), https://github.com/DioxusLabs/taffy (for box-level layout) and https://github.com/pop-os/cosmic-text (for flow/inline layout). I expect to have something decent in around 6 months

    Neither of these setups currently have any support for pagination though.

  6. taffy

    A high performance rust-powered UI layout library

    > Is there any easy to use/hack HTML layouting engine where I could experiment with custom CSS attributes and bridge that gap? Would anything from Servo be suitable?

    Servo could be used for this. You'd want to add support for parsing the CSS properties themselves to the style crate in https://github.com/servo/stylo and then the layout implementation to the layout2020 crate in https://github.com/servo/servo. You do effectively get a whole browser though.

    I'm currently working on building a lighter weight / hackable layout engine based on a combination of https://github.com/servo/stylo (for css parsing and selector resolution), https://github.com/DioxusLabs/taffy (for box-level layout) and https://github.com/pop-os/cosmic-text (for flow/inline layout). I expect to have something decent in around 6 months

    Neither of these setups currently have any support for pagination though.

  7. cosmic-text

    Pure Rust multi-line text handling

    > Is there any easy to use/hack HTML layouting engine where I could experiment with custom CSS attributes and bridge that gap? Would anything from Servo be suitable?

    Servo could be used for this. You'd want to add support for parsing the CSS properties themselves to the style crate in https://github.com/servo/stylo and then the layout implementation to the layout2020 crate in https://github.com/servo/servo. You do effectively get a whole browser though.

    I'm currently working on building a lighter weight / hackable layout engine based on a combination of https://github.com/servo/stylo (for css parsing and selector resolution), https://github.com/DioxusLabs/taffy (for box-level layout) and https://github.com/pop-os/cosmic-text (for flow/inline layout). I expect to have something decent in around 6 months

    Neither of these setups currently have any support for pagination though.

  8. WeasyPrint

    The awesome document factory

    You don't _have_ to use a browser. I had very good results with Weasyprint [0]. And there's also PrinceXML [1] if you're willing to pay.

    [0]: https://weasyprint.org/

  9. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  10. asciidoctor-web-pdf

    Convert AsciiDoc documents to PDF using web technologies

    I've been test-driving the web pdf build tool for Asciidoc, asciidoctor-web-pdf[1], for a few years, which uses Paged.js as the template engine before CSS PMM has its go. I like it - I like it a LOT[2] - but Puppeteer-Chrome bugs breaks the build on the regular, or requires a rework of templates. So the web-pdf team started just releasing docker images that include a tested Chromium version (among other things), so as to keep that from being such a PITA. Which is fine. Howaaaayyyyyyyver . . that shines a spotlight on a problem with this workflow: the dependency on browser rendering kit.

    [1] https://github.com/ggrossetie/asciidoctor-web-pdf

  11. website2pdf

    Node library to print PDFs from a website following sitemap protocol

  12. flyingsaucer

    XML/XHTML and CSS 2.1 renderer in pure Java

    I have been creating print labels with plot/cut lines using css and I used browsers to covert it to PDF. The experience was terrible. While all was perfect on my 1-page proof print, both large browsers messed up the final document (with a few hundred labels on several pages).

    Firefox forgot to render images after a few pages. So on some labels the barcodes were not printed.

    Chrome looked good at the fist glance. But it turned out that the plot/cut lines (which I created via CSS borders) had been shifted by 1-2mm on _some_ pages. Result was garbage.

    I finally switched to https://github.com/flyingsaucerproject/flyingsaucer which is a high quality HTML/CSS to PDF library. Only drawback is that it only supports CSS 2.1, so some fancy features are not supported like rotating text.

  13. Hartija---CSS-Print-Framework

    Universal CSS for web printing

  14. litehtml

    Fast and lightweight HTML/CSS rendering engine

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Show HN: PlutoBook – Fast, lightweight C++ library for generating PDF from HTML

    2 projects | news.ycombinator.com | 19 Jun 2025
  • Dompdf VS plutoprint - a user suggested alternative

    2 projects | 19 Jun 2025
  • plutoprint VS WeasyPrint - a user suggested alternative

    2 projects | 19 Jun 2025
  • Converting Plotly charts into images in parallel

    2 projects | dev.to | 2 Jan 2025
  • Using Pandoc and Typst to Produce PDFs

    1 project | news.ycombinator.com | 29 Nov 2024

Did you know that Rust is
the 5th most popular programming language
based on number of references?