# Chat with PDF (pdfchat.wondermayank.in): full documentation Chat with PDF is a free web app by wondermayank. You drop a PDF into the page and chat with it. A small language model runs inside your browser, so your document is never uploaded to any server. URL: https://pdfchat.wondermayank.in/ Category: education, productivity, study tools Price: free Privacy: all processing happens on the user's device ## How it works 1. Text extraction: the PDF is read in the browser with pdf.js, page by page. Text is kept per page so answers can cite page numbers. 2. Local AI: WebLLM (MLC) runs a quantized model on the device GPU through WebGPU. The model files download once from a public model host and are cached by the browser. 3. Retrieval: the PDF text is split into small overlapping chunks. For each question the app scores chunks by keyword overlap and sends the best three, with page labels, to the model. This keeps answers fast on small models. 4. Streaming: answers, flashcards, test questions and mind map branches appear as soon as the model produces them, without waiting for the full response. 5. Storage: the last PDF text and chat are saved in the browser's IndexedDB so the user can continue later. Settings use localStorage. The user can clear saved data in Settings. ## Model choices - Fast, about 200 MB: SmolLM2-360M-Instruct (q4f16_1). Quickest to download and answer; simpler answers. - Normal, about 400 MB: Qwen2.5-0.5B-Instruct (q4f16_1). Balanced; default. - Smarter, about 1 GB: Qwen2.5-1.5B-Instruct (q4f16_1). Best quality and best for non-English languages; slower to download. The chosen model starts downloading as soon as the page opens, in parallel with the user picking and reading a PDF. While downloading, the app shows megabytes loaded, total size, speed and estimated time left. Cached models load in seconds. ## Features - Chat with the PDF, with page references under answers (for example "Page 4, 7") and a copy button. - Quick suggestions: Summarize, Key points, Explain simply. - Flashcards: flip cards; mark "I know it" or "Review again"; known cards leave the deck. - Mock Test: choose 5 or 10 questions and Easy, Medium or Hard. After the test the app lists weak topics. - Mind Map: a central topic with branches and points. - Cheat Sheet: concise grouped key facts. - Export: Copy text, or use the PDF button (uses the browser's print / Save as PDF, so all languages render). - Study streak: a daily streak counts days the user studied. - Settings: answer language (English, Hindi, Spanish, French, German, Portuguese, Arabic, Bengali, Tamil, Telugu, Marathi, Gujarati, Urdu, Japanese) and accent colour. - PWA: installable on Android, iOS and desktop; the app shell and libraries are cached by a service worker so it works offline after the first load. ## Requirements and limits - A browser with WebGPU: recent Chrome or Edge on desktop or Android. Safari support depends on version. - Needs a PDF with selectable text. Scanned PDFs without a text layer are not supported (no OCR). - Small local models can make mistakes, especially in non-English languages. Always check important facts using the page references. - Only a limited amount of the document (about the first 5,000 characters) is used for flashcards, tests, mind maps and cheat sheets; chat answers use the most relevant passages from the whole PDF. ## FAQ Q: Is my PDF uploaded anywhere? A: No. It is processed in your browser. Q: Does it work offline? A: Yes, after the first visit and the first model download. Q: Why is the first load slow? A: The AI model has to download once. Fast is about 200 MB. It is cached afterwards. Q: How do I save flashcards? A: Open Flashcards, tap PDF (Save as PDF) or Copy. Q: Who made it? A: wondermayank. Site: https://wondermayank.in ## Technical stack HTML, CSS and vanilla JavaScript in a single page; pdf.js 3.11.174; @mlc-ai/web-llm 0.2.79; IndexedDB; Service Worker; Web App Manifest. Design: light neumorphism with a blue accent. ## Files served at the site root /index.html, /manifest.json, /sw.js, /icon-192.png, /icon-512.png, /robots.txt, /sitemap.xml, /llms.txt, /llms-full.txt