Niobium uses PyMuPDF to extract embedded images from PDF files. All PDF processing works without an API key.
Extract images only¶
Export images from a PDF without creating any Anki cards:
niobium -pin /path/to/lecture.pdf -pout /path/to/outputImages are saved as numbered files in a timestamped subdirectory.
Extract from specific pages¶
niobium -pin /path/to/lecture.pdf --page 5-10 -pout /path/to/outputPages are 1-indexed. --page 1 is the first page. --page 3-7 processes pages 3 through 7 inclusive.
Create cards directly from a PDF¶
Process a PDF and push cards to Anki in one step:
niobium -pin /path/to/lecture.pdf -deck "Lecture 3"Or export as .apkg:
niobium -pin /path/to/lecture.pdf -apkg ./outputOr from specific pages:
niobium -pin /path/to/lecture.pdf --page 5-10 -apkg ./outputTwo-step workflow¶
For large PDFs, extract first to review images before processing:
# Step 1: extract
niobium -pin /path/to/lecture.pdf -pout /path/to/images
# Step 2: review, delete unwanted images, then process
niobium -dir /path/to/images -apkg ./outputThis gives you the opportunity to delete irrelevant images (title slides, blank pages) before card creation.
Page selection (--page)¶
The --page flag limits which pages are processed:
# Single page
niobium -pin notes.pdf --page 5 -apkg ./output
# Page range
niobium -pin notes.pdf --page 3-7 -apkg ./outputThis works with all PDF workflows: image extraction (-pout), card creation (-deck, -apkg), and AI modes (--smart).
AI-powered PDF processing¶
When combined with --smart --page, Niobium enters a generation-first pipeline where Claude sees the full rendered page and creates cards from scratch (cloze, basic, and image occlusion). See Smart Generation.
niobium -pin lecture.pdf --page 1-10 --smart -apkg