Crate pdfpdf [] [src]

A Pretty Darn Fast library for creating PDF files. Currently, only simple vector graphics and simple text are supported.

Example

use pdfpdf::{Color, Pdf};

Pdf::new()
    .add_page(180.0, 240.0)
    .set_color(&Color::rgb(0, 0, 248))
    .draw_circle(90.0, 120.0, 50.0)
    .write_to("example.pdf")
    .expect("Failed to write to file");

To use this library you need to add it as a dependency in your Cargo.toml:

[dependencies]
pdfpdf = "0.2"

More working examples can be found in here.

Structs

Color

Any color (or grayscale) value that this library can make PDF represent.

Matrix

A transformation matrix for the pdf graphics state.

Pdf

The top-level struct that represents a (partially) in-memory PDF file

Enums

Alignment

Text alignment options

Font

Supported fonts