oxidize-pdf-cli 0.1.0

Command-line interface for oxidizePdf
oxidize-pdf-cli-0.1.0 is not a library.

oxidize-pdf-cli

Command-line interface for oxidize-pdf - a comprehensive, pure Rust PDF library.

Overview

oxidize-pdf-cli provides a powerful command-line interface to create, manipulate, and analyze PDF files using the oxidize-pdf library. It supports PDF generation, merging, splitting, rotation, text extraction, and document analysis.

Installation

cargo install oxidize-pdf-cli

Or build from source:

git clone https://github.com/bzsanti/oxidizePdf.git
cd oxidizePdf
cargo build --release -p oxidize-pdf-cli

Quick Start

Create a simple PDF:

oxidizepdf create -o hello.pdf -t "Hello, World!"

Generate a demo PDF with graphics:

oxidizepdf demo -o demo.pdf

Extract text from a PDF:

oxidizepdf extract-text document.pdf

Get PDF information:

oxidizepdf info document.pdf --detailed

Command Reference

Create

Create a simple PDF with text content.

oxidizepdf create -o output.pdf -t "Your text here"

Demo

Generate a demonstration PDF showcasing graphics and text capabilities.

oxidizepdf demo [-o demo.pdf]

Info

Display information about a PDF file including metadata and structure.

oxidizepdf info input.pdf [--detailed]

Extract Text

Extract text content from PDF files with optional layout preservation.

oxidizepdf extract-text input.pdf [-o output.txt] [-p page_number] [--preserve-layout]

Rotate

Rotate pages in a PDF document.

oxidizepdf rotate input.pdf -o output.pdf [-a angle] [-p pages]
# Examples:
oxidizepdf rotate doc.pdf -o rotated.pdf -a 90 -p "1,3,5"
oxidizepdf rotate doc.pdf -o rotated.pdf -a 180 -p "2-6"

Merge (Coming Soon)

Merge multiple PDF files into a single document.

oxidizepdf merge file1.pdf file2.pdf -o merged.pdf [-p "1-5,all,2,4-6"]

Split (Coming Soon)

Split a PDF into multiple files.

oxidizepdf split input.pdf [-p pattern] [-m mode] [--spec pages]

Features

  • Pure Rust: No external PDF dependencies
  • Fast: Native performance with zero overhead
  • Comprehensive: Supports creation, manipulation, and analysis
  • Cross-platform: Works on Windows, macOS, and Linux
  • Memory efficient: Streaming operations for large files

Examples

Creating a PDF with formatted text

oxidizepdf create -o report.pdf -t "Annual Report 2025"

Extracting text with layout preservation

oxidizepdf extract-text invoice.pdf -o invoice.txt --preserve-layout

Rotating specific pages

oxidizepdf rotate document.pdf -o fixed.pdf -a 90 -p "1,3,5-10"

Getting detailed PDF information

oxidizepdf info complex.pdf --detailed

Error Handling

The CLI provides detailed error messages for common issues:

  • Invalid file paths
  • Unsupported PDF features
  • Invalid page ranges
  • Parsing errors

Exit codes:

  • 0: Success
  • 1: Error occurred

Performance

oxidize-pdf-cli is optimized for performance:

  • Fast PDF parsing (< 50ms for typical documents)
  • Efficient memory usage with streaming operations
  • Multi-threaded operations where applicable

Limitations

Current limitations (as of v0.1.2):

  • No support for encrypted PDFs
  • Limited to JPEG images (PNG support planned)
  • Text extraction limited to simple encoding
  • Merge and split operations coming in Q2 2025

License

GPL v3.0 - See LICENSE file for details