A web-based tool for editing PDF metadata and linearizing PDFs for faster web viewing using QPDF WebAssembly.
- PDF File Upload: Browse or drag-and-drop PDF files
- PDF Viewer: View PDF pages with zoom and navigation controls
- Metadata Editing: Edit title, author, subject, keywords, creator, producer, and dates
- Custom Metadata Fields: Add custom metadata fields
- File Download: Download PDFs with updated metadata
- QPDF WASM Integration: Attempts to load QPDF WebAssembly for real PDF linearization
- Current Status: QPDF WASM packages have CDN distribution issues
- Fallback: Shows clear warnings when linearization is unavailable
- Metadata Only: App works perfectly for metadata editing without linearization
- Upload PDF: Click "Browse Files" or drag-and-drop a PDF file
- Edit Metadata: Fill in the metadata fields as desired
- Process:
- If QPDF WASM loads: Get real linearization + metadata updates
- If QPDF unavailable: Get metadata updates only
- Download: Save your updated PDF
- Download a working QPDF WASM build
- Place it in the project directory as
qpdf-wasm-local.js - Update the global variable to match the QPDF API
- Find a working QPDF WASM CDN source
- Update
qpdf-loader.jswith the correct URL and global variable - Test that the WASM file loads and provides the expected API
- Install QPDF on your server:
sudo apt-get install qpdf - Create an API endpoint that accepts PDF files
- Use QPDF command-line:
qpdf --linearize input.pdf output.pdf - Return the linearized PDF to the client
The app attempts to load from these sources:
@neslinesli93/qpdf-wasm(GitHub: neslinesli93/qpdf-wasm)qpdf-wasm-esm-embedded- Local implementation placeholder
- Install Dependencies:
bundle install - Run Server:
bundle exec jekyll serve - Open: Navigate to
http://localhost:4000
├── _config.yml # Jekyll configuration
├── Gemfile # Ruby dependencies
├── _layouts
│ └── default.html # Main layout
├── index.html # Main application page
├── app.js # Main application logic
├── helper.js # Helper scripts (QPDF loader, etc)
├── style.css # Application styles
└── README.md # This file
- No Simulation: Removed all fake/simulated linearization
- Real QPDF Only: Only uses actual QPDF WASM when available
- Clear Feedback: Users know exactly what features are available
- Graceful Degradation: Works perfectly for metadata editing alone
- Chrome/Edge: ✅ Full support
- Firefox: ✅ Full support
- Safari: ✅ Full support
- Requires: Modern browser with WebAssembly support
This project demonstrates PDF processing in the browser and is intended for educational/development purposes.