peasy-pdf
Async Rust client for the PeasyPDF API — merge, split, rotate, and compress PDF files. Built with reqwest, serde, and tokio.
Built from PeasyPDF, a comprehensive PDF toolkit offering free online tools for merging, splitting, rotating, compressing, and converting PDF documents. The site includes detailed guides on PDF optimization, accessibility best practices, and format conversion, plus a glossary covering terms from linearization to OCR to PDF/A archival compliance.
Try the interactive tools at peasypdf.com — Merge PDF, Split PDF, Compress PDF, Rotate PDF, and more.
Table of Contents
- Install
- Quick Start
- What You Can Do
- API Client
- Learn More About PDF Tools
- Also Available
- Peasy Developer Tools
- License
Install
[]
= "0.2.0"
= { = "1", = ["full"] }
Or via cargo:
Quick Start
use Client;
async
What You Can Do
PDF Document Operations
The Portable Document Format (PDF) was created by Adobe in 1993 and became an open ISO standard (ISO 32000) in 2008. Today PDF is the most widely used format for document exchange, supporting text, images, forms, digital signatures, and embedded multimedia. PeasyPDF provides tools for every common PDF workflow — from merging invoices into a single file to compressing scanned documents for email delivery.
| Operation | Slug | Description |
|---|---|---|
| Merge PDF | pdf-merge |
Combine multiple PDF documents into one file |
| Split PDF | pdf-split |
Extract specific pages or split into individual files |
| Compress PDF | pdf-compress |
Reduce file size by optimizing images and removing metadata |
| Rotate PDF | pdf-rotate |
Rotate pages by 90, 180, or 270 degrees |
| PDF to PNG | pdf-to-png |
Convert PDF pages to high-resolution PNG images |
use Client;
async
Learn more: Merge PDF Tool · How to Merge PDF Files · PDF Compression Guide
Browse Reference Content
PeasyPDF includes a comprehensive glossary of document format terminology and in-depth guides for common workflows. The glossary covers foundational concepts like PDF linearization (web-optimized PDFs that load page-by-page), OCR (optical character recognition for scanned documents), DPI (dots per inch for print-quality output), and PDF/A (the ISO 19005 archival standard used by governments and libraries worldwide).
| Term | Description |
|---|---|
| Portable Document Format — ISO 32000 open standard | |
| PDF/A | Archival PDF subset (ISO 19005) for long-term preservation |
| DPI | Dots per inch — resolution metric for print and rasterization |
| OCR | Optical character recognition for searchable scanned PDFs |
| Rasterization | Converting vector PDF content to pixel-based images |
use Client;
async
Learn more: PDF Glossary · Accessible PDF Best Practices · How to Convert PDF to Images
Search and Discovery
The API supports full-text search across all content types — tools, glossary terms, guides, use cases, and format documentation. Search results are grouped by content type, making it easy to find exactly what you need for a specific PDF workflow.
use Client;
async
Learn more: REST API Docs · All PDF Tools
API Client
The client wraps the PeasyPDF REST API with strongly-typed Rust structs using serde deserialization.
use Client;
async
Available Methods
| Method | Description |
|---|---|
list_tools(&opts) |
List tools (paginated, filterable) |
get_tool(slug) |
Get tool by slug |
list_categories(&opts) |
List tool categories |
list_formats(&opts) |
List file formats |
get_format(slug) |
Get format by slug |
list_conversions(&opts) |
List format conversions |
list_glossary(&opts) |
List glossary terms |
get_glossary_term(slug) |
Get glossary term |
list_guides(&opts) |
List guides |
get_guide(slug) |
Get guide by slug |
list_use_cases(&opts) |
List use cases |
search(query, limit) |
Search across all content |
list_sites() |
List Peasy sites |
openapi_spec() |
Get OpenAPI specification |
Full API documentation at peasypdf.com/developers/. OpenAPI 3.1.0 spec: peasypdf.com/api/openapi.json.
Learn More About PDF Tools
- Tools: Merge PDF · Split PDF · Compress PDF · Rotate PDF · PDF to PNG · All Tools
- Guides: How to Merge PDF Files · PDF Compression Guide · Accessible PDF Best Practices · How to Convert PDF to Images · All Guides
- Glossary: PDF · PDF/A · DPI · OCR · Rasterization · All Terms
- Formats: All Formats
- API: REST API Docs · OpenAPI Spec
Also Available
| Language | Package | Install |
|---|---|---|
| Python | peasy-pdf | pip install "peasy-pdf[all]" |
| TypeScript | peasy-pdf | npm install peasy-pdf |
| Go | peasy-pdf-go | go get github.com/peasytools/peasy-pdf-go |
| Ruby | peasy-pdf | gem install peasy-pdf |
Peasy Developer Tools
Part of the Peasy Tools open-source developer ecosystem.
| Package | PyPI | npm | crates.io | Description |
|---|---|---|---|---|
| peasy-pdf | PyPI | npm | crate | PDF merge, split, rotate, compress — peasypdf.com |
| peasy-image | PyPI | npm | crate | Image resize, crop, convert, compress — peasyimage.com |
| peasy-audio | PyPI | npm | crate | Audio trim, merge, convert, normalize — peasyaudio.com |
| peasy-video | PyPI | npm | crate | Video trim, resize, thumbnails, GIF — peasyvideo.com |
| peasy-css | PyPI | npm | crate | CSS minify, format, analyze — peasycss.com |
| peasy-compress | PyPI | npm | crate | ZIP, TAR, gzip compression — peasytools.com |
| peasy-document | PyPI | npm | crate | Markdown, HTML, CSV, JSON conversion — peasyformats.com |
| peasytext | PyPI | npm | crate | Text case conversion, slugify, word count — peasytext.com |
Embed Widget
Embed PeasyPdf widgets on any website with peasy-pdf-embed:
Zero dependencies · Shadow DOM · 4 themes (light/dark/sepia/auto) · Widget docs
License
MIT