Anki add-on: 📄 PDF Occlusion - import PDF, occlude, review in context of the PDF

PDF Occlusion turns any PDF into an image-occlusion deck — masks grouped into cards, reviewed as proper cloze flashcards on the PDF so you always have context. Draw, group, and edit masks in a built-in editor with zoom, drag-to-move, and deck selection per PDF. Ideal for textbook chapters, lecture slides, and anatomy/histology atlases. New Features 27-07-26 Filename repair: long PDF names are now shortened at import, and a new one-time migration normalises existing filenames — fixing pages broken by Anki's "Check Media" rename (scroll view / page navigation not loading) ⇧ + draw: hold Shift while drawing to add the rectangle to the same group as the previous one Portrait page fixes: single-page view scrolls inside its own viewport (no more cut-off top/bottom), cursor-anchored zoom works at every zoom level Smarter focus: new questions and the ⌂ button centre on the active card's masks instead of the page middle Peek stability: individually revealed masks stay open while zooming 21-07-26 Single image occlusion: import one image as a standalone occlusion note — via Tools → PDF Occlusion → Import image… or by right-clicking any image in the Add window and choosing Occlude image (respects the Add window's deck selection). Same editor, no page navigation, not part of the PDF library Text annotations zoom-proof: annotation text now scales in lockstep with the page at every zoom level and is rendered identically on front and back — exactly the proportions set in the editor Scroll view improvements: each new question re-centres on its card page and caps the zoom at page width, so you never land somewhere else in the PDF; page-scroll no longer leaks into other cards or decks Per-mask peek polish: revealing a single mask on the question side now hides its hint label too Import dialog fixes: correct size, no clipped text, and the currently selected deck is pre-selected 08-07-26 Continuous scroll view (Beta): browse the whole PDF top-to-bottom during review like a real PDF reader — toggle via Scroll button or S , ⌘/Ctrl + wheel zooms the PDF only (cursor-anchored, 0.2×–6×), notes shown in a floating side panel Text annotations: place free text on any page (mode 5 / T ) with size slider, colour, bold and italic — rendered identically on the cards Per-mask labels: hints are set per rectangle instead of per group, so masks within one group can carry different labels Exports fixed: page images are now officially referenced from the note, so .apkg deck exports include them Transparent page fix: imports are flattened onto a white background; one-click repair with progress bar for existing images via Tools → PDF Occlusion → Fix transparent page borders Manage PDFs upgraded: first-page thumbnails and a Due column Editor improvements: segmented icon tool buttons (✋ ▭ ✥ ⌫ T) with Draw as default, "Show note in browser" button, line breaks preserved in Notes, floating text-format panel Review UI polish: "Soft Pill" navigation bar, Hide all toggle covers other masks in neutral grey, ✎ button opens the editor for the current page 19-05-26 Folders in Manage PDFs dialog: group PDFs into folders, subfolders via Parent::Child scheme Protected against "Check Media → Delete Unused": PDF page images are no longer incorrectly flagged as unused. One-time migration runs automatically on first start Editor improvements: Notes field editable inline, DPI choice at import (Standard / High Resolution), shortcuts R and E for Rectangle and Edit mode Reliability: robust note lookup for PDF names with special characters, left-side page preview now works consistently, editor opens without forcing a profile reload 26-04-25 Hide other Occlusions in Study mode Bug fixes 25-04-25 Set labels for occlusions Stabilisation of cards order inside a note after deleting a card Use ⌥ + </> to navigate Usage Import a PDF Tools → PDF Occlusion → Import PDF… Pick a PDF and a target deck. The editor opens automatically. Draw masks Mode 2 (Draw): drag to add a mask — each mask starts its own group. Mode 3 (Edit): click/shift-click to select, drag to move, G to group selected, U to ungroup, Delete to remove. Ctrl+S or "Save page": writes the masks and regenerates cards. Each mask (or group) becomes one flashcard. The tooltip after saving shows N mask(s) → M group(s) → K active card(s) . Review Cards show the page with the current group's masks opaque and the other masks transparent — you see the full context. Above the page there's a ◀ Page 5 / 30 ▶ navigation bar, plus small peek strips of the adjacent pages on either side. Click the arrows, the page strip or just the peek strips to jump pages. Home button ( ⌂ ) returns to the question page. Manage PDFs Tools → PDF Occlusion → Manage PDFs… Lists all imported PDFs with page/card counts. Per PDF: Open the editor Rename Move all cards to a different deck Delete (removes notes + media files) Other commands Open PDF viewer… — pick from dropdown and edit Open context viewer for current card ( Ctrl+Shift+P ) — during review, open a floating side-panel synced to the current card Repair note metadata — run the idempotent in-place migration. Use in case of a broken navigation bar Migrate legacy notes… — one-time upgrade from the pre-0.2 type How it's stored A cloze note type called PDF Occlusion is created with these fields: PDF Name — logical name (used to group pages) Page Number — 1-based Page Image — bare filename of the PNG Occlusions — JSON: [{x,y,w,h,group}, ...] (normalised to 0–1) Groups — cloze deletions, e.g. {{c1::g1::g1}}{{c2::g2::g2}} Notes — free-form text shown on the back PDF Prefix — filename prefix for adjacent-page navigation Total Pages — total page count of the PDF Card template shows each group as one cloze deletion; the JS layer renders masks from the JSON positioned as percentage overlays. © C. Ritter

GitHub repository: cxnst13/pdf-occlusion
Repository description: Anki-Add-on