A PDF reader for papers, textbooks and scans. You need it to read PDFs in WittyMediaServer.
It's a module of WittyMediaServer (wittymediaserver.com), on module API 5, built on WittyInk. The same reader also runs in the WittyReader app.
Earth as Art, NASA, public domain.
- Continuous pages: one or two across, fit width, fit page, or 50 to 400 percent.
- Night reading: dark or sepia pages.
- Getting around: the document's own contents, page thumbnails, and search across the whole document, with results arriving while a long file is searched.
- Exact resume: the page and how far down it.
- Study tools from WittyInk: highlights and notes, citations with page numbers, a pen with pressure, and reading aloud.
- Light on small machines: pdf.js loads only when a PDF is opened, only nearby pages are drawn, and large files stream in parts.
- Safe with any PDF: PDF scripts never run, and XFA forms are off.
pdf.js and its worker, which do the actual reading, stay with the app so they aren't carried twice. No documents come with it.
How to use it is in Help inside WittyMediaServer: see Books, PDFs and comics.
An admin adds it from the module store inside WittyMediaServer: Settings → Modules, then Browse the store, then Add beside WittyPDF. The range this version fits is in module.json: WittyMediaServer 0.8.0-alpha through 0.8.x, module API 5. The server takes API 5 modules only, so older servers can't use this version. How modules work on the server is in its docs/MODULES.md.
Adding it brings WittyInk, which it's built on.
- WittyInk, and React 18 or newer, which the app provides.
- pdf.js, from
pdfjs-dist, which draws the pages. It uses the build for older browsers, so TV web views can open it.
It's one browser bundle for every system the server runs on, and it runs on whichever device opens the server. It has been seen working in a desktop browser, against a test server on Linux. It also runs in the WittyReader app. Safari, real phones and real TVs have not been tried.
You need Node.js 22, as CI uses, and Go for the manifest check. In a worktree, first run WittyMediaServer's scripts/dev-modules.mjs (or the copy its --root option keeps in the folder above the repositories). It writes only links that git ignores, so the checkout builds against the repositories beside it.
npm installnpm run build:bundleThat makes one script and one stylesheet, as a server installs them, with WittyModule's builder (kit/web/build-bundle.mjs in a WittyModule checkout beside this one, or wherever WITTYMODULE names). To check the manifest:
go run github.com/wittywilla/wittymodule/cmd/wittymodule check .npm test checks sdui.json, and that register hands over a reader for exactly the formats integration.json claims. CI checks the manifest and builds the bundle.
To use it in another app, give it a ReaderHost whose pdf field is what to open, and load it lazily so pdf.js only downloads when a PDF is opened: see Embedding. The other guides in wiki/ cover viewing and zoom, getting around, study tools, and performance and security.
Module API 5: integration.json claims the pdf format with the readers hook (web.readers), and the bundle's register(host) hands over the reader for it. The web app opens a book with whichever module in use claims its format, after loading WittyInk, which every reader is built on. The app has no list of readers of its own.
It carries its own sdui.json: its theme scope, and Settings, PDFs (each profile's own): fit width or page, two pages across, and page colour. Its library and book pages come with WittyInk, which every reader shares.
Stays in the reader's own code: the reading surface, zoom steps, outline and thumbnails, going to a page, search, and notes.
The file is checked with wittymodule check and described in WittyMediaServer's docs/SDUI-MODULES.md.
Working on a Mac? Start with WittyMediaServer's MAC-START-HERE.md: what to install, what to clone, and every Mac task in order: this module's is item 7.1 (wittywilla/WittyMediaServer#571).
GNU Affero General Public License v3.0 (or later): see LICENSE and NOTICE. If you redistribute it or build on it, please keep the NOTICE attribution.
It uses pdf.js (pdfjs-dist), Copyright Mozilla Foundation, under Apache-2.0. The text-layer styles in pdf.css are adapted from pdf.js.
WittyPDF is part of the WittyMediaServer project: server repository, wittymediaserver.com.
A version tag builds the bundle for the browser, signs the checksum list, and publishes a release that servers can install.
Versions move in small steps as work lands. go run github.com/wittywilla/wittymodule/cmd/wittymodule@v0.5.4 bump . raises it
everywhere it is written (add -part minor for a bigger step). A bump isn't a release: nothing is
tagged or published until you tag it. CI fails when code changed since the last tag and the version
didn't, because tags never move.
To release:
- Check that
versioninmodule.jsonis the one to publish, with the bump committed. - Tag that commit and push the tag:
git tag vX.Y.Z, thengit push origin vX.Y.Z. A tag with a suffix, such asv1.2.0-beta, is published as a prerelease. - Watch the Actions tab. The signing step uses the
WMS_SIGNING_KEYsecret of thereleaseenvironment, and nothing is published without it.
To take a version back, run the withdraw workflow from the Actions tab. It adds the version to a signed list on the release tagged withdrawals, which servers read.
Licensed under AGPL-3.0-or-later: see LICENSE and NOTICE.
WittyPDF is an independent open-source project. It isn't associated with, sponsored by or endorsed by any publisher, rights holder, service or other media software project. No documents come with it, and it doesn't check the ones you open: you're responsible for having the rights to them. Any third-party names here only describe what it works with, and belong to their owners. It's provided “as is”, with no warranty; see LICENSE. Local law applies to how you use it. This isn't legal advice.
