A local page covers most of what people open PDF Expert for: read, highlight, add notes, draw, fill a form, drop in a signature, merge and split pages, and OCR a scan through ocrmypdf. The weekend goes on doing markup properly: marks saved as real PDF annotations that Preview and Acrobat still show, selection that lands on the right words, and big files that don't stall a browser tab. A prompt won't give you the native side: Apple Pencil on an iPad, syncing between devices, and editing existing text in place with its original fonts.
Before you buildPreview on a Mac already annotates, fills forms, signs and merges pages. If that covers your week, you need neither PDF Expert nor a homemade viewer.
Build me a local PDF reader and annotator to replace PDF Expert. Requirements: - Python 3.12 + FastAPI serving one page of plain HTML and vanilla JS on http://127.0.0.1:5200. PDF_DIR in .env is the library: a sidebar lists its PDFs and opens one. - Viewer: PDF.js (`pdfjs-dist`, vendored under /static) draws each page on a canvas with a text layer. Zoom, fit width, a page thumbnail strip, and a search box that highlights every hit. - Markup tools: highlight, underline and strikethrough on selected text; sticky note; freehand ink with a colour and width picker; rectangle and arrow; free text box. The server writes each one with PyMuPDF as a real PDF annotation (`add_highlight_annot`, `add_ink_annot`, `add_text_annot`, `add_freetext_annot`), so Preview and Acrobat show the same marks. - Saving: write to a temp file, keep one timestamped copy of the original in ./backups/, then replace the file. Undo removes the last annotation by its xref. - Forms and signing: fill AcroForm fields on the page; draw a signature once, keep it as ./data/signature.png, and stamp it on any page at a chosen size. - Pages: reorder, rotate, delete and extract pages from the thumbnail strip, and merge several PDFs picked in the sidebar. - Scans: a button runs `ocrmypdf --skip-text` on the open file and reloads it; show a plain message when ocrmypdf isn't installed. - Tests: `pytest` builds a sample PDF, adds every annotation type through the API, reopens it with PyMuPDF and asserts the count and subtype of each annotation. - Single user, bound to 127.0.0.1. No accounts, no telemetry, local-first: nothing is uploaded. - Out of scope: editing existing text in place, e-signature requests, Apple Pencil, cloud sync. README: install steps (`brew install ocrmypdf` or the apt equivalent) and a warning that the app writes into PDF_DIR, so point it at a copy first.
Opens your agent with the prompt filled in, you press enter. Or copy it and paste it into an empty folder.
The first prompt builds the core. Run these one at a time in the same folder to grow it into your own PDF Expert.
Add full-text search to the PDF reader in this folder. Requirements: - Index every PDF in PDF_DIR into SQLite FTS5 (`better-sqlite3` or Python's sqlite3) with PyMuPDF's page text: file, page number and text per row. - A search box in the sidebar returns hits with a snippet and page; clicking one opens the file on that page with the match highlighted. - Re-index only files whose modified time changed; show indexing progress. - Files with no text layer are listed as "needs OCR" instead of being skipped silently. - Update the README.
Add a notes export to the PDF reader in this folder. Requirements: - A button on each open file lists every highlight, underline and note with its page and the text it covers (use PyMuPDF to read the annotation rectangle's words). - Export as Markdown to ./exports/<file>.md, with highlights as blockquotes and notes beneath them, grouped by page. - Copy-to-clipboard for one page's marks. - Update the README.
Add form profiles to the PDF reader in this folder. Requirements: - Store named profiles (name, address, email, phone and any custom keys) in ./data/profiles.json. - On a PDF with AcroForm fields, a Fill from profile button matches fields by name and tooltip and shows a preview before writing anything. - Fields it can't match stay empty and are listed. - Never send profile data anywhere; keep the file out of backups by default. - Update the README.
People pay for a PDF app that opens instantly, writes marks other viewers still understand, and works the same on a Mac and an iPad. At $79.99 a year the choice is easy next to the hours spent keeping a homemade viewer working, and the speed on long documents is hard to copy in a browser.
Estimate · Runs on your machine and needs no paid service. The build is token usage on your agent plan.
| Plan | Monthly | Annual, per month | What you get |
|---|---|---|---|
| Free download | $0 | $0 | Reading and basic markup; the page doesn't itemise the free version. |
| Premium, yearly | — | $6.67 | iPhone, iPad and Mac apps, PDF editing (text, images, links), OCR, signing, annotation, conversion to Word, Excel and PowerPoint, PDF translation, the PDF Copilot assistant, priority support. |
| Lifetime (Mac only) | custom | — | Same feature list on the Mac, plus bug fixes; the page says new features may cost extra. |
A free download exists for viewing and light markup, but the pricing page doesn't list what it includes, and third-party comparisons disagree on signing. Test it before paying.
Kinda. The core is a weekend build with the prompt on this page, but real gaps remain: Apple Pencil markup on an iPad, with your files kept in step on Mac, iPhone and iPad, Editing existing text and images in place with the document's own fonts.
About $6.67 a month on the Premium (yearly) plan, $80.04 a year (checked 2026-10-19).
Apple Pencil markup on an iPad, with your files kept in step on Mac, iPhone and iPad; Editing existing text and images in place with the document's own fonts; Conversion to Word, Excel and PowerPoint; PDF Copilot's AI answers and PDF translation; A native Mac app that opens large files without a browser tab in between. If any of those matter to you, keep paying.
Yes: macOS Preview (free), Stirling-PDF (open source), Xournal++ (open source).