Any good tutorials for working with pdfs in Rust?

This page summarizes the projects mentioned and recommended in the original post on /r/rust

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • genpdf-rs

  • So I used this fork instead: https://github.com/dabega/genpdf-rs and specified as a git path in my cargo.toml (after forking it myself to freeze to the current commit)

  • docs.rs

    crates.io documentation generator

  • The API seems to be very close to the official 0.2.0 version, so the docs on docs.rs worked for me.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • crates.io

    The Rust package registry

  • If you are looking to generate PDFs, I recommend "genpdf". However, the version from the primary author on crates.io seems to have some very strange character spacing: https://genpdf-rs.ireas.org/examples/demo.pdf

  • WKHTMLToPDF

    Discontinued Convert HTML to PDF using Webkit (QtWebKit)

  • The only “sane” way I’ve found to be able to deal with pdfs is through this tool https://wkhtmltopdf.org/

  • PyPDF2

    A pure-python PDF library capable of splitting, merging, cropping, and transforming the pages of PDF files

  • As other posters have said, if you're just generating PDFs, that's doable with minor library support. If you want to open existing PDFs and do anything non-trivial with them, you'll want a mature, powerful PDF parsing library. PDFKit, which is part of macOS is pretty amazing. If you need portability, something like Python's PyPDF2 is probably the best bet. Knowing the Rust community, though, we'll probably get a library at least as good in Rust in a surprisingly short amount of time.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
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