Preface¶
When feeding PDFs into a RAG system or asking an Agent to perform citations or structured extraction, the common bottleneck is often not the model’s capability but the input quality. Scanned documents, multi-column layouts, and mixed tables and formulas often result in out-of-order or structurally lost text during standard extraction. The following introduces the community Skill on SkillHub: “Convert dense PDFs into LLM-ready text and page-aligned markdown with olmOCR.” It embeds guidance on when to use olmOCR, environmental dependencies, and installation paths into the Agent’s SKILL.md, facilitating an automated document OCR and Markdown export workflow during conversations.
What is this?¶
The Skill ID is @user_3c6cb52e/convert-dense-pdfs-into-llm-ready-text-and-page-aligned-markdown-with-olmocr, version 1.0.0. It is sourced from the community (SkillHub category: office-efficiency), published by user_3c6cb52e, and tagged with requires_api_key=false, indicating that the Skill itself does not require API key configuration.
One-sentence positioning: When an agent needs to convert scanned or complex layout documents into clean markdown or text for chunking, searching, extraction, or citation workflows, use olmOCR.
The Skill content is compiled from the upstream allenai/olmocr documentation and notes the community maintenance path 1991513ccie-png/skills. The underlying tool, olmOCR, is maintained by the Allen Institute for AI (AllenNLP) team and targets image-based documents such as PDFs, PNGs, and JPEGs, outputting readable plain text or Markdown.
Core Functions¶
Based on the Skill summary and the upstream README, the verified capabilities include:
- Converts PDFs and image-based documents (PNG, JPEG, etc.) into clean Markdown or plain text.
- Supports formulas, tables, handwriting, and complex layouts; removes common headers and footers, and organizes the body text according to the natural reading order (including multi-column and figure layouts).
- When using
--markdown, it generates Markdown files corresponding to the input under the workspace, facilitating subsequent chunking and page-aligned citations. - Inference methods are flexible: local GPU (7B-class Vision Language Model), remote vLLM/OpenAI-compatible services, or Docker image batch processing.
Prerequisites listed in the Skill: Python 3.11, pip or conda, poppler-utils; local inference optionally requires an NVIDIA GPU. The upstream documentation describes a VLM based on approximately 7B parameters; full local inference typically requires a GPU (the documentation cites conditions such as at least ~12GB VRAM and ~30GB disk space).
Installation and Activation¶
Installing the SkillHub CLI and the Skill¶
First, confirm if skillhub is installed:
command -v skillhub && skillhub --version
If not installed, follow the official SkillHub instructions to perform a full installation (CLI + default Skills):
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
When installing this Skill, you must use --dir to point to the current Agent’s skills directory; otherwise, if it defaults to ./skills/, it may not be recognized. Common paths in Cursor are ~/.cursor/skills/:
skillhub install convert-dense-pdfs-into-llm-ready-text-and-page-aligned-markdown-with-olmocr \
--namespace user_3c6cb52e \
--dir ~/.cursor/skills/
You can also let the Agent install the ID @user_3c6cb52e/convert-dense-pdfs-into-llm-ready-text-and-page-aligned-markdown-with-olmocr following the SkillHub installation instructions. For Claude Code, the corresponding directory is generally ~/.claude/skills/; for Codex, it is ~/.codex/skills/ or .agents/skills/ in the project.
Installing the olmOCR Runtime (Upstream)¶
The Skill requires a separate olmOCR environment. For Ubuntu/Debian, you can first install system dependencies (including poppler-utils and fonts):
sudo apt-get update
sudo apt-get install poppler-utils ttf-mscorefonts-installer msttcorefonts fonts-crosextra-caladea fonts-crosextra-carlito gsfonts lcdf-typetools
It is recommended to create a new conda environment:
conda create -n olmocr python=3.11
conda activate olmocr
If only connecting to a remote inference service, a lightweight package can be installed:
pip install olmocr
Example for local GPU inference (consistent with excerpts in the Skill, CUDA 12.8 index):
pip install olmocr[gpu] --extra-index-url https://download.pytorch.org/whl/cu128
After installation, describe requirements in the conversation such as “Convert scanned PDF / complex layout PDF to Markdown for RAG,” and the Agent will follow the SKILL.md guidance to select olmOCR instead of simple pdftotext.
Typical Usage¶
The following commands are derived from the upstream olmOCR README, consistent with the documentation referenced in the Skill, and can be reproduced locally.
Convert single PDF to Markdown (Local GPU):
curl -o olmocr-sample.pdf https://olmocr.allenai.org/papers/olmocr_3pg_sample.pdf
olmocr ./localworkspace --markdown --pdfs olmocr-sample.pdf
--markdown writes the results to ./localworkspace/markdown/. To view the output:
cat localworkspace/markdown/olmocr-sample.md
Single Image:
olmocr ./localworkspace --markdown --pdfs random_page.png
Using a Remote vLLM Service (No need to install GPU dependencies locally):
olmocr ./localworkspace --server http://remote-server:8000/v1 \
--model allenai/olmOCR-2-7B-1025-FP8 --markdown --pdfs *.pdf
You can also use python -m olmocr.pipeline instead of the olmocr command. For online trials, refer to olmocr.allenai.org.
Applicable Scenarios and Notes¶
Suitable for:
- Scanned documents, old papers, and layout-dense technical PDFs that require clean Markdown or plain text for subsequent chunking, vector retrieval, or Agent citation.
- Document pipelines that need to preserve reading order and the readability of tables and formulas, rather than just extracting embedded font layer text.
- Teams with existing GPUs or willingness to use remote inference/Docker for batch conversion.
Notes:
- The Skill is not responsible for installing GPU drivers or downloading models; the Docker image is large (documentation indicates a model image size on the order of ~30GB), so plan disk space and the
--gpusenvironment in advance. - Local inference has hardware requirements; without a GPU, use
pip install olmocr+--serverremote inference, or Docker/online demo. - SkillHub page statistics (at time of capture): Rating 100000, Downloads 952; unrelated to specific olmOCR version release rhythm, refer to allenai/olmocr for specifics.
- The Skill metadata is tagged
verification: security_reviewed, but it is still recommended to run conversion commands in a trusted environment; do not blindly execute scripts on untrusted PDFs in an unisolated environment.
Conclusion¶
If your Agent workflow is stuck on “The PDF opens, but the extracted text is unusable,” you can first install this Skill into the skills directory of clients like Cursor, then prepare the olmOCR environment as described above. It consolidates trigger conditions, dependencies, and upstream commands into a single SKILL.md, reducing the cost of searching for documentation every time.
Official Skill Page: SkillHub - Convert dense PDFs into LLM-ready text and page-aligned markdown with olmOCR
API Metadata Address: https://api.skillhub.cn/user_3c6cb52e/convert-dense-pdfs-into-llm-ready-text-and-page-aligned-markdown-with-olmocr