Scriptoria is a next-generation Desktop PDF Reader with Annotations built using Electron and pdf.js, designed for researchers, students, and avid readers who want to go beyond just reading — and start interacting with their documents.
Scriptoria is not just a PDF reader — it's an intelligent reading companion.
With powerful annotation tools, seamless text-to-speech (TTS), and AI-powered question answering, Scriptoria transforms reading into an interactive experience.
- Multi-tab Interface – Open and read multiple PDFs simultaneously.
- Seamless Navigation: Quickly jump between pages using next/previous buttons or direct page input.
- Page Preview Modes: Switch between Single, Split, and Continuous viewing for personalized reading
- Dynamic View Adjustment: Rotate pages left or right for flexible reading orientations.
- Precision Zooming: Smooth Zoom In/Out functionality for detailed content inspection.
- Annotations – Highlight, underline, and bookmark key sections.
- Save & Export – Save your annotations locally for future reference.
- Reader Modes – Light/Dark mode and full-screen view for comfortable reading.
- AI Summarization – Generate concise summaries of your PDF documents.
- Interactive Q&A – Ask natural language questions about the document content.
- Text-to-Speech (TTS) – Listen to the PDF text read aloud using modern speech synthesis.
- Dictionary & Translation – Instantly look up meanings and translate selected text to Hindi.
- OCR Support – Extract text from image-based PDFs using Tesseract.js.
- Node.js (v18 or later)
- Python 3.10+
git clone https://github.com/SoftaBlitz-2k25/Scriptoria.git
cd Scriptorianpm installpip install flask flask-cors python-dotenv google-generativeai requestsCreate or edit the file model/.env and add one of the following API keys:
# Option 1: Google Gemini API
GEMINI_API_KEY=your_gemini_api_key_here
# Option 2: Hugging Face Serverless Inference API
HF_TOKEN=your_hugging_face_token_hereHow to get API keys:
- Gemini: Go to Google AI Studio → Create API Key
- Hugging Face: Go to HF Settings > Tokens → New token (Read access)
Note: If no API key is configured, the server will fall back to running models locally on your CPU.
Open a terminal and run:
cd model
python server.pyOpen a second terminal and run:
npm start- Open PDF files from your local system using the toolbar or drag-and-drop.
- Annotate using the toolbar options (highlight, underline, bookmark).
- Summarize by clicking the purple Summarizer tab on the right side.
- Ask Questions using the Q&A tab to get answers based on your document content.
- Translate selected text to Hindi using the Translate toolbar button.
- Text-to-Speech — Click the Audio tab to listen to the current page or selected text.
- Dictionary — Select a word and click Dictionary to look up its meaning.
- Export your annotated PDF using the Export button.
Scriptoria/
├── main.js # Electron main process
├── preload.js # IPC bridge between main and renderer
├── renderer.js # Core PDF viewer logic
├── index.html # Main UI layout
├── styles.css # Application styles
├── model/
│ ├── server.py # Flask AI backend (Gemini/HF API/Local)
│ └── .env # API key configuration
├── advance/
│ ├── summarize.js # PDF summarization + Q&A panel
│ ├── translate.js # English → Hindi translation popup
│ ├── dictionary.js # Dictionary lookup popup
│ └── exportToPdf.js # Export PDF with annotations
├── features/
│ ├── text-store.js # Centralized text storage per page
│ ├── tts.js # Text-to-speech engine
│ ├── bookmarks.js # User bookmark management
│ ├── highlights.js # Highlight annotation storage
│ ├── underlines.js # Underline annotation storage
│ └── stickynotes.js # Sticky notes storage
├── build/
│ └── ocr.js # Tesseract.js OCR integration
└── icons/ # SVG toolbar icons
