Contents
Importing PDF
Marked can open PDF documents (.pdf) directly. Drag a file to Marked or use (⌘+O). The document is converted to Markdown for preview and export.
PDF import works best on smaller, text-based PDFs (slides, articles, short reports). Large manuals, books, and scanned documents are supported but often convert slowly or imperfectly — see Import limitations below.
Marked is still a preview tool: you do not edit the PDF inside Marked. Use ⌘+E to open the PDF in Preview (or your system default), and Marked refreshes when the file changes on disk.
How conversion works
PDF import uses the pdf22md library (MIT License; see pdf22md License). Marked runs conversion in the background while showing a short Converting notice.
The converter:
- Extracts text from digital PDFs using PDFKit
- Uses Vision OCR on pages where embedded text is missing (common with scans)
- Detects headings from font size when possible
-
Saves images into an
assetsfolder next to the generated Markdown
Marked does not enable pdf22md’s optional AI cleanup in the app. Conversion quality depends on how the PDF was created.
Cache and live preview
Converted Markdown and images are stored under Marked’s Watchers cache (~/Library/Caches/Marked/Watchers/PDF/). The original PDF path stays the document source for file watching.
When you save or replace the PDF in another application, Marked detects the change and re-converts automatically (same coalesced reload behavior as RTF and Scrivener).
After conversion, Marked treats the document like other compiled sources: export, statistics, and most preview features run against the generated Markdown. Image paths in the preview point at cached assets until you export.
Import limitations
Set your expectations accordingly — PDF-to-Markdown is useful, not perfect.
What works well
- Vector and text-based PDFs with real embedded text (exported from Word, Pages, InDesign, etc.)
- Moderate length — a few dozen pages usually convert in reasonable time with good structure
What is unreliable
- OCR (scanned PDFs) — Vision fills in missing text, but accuracy is often poor compared with a dedicated OCR tool; expect typos, broken words, and missed columns
- Tables — layout is guessed from text positions; merged cells, nested tables, and complex grids rarely survive as clean Markdown tables
-
Image placement — figures are extracted to
assets/, but alignment, captions, and text wrap around images are not preserved reliably
Size and performance
- Large PDFs (user guides, textbooks, long manuals) may take a very long time to convert, use substantial memory, or fail to produce useful Markdown. Marked stays responsive while conversion runs in the background, but there is no guarantee a 500-page manual will finish successfully
- If conversion completes with little or no content, Marked shows an error rather than leaving a blank preview
Other limits
- Password-protected PDFs are not supported in v1
-
Embedded PDF images in Markdown (
[]()referencing a.pdffile) are unrelated to PDF import — only opening a.pdfas the main document triggers conversion
For Word documents, use Working with DOCX. For Rich Text, use RTF and RTFD Support.
Exporting PDF
Marked exports PDF from your live preview — the same built-in or custom CSS theme you use on screen drives print and PDF output. Preview first, adjust style and proofreading, then export when the document is ready. See Live Markdown Preview on Mac for the full workflow.
Ways to export
-
Print/PDF (⌘+P) — opens the system print dialog with Marked’s print stylesheet. Save to PDF via the PDF button or send to Preview.app. Supports pagination, headers and footers, margins, and automatic page breaks from headings or
<!--BREAK-->markers. See Export Markdown to PDF on Mac in Exporting. - Save PDF — from the Export Panel (⇧+⌘+E) or gear menu, saves the full preview as a continuous (unpaginated) PDF on disk.
- Paginated PDF — available from the Export Panel for PDF output with page breaks and print layout applied.
Each preview style includes companion print CSS so backgrounds, type sizes, and borders suit paper or PDF output.
Export settings
Margins, headers and footers, page-break rules, table of contents, link annotations, background printing, and related options live in . See Settings: Export for every preference and Exporting for header/footer placeholders.
Export Profiles let you save named sets of PDF (and other) export settings — for example, one profile for letter-size print and another for continuous PDF archive.
Per-document overrides are available via MultiMarkdown metadata (for example Print Header Left: or Margins:). See Exporting for examples.
Related topics
- Opening Files — drag and drop, Open Recent, clipboard
- Exporting — export panel, HTML, DOCX, EPUB, and PDF workflows
- Settings: Export — all PDF and print preference details
- pdf22md License — third-party MIT license text (import)
Next up: Image Variants ▶
Search | Support Site | Knowledgebase | Legal | Privacy | Twitter