Make Cursor read PDFs

Native PDF support depends on the tools available to your agent. Use this CLI when OCR or reusable Markdown helps your workflow. Conversion sends the document to an external service; follow your document-processing permissions.

terminal
$ npx pdftomarkdown@0.1.6 document.pdf

No install, no signup — works immediately with Node 18+.

One-off: just tell the agent

Mention the command once in your prompt and the agent takes it from there:

prompt
> run npx pdftomarkdown on spec.pdf and implement the endpoints it describes

Permanent: add a project rule

Save this as .cursor/rules/read-pdfs.mdc and Cursor handles PDFs in every session (a plain .cursorrules entry works too):

.cursor/rules/read-pdfs.mdc
---
description: Convert PDFs when Markdown is useful
alwaysApply: true
---

## Reading PDFs

Native PDF support depends on the tools available in this session.
Use conversion when OCR or reusable Markdown helps the task. Documents
are sent to an external service; follow the user's processing permissions.
Use the published CLI with Node 18+:

    npx pdftomarkdown@0.1.6 document.pdf

Read successful output in sections for long documents. The demo converts
page 1 only. A new account gets 20 trial pages once; further pages use paid
credits. Never purchase credits without explicit user authorization.
Allow up to 11 minutes to wait; stopping the client may leave processing
and charging running. Follow https://pdftomarkdown.dev/docs/cli/ for version-specific recovery.

Free API key for full documents

Without a key, the demo tier converts page 1 of any PDF — enough to try it. A free Developer key (20 trial pages once for new accounts, full multi-page, no watermark) is available with GitHub login:

Get a free API key with GitHub →

shell profile
export PDFTOMARKDOWN_API_KEY=your_key_here

The CLI picks the key up automatically from the environment.