Skip to content

lieuwe89/Palimpsest

Repository files navigation

Palimpsest

Palimpsest is a modern, client-side web application for quick, secure, and intuitive PDF manipulation.

Features:

  • Edit PDFs: Reorder, rotate, delete pages, and extract specific pages as images.
  • Visual Splitting: Use interactive Bauhaus-style markers to define split points between pages and download chunks instantly.
  • Merge PDFs: Combine multiple files seamlessly with a high-contrast sorting interface.
  • Images to PDF: Batch convert PNG and JPG files into a single, cohesive PDF document with automatic aspect-ratio preservation.
  • Privacy First: 100% browser-based. No PDF files ever leave your device or are uploaded to any server.

Tech Stack

  • Framework: Vite with Vanilla Javascript.
  • Aesthetic: Custom Bauhaus-inspired design system (high-contrast, geometric, zero-radius borders).
  • Core Engine: pdf-lib for binary PDF mutations.
  • Rendering: pdfjs-dist running in a Web Worker for high-fidelity page thumbnails.
  • UX: SortableJS for drag-and-drop reordering, fflate for ultra-fast client-side ZIP generation for image/split exports.

Local Development

Ensure you have Node.js installed.

  1. Install dependencies:

    npm install
  2. Run the development server:

    npm run dev
  3. Build for production:

    npm run build

    The optimized static assets will be generated in the /dist directory.

Deployment

Palimpsest compiles to a static website and can be hosted on any standard web server (Apache, Nginx, Vercel, Netlify).

  • Base Path: The current build is configured with a base path of /palimpsest/ (see vite.config.js). If you are deploying to the root of your domain, change this to /.
  • Static Assets: After running npm run build, upload the contents of the dist/ directory to your server (e.g., via scp or rsync).
  • MIME Types: Ensure your production server serves .mjs files with the text/javascript MIME type. A public/.htaccess file is included for Apache environments.

Known Limitations

  • Encryption: pdf-lib cannot natively rewrite streams of encrypted PDFs. Palimpsest includes logic to detect encrypted/password-protected PDFs and will gracefully instruct the user to unlock them first (e.g., via "Save as PDF" in Chrome).

About

A modern, client-side web application for quick, secure, and intuitive PDF manipulation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors