将 Markdown 导出为 PDF,支持图片自动压缩。Python(reportlab + Pillow)渲染,支持 CJK。/ Export Markdown to PDF with auto image compression. Python (reportlab + Pillow) engine, CJK support.
一款 Obsidian 插件,将 Markdown 笔记导出为 PDF,支持图片自动压缩。
与其他依赖浏览器渲染的 PDF 导出插件不同,本插件使用 Python(reportlab + Pillow) 作为渲染引擎,支持精确控制图片质量、可靠的中文字体渲染,生成的 PDF 文件体积显著更小。
![[图片名.png]] 自动解析 支持reportlab 和 Pillow:pip3 install reportlab Pillow
| 项目 | 详情 |
|---|---|
| 操作系统 | macOS 15 (Sequoia) · Apple Silicon (M4) |
| Obsidian | 1.8+ |
| Python | 3.14.4(Homebrew,/opt/homebrew/bin/python3) |
| Node.js | 20.18.0 / 22.12.0(构建工具) |
| 字体 | 苹方 · 华文黑体 · 宋体(系统字体,自动注册) |
⚠️ 平台说明: 本插件仅在 macOS 环境下开发和测试。 未在 Windows 或 Linux 上进行验证,无法保证其他系统下的正确运行 (字体路径解析、Electron 对话框 API、Python 路径查找等在不同系统间存在差异)。 非 macOS 环境的 bug 反馈将被记录,但可能不会优先处理。
.obsidian/plugins/pdf-export-compress/ 目录导出 PDF(图片压缩)Python 脚本也可以脱离 Obsidian 独立运行:
python3 md_to_pdf.py \
--md /path/to/note.md \
--vault /path/to/vault \
--quality 60 \
--max-width 900 \
--out /path/to/output.pdf
An Obsidian plugin that exports Markdown notes to PDF with automatic image compression.
Unlike other PDF export plugins that rely on browser rendering (and often produce huge files), this plugin uses Python (reportlab + Pillow) as the rendering engine — giving you precise control over image quality, reliable CJK font support, and significantly smaller PDF files.
![[image.png]] automatically resolved supportedreportlab and Pillow installed:pip3 install reportlab Pillow
| Item | Detail |
|---|---|
| OS | macOS 15 (Sequoia) · Apple Silicon (M4) |
| Obsidian | 1.8+ |
| Python | 3.14.4 (Homebrew, /opt/homebrew/bin/python3) |
| Node.js | 20.18.0 / 22.12.0 (build tool) |
| Fonts | PingFang SC · STHeiti · Songti SC (system fonts, auto-registered) |
⚠️ Platform Notice: This plugin is developed and tested on macOS only. It has NOT been verified on Windows or Linux, and we cannot guarantee correct behavior on those platforms (font path resolution, Electron dialog APIs, and Python binary discovery differ across OSes). Bug reports from non-macOS environments will be noted but may not be actively addressed.
.obsidian/plugins/pdf-export-compress/ in your vaultExport to PDF (image compress)The Python script can also run standalone:
python3 md_to_pdf.py \
--md /path/to/note.md \
--vault /path/to/vault \
--quality 60 \
--max-width 900 \
--out /path/to/output.pdf
MIT © hunter00zb