11 releases

0.9.0 Nov 30, 2023
0.8.1 Apr 18, 2023
0.8.0 Dec 27, 2022
0.7.2 Apr 29, 2021
0.2.0 Oct 5, 2015

#134 in Rust patterns

Download history 1448/week @ 2023-11-20 1620/week @ 2023-11-27 1247/week @ 2023-12-04 1204/week @ 2023-12-11 1741/week @ 2023-12-18 1226/week @ 2023-12-25 1078/week @ 2024-01-01 1783/week @ 2024-01-08 1535/week @ 2024-01-15 1196/week @ 2024-01-22 1557/week @ 2024-01-29 1230/week @ 2024-02-05 1680/week @ 2024-02-12 3206/week @ 2024-02-19 1576/week @ 2024-02-26 1285/week @ 2024-03-04

7,932 downloads per month
Used in 14 crates (10 directly)

MIT license

370KB
10K SLoC

pdf-rs test clippy&fmt

Read, alter and write PDF files.

Modifying and writing PDFs is still experimental.

One easy way you can contribute is to add different PDF files to tests/files and see if they pass the tests (cargo test).

Feel free to contribute with ideas, issues or code! Please join us on Zulip if you have any questions or problems.

Workspace

This repository uses a Cargo Workspace and default members. This means by default only the pdf library is build. To build additional parts, pass --package=read to build the subcrate you are interested in (here the read example).

Examples

Examples are located in pdf/examples/ and can be executed using:

cargo run --example {content,metadata,names,read,text} -- <files/{choose a pdf}>

Renderer and Viewer

A library for rendering PDFs via Pathfinder and minimal viewer can be found here.

Inspect

There is a tool for visualizing a PDF file as an interactive hierarchy of primitives at inspect-prim. Just clone and cargo run.

Dependencies

~8–19MB
~325K SLoC