kkbin505144 downloadsConvert handwritten PDFs to Markdown with LaTeX formulas using AI (OpenAI GPT or Alibaba Qwen).
Writing by hand aligns more naturally with the flow of thought than typing in my mind.
This tool converts handwritten notes to Markdown using AI, designed as a seamless Obsidian Plugin.

While studying control theory, I fell in love with the handwriting experience of the iFlytek Smart Notebook. However, organizing notes in Obsidian proved frustrating: the native OCR was terrible at recognizing mathematical formulas.
I developed this plugin to solve that problem. It leverages powerful Vision Language Models (Qwen-VL, GPT-5.4, and Gemini) to provide:
An all-in-one Obsidian plugin that converts handwritten PDFs to Markdown in a single click!
Key Features:
Method 1: Obsidian Plugin Marketplace (Recommended)
Method 2: Manual Installation
main.js and manifest.json from the latest GitHub Release<your-vault>/.obsidian/plugins/pdf-to-md/
├── main.js
└── manifest.json
Method 3: Build from Source
git clone https://github.com/kkbin505/pdf-to-md.git
cd pdf-to-md
npm install
npm run build
cp main.js manifest.json <your-vault>/.obsidian/plugins/pdf-to-md/
1️⃣ Configure Environment Variables
Important: pdf-to-md reads API keys from environment variables only. No API keys are stored on disk. This is more secure.
Get Your API Keys:
Set Environment Variables:
| Provider | Env Variable | Example |
|---|---|---|
| Alibaba Qwen | DASHSCOPE_API_KEY |
sk-xxx... |
| OpenAI | OPENAI_API_KEY |
sk-proj-xxx... |
| Google Gemini | GEMINI_API_KEY |
AIzaSyxxx... |
| Anthropic Claude | ANTHROPIC_API_KEY |
sk-ant-xxx... |
Mac/Linux:
# Edit ~/.bashrc or ~/.zshrc (Mac users use ~/.zprofile), add:
export DASHSCOPE_API_KEY='sk-xxx...'
export OPENAI_API_KEY='sk-proj-xxx...'
export GEMINI_API_KEY='AIzaSyxxx...'
export ANTHROPIC_API_KEY='sk-ant-xxx...'
# Save and reload:
source ~/.bashrc # or source ~/.zshrc
⚠️ Restart Obsidian after setting environment variables (complete restart required, not just reload).
2️⃣ Select AI Provider
Open Obsidian Settings → PDF to Markdown:
3️⃣ Convert PDF/image
.md file is auto-saved4️⃣ Convert images embedded in notes (new)
Right-click any image inside an open note → "Convert Image to Markdown". The recognized text and formulas are inserted directly below the image in the same note — no new file is created.



| Provider | Model | Input/Output | Quality | Cost/Page | Rating |
|---|---|---|---|---|---|
| Gemini 🏆 | gemini-2.5-flash | 638/552 | Excellent | $0 (Free) | ⭐⭐⭐⭐⭐ |
| Qwen | qwen-vl-plus | 2824/589 | Excellent | $0.00048 | ⭐⭐⭐⭐⭐ |
| Claude | claude-haiku-4-5-20251001 | 3156/629 | Excellent | $0.00315 | ⭐⭐⭐⭐ |
| OpenAI | gpt-5.4-mini | 5550/566 | Excellent | $0.00335 | ⭐⭐⭐⭐ |
| iFlytek | Spark | - | Poor | $0 (Free) | ⭐ |
| Qwen Local | qwen2.5vl:3b | 0 | ⭐⭐⭐⭐ |
| Priority | Recommended | Cost/Page | Reason |
|---|---|---|---|
| 1️⃣ First Choice | Gemini | $0 | free, excellent recognition, just manage quota |
| 2️⃣ China Users | Qwen | $0.00048 | Cheapest paid option, stable quality, fast |
| 3️⃣ Cost Conscious | OpenAI | $0.00335 | Most tokens but lowest unit price, competitive cost |
| ❌ Not Recommended | iFlytek | $0 | Free but poor formula recognition, text-only |
| Option | Default | Description |
|---|---|---|
| Model | Qwen VL Max | Select the AI model from the unified list |
| API Key Status | Auto-detect | Shows environment variable status (read-only) |
| PDF Rendering DPI | 200 | Higher DPI = better quality but slower (100-400) |
| API Timeout | 60s | Maximum wait time for API response |
| Max Retries | 3 | Number of retry attempts on failure |
| File Conflict Handling | Model-based naming | How to handle existing output files |
File Conflict Strategies:
my_notes_qwen.md)See actual output from different models:
Issues and Pull Requests are welcome!
MIT License
Enjoy pdf-to-md! If you find it helpful, please consider giving it a Star ⭐ on GitHub!