api/
FastAPI app with upload/session storage, tool routes, document routes, security headers, logging, rate limiting, CORS for local development, and sanitized user-facing errors.
Repository-driven docs
This static page was generated from the repository itself. It documents the web app, API, CLI, core Python modules, examples, sample PDFs, screenshots, roadmap, and release checks currently present in the codebase.
pdf-editor-offline version 2.0.0pdf-editor-offlineapi/FastAPI app with upload/session storage, tool routes, document routes, security headers, logging, rate limiting, CORS for local development, and sanitized user-facing errors.
frontend/React workspace with editor, thumbnails, navigation, recent files, history, tool panels, upload flow, PDF viewer, and UI tests.
pdf_editor_offline/Reusable Python package containing converter, manipulator, editor, text, rich text, navigation, annotation, image, metadata, privacy, and object inspection modules.
tests/ and frontend/tests/Backend, API, Phase 4, Phase 5, smoke, frontend component, and lifecycle coverage. The repository currently contains more than 400 test definitions.
The FastAPI app registers document-scoped routes and file-based tool routes. The codebase currently exposes more than 100 route decorators across `api/routes/documents.py` and `api/routes/tools.py`.
Upload, inspect, download, delete, page render, metadata, privacy cleanup, page transforms, annotations, images, TOC, bookmarks, links, optimization, and maintenance cleanup.
Merge, split, compress, convert, sign, watermark, rotate, protect, unlock, repair, OCR, compare, batch convert, auto-merge folder, and template processing.
PYTHONPATH=. python -m uvicorn api.main:app --host 0.0.0.0 --port 8000 --reload
The Typer CLI exposes extract, edit, inspect, and add command groups. The Python package exposes reusable converter and manipulator classes.
pdf-editor-offline extract text input.pdf
pdf-editor-offline extract images input.pdf --output-dir ./images
pdf-editor-offline edit metadata input.pdf title "Quarterly Report"
pdf-editor-offline edit delete-page input.pdf 0 --output output.pdf
pdf-editor-offline inspect object-tree input.pdf
pdf-editor-offline add image input.pdf stamp.png 0 100 120 180 80 --output stamped.pdf
from pdf_editor_offline import PDFConverter, PDFManipulator
converter = PDFConverter()
converter.pdf_to_word("input.pdf", "output.docx")
manipulator = PDFManipulator()
manipulator.merge_pdfs(["file1.pdf", "file2.pdf"], "merged.pdf")
The repository includes small fixture PDFs for demos, screenshots, and manual smoke tests.
The release checklist in the repository asks for backend tests, frontend tests, frontend build, formatting checks, Docker build, package build, and manual PDF smoke tests.
python -m pytest -q
cd frontend && npm test && npm run build
python -m black --check api pdf_editor_offline tests
git diff --check
These files are copied into site/assets/docs/ so the generated folder remains portable.