How mattimaxforce/pdfcraft-chrome works
PdfCraft for Chrome is a local-first Chrome extension that routes PDFs into the upstream PdfCraft reader/editor. The main workflow detects or receives a PDF, opens the viewer wrapper, fetches the document, and hands it to the embedded app; saved output returns through Chrome downloads. The graph also shows settings, manual opening, and the native-viewer escape hatch. The app is generated upstream and is not present in this repository, so its internal capabilities are represented as one external component.
Main entry points: background.js PDF detection and routing · viewer.js Viewer wrapper · popup.js Settings popup · badge.js Open with badge
Components 17
PDF routing
- PDF detection and routing
extension/background.js - URL redirect rules
extension/background.js - Content-Type detection
extension/background.js - Downloaded PDF handling
extension/background.js
Extension interface
- Context menu
extension/background.js - Open with badge
extension/badge.js - Settings popup
extension/popup.js - English and Italian strings
extension/_locales
Document handling
- Viewer wrapper
extension/viewer/viewer.js - Cookie-authenticated PDF fetch
extension/viewer/viewer.js - PdfCraft reader and editor
Chrome platform
- Sync settings
- Session bypass and PDF tabs
- Saved PDF downloads
Other components
- PDF user
- PDF page or link
- Chrome browser APIs
Connections 24
- PDF user → PDF page or link: opens
README.md - PDF page or link → PDF detection and routing: triggers detection
README.md - PDF detection and routing → URL redirect rules: configures
extension/background.js - PDF detection and routing → Content-Type detection: checks headers
extension/background.js - PDF detection and routing → Downloaded PDF handling: checks downloads
extension/background.js - PDF detection and routing → Context menu: registers menus
extension/background.js - Context menu → Viewer wrapper: opens PDF
extension/background.js - PDF detection and routing → Viewer wrapper: opens detected PDF
extension/background.js - PDF detection and routing → Open with badge: injects
extension/background.js - Open with badge → PDF detection and routing: requests opening
extension/badge.js - PDF user → Settings popup: changes settings
README.md - Settings popup → Sync settings: reads and writes
extension/popup.js - PDF detection and routing → Sync settings: reads settings
extension/background.js - PDF detection and routing → Session bypass and PDF tabs: tracks bypass and tabs
extension/background.js - Settings popup → PDF detection and routing: requests native viewer
extension/popup.js - PDF detection and routing → Chrome browser APIs: redirects and opens tabs
extension/background.js - Downloaded PDF handling → Viewer wrapper: opens downloaded PDF
extension/background.js - Viewer wrapper → Cookie-authenticated PDF fetch: fetches document
extension/viewer/viewer.js - Viewer wrapper → PdfCraft reader and editor: sends bytes by message
README.md - PdfCraft reader and editor → Viewer wrapper: returns saved files
README.md - Viewer wrapper → Saved PDF downloads: downloads edited PDF
extension/viewer/viewer.js - Settings popup → English and Italian strings: loads strings
extension/popup.js - Open with badge → English and Italian strings: loads strings
extension/badge.js - Viewer wrapper → English and Italian strings: loads strings
extension/viewer/viewer.js