Skip to content

UIhoshi/pdforge

Repository files navigation

OPTK is an offline-first PDF merge, split, and page-level manipulation utility designed for Web, Windows, and Linux. It processes documents entirely locally without transmitting data to remote servers.

Note

Privacy-First Mandate: OPTK runs 100% locally in the browser or desktop shell. No external APIs, remote tracking, or cloud services are used, ensuring total compliance with data security requirements.


🎯 Product Definition

Target Scenario OPTK Solution
Complete Data Privacy Fully local document processing using Web Workers, Electron shells, and Node.js LAN serving.
Flexible Page Manipulation Page-level edit mode enabling deletions, rotation, and custom reordering on a visual interface.
Unified Cross-Platform Core Single codebase runs identically across Web, Windows standalone, and Linux LAN/desktop paths.
Separated Verification Flow Keeps source preview distinct from the final edited result preview to prevent verification confusion.

🚀 Quick Start

Option 1: Web version (Zero Install)

  1. Open index.html in your browser.
  2. Drag and drop one or more PDFs.
  3. Use page-level tools to merge, split, delete, or rotate pages.
  4. Click Preview to inspect the compiled result, then click Download.

Option 2: Windows Desktop

Obtain release packages from the repository:

  • Portable / Unpacked: offline-pdf-toolkit-win-portable-v1.0.0.zip
  • Installer: offline-pdf-toolkit-win-installer-v1.0.0.exe

Option 3: Linux Deployment

Two deployment models are supported:

  • LAN Web Endpoint: Launch the LAN package to serve the tool at http://<linux-ip>:8787 for network clients.
  • Local Desktop Client: Install the local desktop package for single-machine use.

🧱 Architecture & Repository Layout

Tech Stack

  • UI Engine: Lightweight HTML5, CSS3, and Vanilla JavaScript.
  • PDF Engine: pdf-lib compiled to run in high-performance Web Workers.
  • Packaging: Electron wrapper for desktop apps; lightweight Node.js server for LAN deployment.

Repository Layout

Directory / File Core Purpose
index.html Entrypoint for Web and desktop wrappers
assets/ Styles, workers, and runtime libraries
tools/electron/ Electron bootstrap scripts and build configurations
tools/server/ Node.js LAN server scripts
package.json Dependency definitions and packaging scripts

⚡ Core Features & Capabilities

  • PDF Merging: Combine multiple source PDFs into a single output document.
  • PDF Splitting: Separate pages by specifying page ranges.
  • Page-Level Editing: Rotate pages, delete pages, and drag to reorder.
  • Dual Preview Engine: Original preview for source tracking; post-edit preview for final verification.
  • Same-Network LAN Delivery: Serve the web utility dynamically on Linux servers for local network teams.

🛠️ Development & Compilation

Install dependencies and compile bundles using standard scripts:

# Install dependencies
npm install

# Build Windows portable zip
npm run build:win:portable

# Build Windows setup installer
npm run build:win:installer

# Run Linux LAN server
npm run serve:linux:lan

# Build Linux desktop bundle
npm run build:linux:dir

Warning

Packaging Note: Compiling Linux AppImage formats on Windows hosts may fail due to file permissions. Use build:linux:dir to package unpacked directories for verification instead.


🤝 Collaboration & Attribution

This project is published under UIhoshi and built via collaborative AI workflows.

  • Project Owner: UIhoshi
  • AI Contributors: Codex, Gemini
  • Attribution Rule: Code commits and releases are owned by UIhoshi; agent collaboration models are registered here for workflow tracking.

🔗 Related Repositories

About

Offline PDF Toolkit (OPTK): 100% offline PDF merge/split/preview for Web, Windows, and Linux desktop, plus a Linux LAN mode.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages