README.md
Transcribe a PDF to Markdown by rasterising every page to a PNG and asking the vision-language model loaded in LM Studio to read it.
LM Studio has no built-in OCR, and the existing alternatives (MinerU, Marker, Doclingβ¦) require a heavy Python/Tesseract install. If you already have a VL model loaded, a PDF is just a stack of images β this plugin runs that loop, locally, with no network call.
read_pdf_to_markdown({ path, pages?, page_render_scale?, transcription_hint?, include_page_separators? })
returns { markdown, pages_processed, pages_failed, total_chars, ms_total, ms_per_page, warnings }
or { error } on hard failures (file missing, encrypted PDF, no VL loadedβ¦).
pages accepts forms like "1", "1-3", , , .
"1,3,5-7""5-""-3"Editable from the plugin settings panel in LM Studio:
auto, fr, en, β¦ fed into the per-page prompt.faithful / clean / structured.
clean strips lines that recur across β₯ 3 pages (running headers/footers).Rendering pdf.js β PNG is ~50β100 ms per page; everything else is the VL roundtrip. Expect 5β30 s per page depending on the model. A 30-page lesson can therefore take several minutes β warn the user before launching.
pages_failed and the run continues.MIT.