/tux-pdf

A simple to use PDF lib for Rust

Primary LanguageRustApache License 2.0Apache-2.0

Tux-PDF

A simple to use PDF generator for Rust

PDF Specification: https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf

Goals

The goal of this library to provide an easy way of generating pdfs. Specifically PDF that contains report, invoice, etc type data.

Allowing to do tables and text formatting.

Without sacrificing all the time in the world to generate a pdf.

Current State

Early development stage. Not ready for use.

  • Basic PDF Creation
  • Text Rendering
  • Fonts
    • Custom Fonts
    • Built In Pdf Fonts (They work however, no metrics are provided meaning text is not correctly positioned)
  • External Objects
    • Images
    • SVG
    • Other External Object Types
  • Graphics
    • Lines
    • Shapes (Circles, Rectangles, etc)
    • Paths
    • ICC Color Profiles
  • Layers
    • More Intutive API
  • Layouts and Tables
    • Tables (Works but needs to be improved)
    • Grid Layout And Flex Layout using Taffy
  • Wasm Support (Not tested yet would like to have an example web app)

Known Issues

  • Alpha Values are not supported
  • Built-in Fonts are barely supported
  • Inconsistent shapes system
  • Inconsistent and confusing styling api

Examples

  • CSV to PDF - A simple example of how to convert a csv file to a pdf
  • Hello World - Shows hello world and an image

License

Licensed under either of these: