oxidize-pdf-cli

Crates.iooxidize-pdf-cli
lib.rsoxidize-pdf-cli
version1.1.7
created_at2025-07-12 22:01:27.159052+00
updated_at2025-08-05 13:43:51.629185+00
descriptionCommand-line interface for oxidizePdf
homepage
repositoryhttps://github.com/bzsanti/oxidizePdf
max_upload_size
id1749735
size75,074
(bzsanti)

documentation

https://docs.rs/oxidize-pdf-cli

README

oxidize-pdf-cli

Command-line interface for oxidizePdf - A high-performance PDF manipulation library written in Rust.

Installation

cargo install oxidize-pdf-cli

Usage

oxidizepdf [COMMAND] [OPTIONS]

Commands

Merge PDFs

Combine multiple PDF files into a single document:

oxidizepdf merge input1.pdf input2.pdf -o output.pdf

Split PDF

Split a PDF into individual pages or chunks:

# Split into individual pages
oxidizepdf split input.pdf -o output_dir/

# Split into chunks of N pages
oxidizepdf split input.pdf --chunk-size 5 -o output_dir/

Extract Pages

Extract specific pages from a PDF:

# Extract pages 1-5 and 10
oxidizepdf extract input.pdf --pages 1-5,10 -o output.pdf

Rotate Pages

Rotate pages in a PDF:

# Rotate all pages 90 degrees clockwise
oxidizepdf rotate input.pdf --angle 90 -o output.pdf

# Rotate specific pages
oxidizepdf rotate input.pdf --pages 1,3,5 --angle 180 -o output.pdf

Extract Text

Extract text content from PDFs:

# Extract all text
oxidizepdf text input.pdf

# Extract text from specific pages
oxidizepdf text input.pdf --pages 1-10

PDF Information

Display PDF metadata and information:

oxidizepdf info input.pdf

Global Options

  • -o, --output <FILE>: Output file path
  • -v, --verbose: Enable verbose logging
  • -q, --quiet: Suppress all output except errors
  • --help: Display help information
  • --version: Display version information

Examples

Batch Processing

Process multiple PDFs in a directory:

# Merge all PDFs in a directory
oxidizepdf merge *.pdf -o combined.pdf

# Split multiple PDFs
for file in *.pdf; do
  oxidizepdf split "$file" -o "split_${file%.pdf}/"
done

Advanced Usage

# Extract specific pages and rotate them
oxidizepdf extract input.pdf --pages 1-5 | \
  oxidizepdf rotate --angle 90 -o rotated_pages.pdf

# Merge PDFs with metadata preservation
oxidizepdf merge doc1.pdf doc2.pdf \
  --preserve-metadata \
  --title "Combined Document" \
  -o merged.pdf

Features

  • Fast Performance: Built on the high-performance oxidize-pdf core library
  • Memory Efficient: Streaming operations for large PDFs
  • Cross-Platform: Works on Windows, macOS, and Linux
  • Unicode Support: Full UTF-8 text extraction
  • Error Recovery: Handles corrupted PDFs gracefully

Configuration

oxidize-pdf-cli can be configured using environment variables:

  • OXIDIZEPDF_LOG_LEVEL: Set logging level (trace, debug, info, warn, error)
  • OXIDIZEPDF_BUFFER_SIZE: Set buffer size for streaming operations

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

See Also

Commit count: 280

cargo fmt