Skip to main content

Privacy-first CLI tool for offline PDF processing

Project description

OfflinePDF

Privacy-first CLI tool for offline PDF processing

OfflinePDF is a command-line utility that provides common PDF manipulation tools (similar to iLovePDF) but runs 100% locally on your machine with zero network access. All processing happens offline, ensuring your documents never leave your computer.

🔒 Privacy Guarantee

  • No internet access - All processing is local-only
  • No telemetry or analytics - We don't track anything
  • No file uploads - Files are never sent anywhere
  • No data storage - Files are processed and immediately discarded
  • Open source - You can audit the code yourself

✨ Features

  • Unlock PDFs - Remove password protection from PDF files
  • Lock PDFs - Add password protection to PDF files
  • Compress PDFs - Reduce PDF file size
  • Merge PDFs - Combine multiple PDF files into one
  • PDF to DOCX - Convert PDF documents to Word format
  • DOCX to PDF - Convert Word documents to PDF format
  • Image to PDF - Convert images (JPG, PNG, etc.) to PDF format

📦 Installation

Using pip (recommended)

pip install offlinepdf

Using pipx (isolated environment)

pipx install offlinepdf

After installation, the offlinepdf command will be available globally from anywhere in your terminal.

🚀 Usage

Unlock a PDF

offlinepdf unlock input.pdf --password mypassword

Merge multiple PDFs

offlinepdf merge a.pdf b.pdf c.pdf -o merged.pdf

Convert PDF to DOCX

offlinepdf pdf2docx input.pdf output.docx

Convert image to PDF

# Single image
offlinepdf image2pdf image.jpg output.pdf

# Multiple images (merged into one PDF)
offlinepdf images2pdf img1.jpg img2.png img3.jpg -o combined.pdf

📋 Command Reference

unlock

Remove password protection from a PDF.

offlinepdf unlock <input.pdf> --password <password> [--output <output.pdf>]

merge

Merge multiple PDF files into one.

offlinepdf merge <pdf1> <pdf2> ... -o <output.pdf>

pdf2docx

Convert a PDF file to DOCX format.

offlinepdf pdf2docx <input.pdf> [--output <output.docx>]

image2pdf

Convert image file(s) to PDF format.

# Single image
offlinepdf image2pdf <image.jpg> [--output <output.pdf>]

# Multiple images
offlinepdf images2pdf <img1> <img2> ... -o <output.pdf> [--overwrite]

Supported image formats: JPG, JPEG, PNG, BMP, GIF, TIFF, WEBP

🛠️ Requirements

  • Python 3.10 or higher
  • All dependencies are automatically installed with the package

🔧 Development

If you want to contribute or modify the code:

# Clone the repository
git clone https://github.com/yourusername/offlinepdf.git
cd offlinepdf

# Install in development mode
pip install -e .

# Run tests (if available)
pytest

📝 License

MIT License - see LICENSE file for details.

🤝 Contributing

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

⚠️ Limitations

  • PDF to DOCX conversion: Quality depends heavily on document structure. Complex layouts (multi-column, tables, icons, vector graphics) may not convert correctly. This is a known limitation of open-source PDF parsers. The tool will automatically try LibreOffice as a fallback if available.
  • Large files may take longer to process
  • DOCX to PDF conversion requires Microsoft Word (macOS/Windows) or LibreOffice (Linux) to be installed

🐛 Troubleshooting

Command not found after installation:

  • Make sure your Python bin directory is in your PATH
  • Try using pipx instead of pip for isolated installation
  • Restart your terminal after installation

Permission errors:

  • Make sure you have read access to input files
  • Make sure you have write access to the output directory

Conversion errors:

  • Verify that input files are not corrupted
  • Check that file formats are supported
  • Ensure sufficient disk space is available

📚 Dependencies

  • Typer - Modern CLI framework
  • Rich - Beautiful terminal output
  • pikepdf - PDF manipulation
  • pdf2docx - PDF to DOCX conversion
  • Pillow - Image processing

Made with ❤️ for privacy-conscious users

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

offlinepdf-1.0.0.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

offlinepdf-1.0.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file offlinepdf-1.0.0.tar.gz.

File metadata

  • Download URL: offlinepdf-1.0.0.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for offlinepdf-1.0.0.tar.gz
Algorithm Hash digest
SHA256 05d1594e178fe373b6e160d9fed000f1caffca14843a266483aad98018051a69
MD5 d868f131160c7c2047de603f52426943
BLAKE2b-256 500247a95c323140893d39410de3aafee62e85e863476297d50c81e747dc793b

See more details on using hashes here.

File details

Details for the file offlinepdf-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: offlinepdf-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for offlinepdf-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 be62f312c50f6ac2028ab52e302dc7f1f5427403f762e00469dc93f274bbded2
MD5 36715c22d6ec346ef18aa4427e27a848
BLAKE2b-256 92d02bf0f0fba3595a0eb1e9d4740d526971273c5900308018916902e61e9681

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page