paper2md
Precision PDF-to-Markdown converter for research papers.
Features
- Title, author, and abstract extraction from diverse paper formats
- Heading hierarchy detection via font size, weight, and allcaps analysis
- Math rendering with CM font-to-LaTeX mapping (~120 symbols)
- Tables detected via line-based layout, output in pipe format
- Figures from raster (xref), vector (drawings), and clustered composites
- References with bracket and alphanumeric key parsing
- OCR fallback for scanned PDFs (PyMuPDF OCR or pytesseract)
- Multi-column support via 1D clustering with adaptive thresholds
- MCP server with tools for PDF conversion, structured extraction, and metadata
Installation
pip install paper2md
With MCP server support:
pip install paper2md[mcp]
With OCR support for scanned PDFs:
pip install paper2md[ocr]
Usage
CLI
paper2md paper.pdf -d output/
This writes the Markdown file and all extracted figure images to the output directory.
Python API
from paper2md import convert
result = convert("paper.pdf")
print(result.markdown)
MCP Server
paper2md exposes three MCP tools: convert_pdf, convert_pdf_structured, and extract_metadata. Configure your MCP client to launch paper2md.mcp_server.
Tested Formats
paper2md is tested against papers from the following venues and publishers:
arXiv, NeurIPS, CVPR, ICLR, IEEE, ACM, NAACL, Meta AI, DeepMind, JMLR, Nature, Springer
Requirements
- Python 3.10+
- PyMuPDF 1.24+
License
MIT
Metadata
Release files for paper2md 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| paper2md-0.1.0.tar.gz | 90.5 kB | Without provenance | Details for paper2md-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| paper2md-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for paper2md-0.1.0-py3-none-any.whl |
Total release size: 155.1 kB
Release files / paper2md-0.1.0.tar.gz
| Download URL | paper2md-0.1.0.tar.gz |
|---|---|
| Size | 90.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3a38bd1018db8acb638d6b4329a99b9de02991ac8358aa57844e3b2b49506e29
|
|
BLAKE2b-256 checksum How to use checksums |
10093ab6bf1bdb6bb57265b0cf3bcc80587a48384a8f5fa45d52abc8477266cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.5
|
Release files / paper2md-0.1.0-py3-none-any.whl
| Download URL | paper2md-0.1.0-py3-none-any.whl |
|---|---|
| Size | 64.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
db2ce64a0a0992c838f4a5d68e7fbd46f6a85c754f236afc922d13793812ecdd
|
|
BLAKE2b-256 checksum How to use checksums |
3b632b5e81e0a8ed768667c7a2866a9da8f9053858ef665401a865318870d6a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.5
|
Security for paper2md 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.