Skip to main content

Mistral PDF to Markdown

PyPI version uv

CLI tool to convert PDF and EPUB files to Markdown with the Mistral OCR API. Embedded images are saved next to the generated Markdown file.

The converter calls mistral-ocr-latest.

Installation

Install the published CLI:

pip install mistral-pdf-to-markdown

For an isolated global command:

pipx install mistral-pdf-to-markdown

For local development:

git clone https://github.com/arcangelo7/mistral-pdf-to-markdown.git
cd mistral-pdf-to-markdown
uv sync --locked

EPUB conversion also requires pandoc: https://pandoc.org/installing.html

Usage

Set your Mistral API key:

export MISTRAL_API_KEY='your_api_key_here'

You can also use a .env file or pass --api-key.

pdf2md convert ./document.pdf
pdf2md convert ./document.epub -o ./output/document.md
pdf2md convert-dir ./documents -o ./markdown_output -w 4

Output images are written to <output_filename_stem>_images/ and linked from the Markdown file.

The repository includes example.md, generated from example.pdf.

License

ISC. See LICENSE.

Metadata

Release files for mistral-pdf-to-markdown 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mistral-pdf-to-markdown 1.2.1
File Size Uploaded Provenance
mistral_pdf_to_markdown-1.2.1.tar.gz 5.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mistral-pdf-to-markdown 1.2.1
File Interpreter ABI Platform
mistral_pdf_to_markdown-1.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 12.1 kB

Release files / mistral_pdf_to_markdown-1.2.1.tar.gz

Download URL mistral_pdf_to_markdown-1.2.1.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
fb1e18cb13469d8649a5c4dbacd599f178f6e4a8e5f24d2f6bc92d588a84b65c
BLAKE2b-256 checksum
How to use checksums
5708b14c51c20c595c1d9f600a964828c802416fd17c43bdaa5b65c88a9d9eb0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.27 {"installer":{"name":"uv","version":"0.11.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / mistral_pdf_to_markdown-1.2.1-py3-none-any.whl

Download URL mistral_pdf_to_markdown-1.2.1-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
50fdd8f32866fb8734c0eabc29781b26eaf2bc2abcded964c47a731e935d598f
BLAKE2b-256 checksum
How to use checksums
89c5301d6a341f3724a0714bf56fad44a5ab0e4f15693da274d5fad187024cc9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.27 {"installer":{"name":"uv","version":"0.11.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for mistral-pdf-to-markdown 1.2.1

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page