marker-pdf
БесплатноБез исполняемых скриптовНе проверенUse when converting scanned PDFs or documents to markdown/JSON/HTML. Marker (Datalab) uses surya OCR for 90+ languages including Arabic.
от mina-atef-00460 установок в других каталогахОб этом скилле
Marker PDF — Scanned Document to Markdown
Convert PDFs, images, DOCX, PPTX, HTML, EPUB into clean markdown, JSON, or HTML. Uses surya for OCR (90+ languages including Arabic) and layout detection. Optionally uses an LLM for higher accuracy.
When to Use
- Converting scanned PDFs (especially Arabic/multilingual) to searchable markdown
- Extracting tables, equations, code blocks from PDFs
- Preparing documents for LLM ingestion (wiki, RAG, knowledge base)
- Batch converting multiple PDFs to markdown
Don't use for: Native digital PDFs with good text (just extract text directly).
Don't use for single-page images (use vision_analyze instead).
Installation (Bootc/Fedora Atomic — Container-Based)
On immutable systems (Bootc, Silverblue, etc.), use uv inside a container or a venv:
# Option A: uv tool install (isolated, best for CLI use)
curl -LsSf https://astral.sh/uv/install.sh | sh
uv tool install marker-pdf
# Option B: uv venv + pip (if you need Python API access)
uv venv ~/.venvs/marker && source ~/.venvs/marker/bin/activate
uv pip install marker-pdf
# Option C: Podman container (fully isolated)
podman run --rm -v ./pdfs:/data -it python:3.12-slim \
bash -c "pip install marker-pdf && marker_single /data/input.pdf -o /data/output/"
First run downloads ~1GB of ML models to ~/.cache/marker/.
CLI Usage
Single file
marker_single /path/to/file.pdf -o /path/to/output/
Key flags:
--output_format [markdown|json|html|chunks]— default: markdown--force_ocr— force OCR on all pages (use for scanned PDFs)--strip_existing_ocr— remove existing OCR text, re-OCR with surya--page_range "0,5-10,20"— process specific pages--use_llm— boost accuracy with an LLM (needs API key)--disable_image_extraction— skip image extraction--paginate_output— add page number markers--debug— save debug images with layout overlays
Batch conversion
marker /path/to/input/folder/ -o /path/to/output/ --workers 4
Arabic / RTL documents
# Force OCR (recommended for scanned Arabic PDFs)
marker_single arabic.pdf -o ./output/ --force_ocr
# With LLM boost for better accuracy
marker_single arabic.pdf -o ./output/ --force_ocr --use_llm \
--llm_service marker.services.gemini.GoogleGeminiService \
--gemini_api_key YOUR_KEY
Surya OCR supports Arabic natively. For scanned documents, always use --force_ocr.
Table extraction only
marker_single file.pdf -o ./output/ \
--converter_cls marker.converters.table.TableConverter \
--output_format json
Python API
from marker.converters.pdf import PdfConverter
from marker.models import create_model_dict
from marker.output import text_from_rendered
converter = PdfConverter(artifact_dict=create_model_dict())
rendered = converter("input.pdf")
text, _, images = text_from_rendered(rendered)
# text is markdown string
With custom config
from marker.config.parser import ConfigParser
config = {"output_format": "json", "force_ocr": True}
config_parser = ConfigParser(config)
converter = PdfConverter(
config=config_parser.generate_config_dict(),
artifact_dict=create_model_dict(),
processor_list=config_parser.get_processors(),
renderer=config_parser.get_renderer(),
)
rendered = converter("input.pdf")
Output Formats
| Format | Contents |
|---|---|
| Markdown | Text + images (saved separately) + tables + LaTeX equations + code blocks |
| JSON | Tree of blocks with types, bounding boxes, HTML, images (base64) |
| HTML | Full HTML with img tags, math tags, pre tags |
| Chunks | Flattened list of top-level blocks with full HTML (for RAG) |
LLM Services (for --use_llm)
| Service | Flag | Key needed |
|---|---|---|
| Gemini (default) | --gemini_api_key |
GOOGLE_API_KEY env or flag |
| Ollama | --llm_service marker.services.ollama.OllamaService |
--ollama_base_url, --ollama_model |
| Claude | --llm_service marker.services.claude.ClaudeService |
--claude_api_key |
| OpenAI | --llm_service marker.services.openai.OpenAIService |
--openai_api_key, --openai_model |
Performance Notes
- GPU: ~0.18s/page (H100), ~1-3s/page (CPU)
- VRAM: ~3.5GB average per worker, 5GB peak
- 60-page PDF on CPU: expect 2-5 minutes (after models cached)
- Reduce
--workersif running out of memory
Common Pitfalls
- Garbled output on scanned PDFs — always use
--force_ocrfor scanned documents - Out of memory — decrease
--workersor split the PDF into smaller chunks - Missing Arabic text — surya supports Arabic natively; if results are poor, try
--strip_existing_ocr --force_ocr - Large model download on first run — ~1.35GB
model.safetensorsdownloaded frommodels.datalab.toto~/.cache/datalab/models/layout/<date>/. The connection may break mid-download (BrokenPipeError) — marker retries 3 tim
Установить marker-pdf в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл marker-pdf?
Use when converting scanned PDFs or documents to markdown/JSON/HTML. Marker (Datalab) uses surya OCR for 90+ languages including Arabic.
Как установить скилл marker-pdf?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл marker-pdf запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic