A client-side web application designed to parse, modify, and reverse-engineer official educational PDFs from Central University (CU). This tool allows users to safely convert official academic materials into a beautifully integrated Dark Mode layout natively, modifying the raw PDF drawing instructions directly in the browser.
- Zero-Backend Processing: All PDF parsing, decompression (
pako), and color mapping logic (pdf-lib) executes securely on the client side. No documents are uploaded to any server. - Deep Stream Modification: The system recursively traverses and replaces colors across all CMYK, RGB, and Grayscale color spaces inside both regular
/Contentsstreams and complex LaTeX/Form XObjects. - Live Palette Editor: Upload any PDF to interactively remap color palettes. Live preview is provided by a localized
pdf.jsworker. Custom JSON palettes can be imported or exported for sharing. - CU Dark Theme Aesthetics: The interface aligns with the official minimalistic CU 3rd-party design guidelines (
#212121backgrounds,#f2f2f4accents, and the simplified geometric CU icon).
- Framework: React 18, Vite
- PDF Parsing & Editing:
pdf-lib(binary manipulation),pako(Zlib streams) - PDF Rendering:
pdf.js(for interactive previews) - Styling: Vanilla CSS, configured to match the
cu-roadmapdark theme variables.
- Install dependencies:
npm install
- Start the development server:
The application will be accessible at
npm run dev
http://localhost:8790.
This repository includes a multi-stage Dockerfile and a docker-compose.yml for quick, production-ready deployment via an Nginx alpine container.
- Build and run the container in detached mode:
docker-compose up -d --build
- The application will be immediately available on your host at port
8790.
The core processing logic is located in src/lib/pdfDarkTheme.js. It performs raw bytes manipulation inside PDF content streams. It is deliberately written without heavy framework dependencies to ensure it can be easily ported into a Chrome Extension (e.g., via a content_script or background worker) in future updates.