Doc Reader - VSCode 文档图片预览器
VSCode 文档阅读器插件 | VSCode Document & Image Reader Extension
一款功能强大的 VSCode 文档与图片预览插件(当前版本:0.0.6),在独立面板中浏览 PDF、DOCX、Markdown、TXT、图片等文件,不替换默认编辑器。支持目录导航、全文搜索、缩放旋转、阅读状态自动恢复。离线可用的本地文件阅读器。
A powerful VSCode document and image preview extension (current version: 0.0.6) that opens PDF, DOCX, Markdown, TXT, images in a dedicated panel without replacing the default editor. Supports TOC navigation, full-text search, zoom/rotate, and reading state restore. Fully offline-capable local file reader.
核心功能 / Key Features: PDF Viewer · DOCX Viewer · Markdown Preview · Image Viewer · Text Preview · Full Text Search · Offline Reader · 文档预览 · 图片预览 · PDF 阅读 · DOCX 阅读 · Markdown 预览 · 全文搜索 · 离线阅读
功能概览 / Features
- 仅支持本地文件(不限制在当前工作区内)
Local files only (offline-first, not limited to the current workspace).
- 支持格式:
md, markdown, txt, log, json, yaml, yml, pdf, docx, png, jpg, jpeg, gif, webp, svg, bmp, ico
Supported formats: md, markdown, txt, log, json, yaml, yml, pdf, docx, png, jpg, jpeg, gif, webp, svg, bmp, ico.
- 独立阅读面板,不替换 VSCode 默认编辑器
Uses a dedicated reader panel without replacing the default VSCode editor.
- Markdown:目录(TOC)+ 文内搜索
Markdown: table of contents + in-document search.
- 文本类:文内搜索、字号缩放
Text-like files: in-document search and font zoom.
- 文本/Markdown:支持进入编辑态,左侧显示行号,
Cmd/Ctrl + S 保存
Text/Markdown: supports edit mode with line numbers on the left, save via Cmd/Ctrl + S.
- PDF:平滑滚动、页码切换、缩放、搜索定位(启用文本层时)
PDF: smooth scrolling, page navigation, zoom, and search locate (when text layer is enabled).
- DOCX:分页渲染、页码切换、缩放
DOCX: paged rendering, page navigation, and zoom.
- 图片:缩放、100%复位、左/右旋转90°、适应窗口、适应宽度、滚动浏览、状态恢复
Images: zoom, reset to 100%, rotate left/right by 90°, fit window, fit width, scrolling, and state restore.
- 图片模式下隐藏搜索框与“上一个/下一个”按钮
In image mode, search input and previous/next buttons are hidden.
- 最近文件:支持打开、重命名、移除、清空、显示/隐藏列表
Recent files: open, rename, remove, clear, and show/hide list.
- 文件操作:支持在阅读面板内重命名当前文件、在 Finder/文件管理器中定位文件
File actions: supports renaming the current file in reader panel and revealing files in Finder/File Explorer.
- 操作项:支持"赞赏作者",点击显示赞赏二维码和 Email
Action item: supports "Support Author", click to show donation QR code and email.
- 界面语言:跟随系统 / English / 简体中文
UI language: Follow System / English / 简体中文.
为什么选择 Doc Reader / Why Doc Reader
- 独立阅读面板,不影响默认编辑器
Dedicated reader panel without disrupting the default editor.
- 离线可用,无需网络
Fully offline-capable with no network dependency.
- 阅读状态自动恢复
Automatically restores reading state.
- 支持 PDF 文本层搜索
Supports PDF text-layer search.
- 中英文界面
Built-in Chinese and English UI.
命令面板 / Commands
文档&图片阅读器:打开当前文件 / Document & Image Reader: Open Current File
文档&图片阅读器:打开文件 / Document & Image Reader: Open File
文档&图片阅读器:打开最近文件 / Document & Image Reader: Open Recent
文档&图片阅读器:切换主题 / Document & Image Reader: Toggle Theme
文档&图片阅读器:选择主题 / Document & Image Reader: Choose Theme
文档&图片阅读器:选择语言 / Document & Image Reader: Choose Language
文档&图片阅读器:赞赏作者 / Document & Image Reader: Support Author
- 清空最近文件 / Clear Recent Files
- 显示最近文件列表 / Show Recent Files List
- 隐藏最近文件列表 / Hide Recent Files List
- 重命名最近文件 / Rename Recent File
- 在 Finder/文件管理器中显示 / Reveal in Finder/File Explorer
配置项 / Settings
| 配置项 / Setting |
说明 / Description |
默认值 / Default |
docReader.showActivityBarIcon |
在活动栏显示图标 / Show icon in Activity Bar |
true |
docReader.fontSize |
字体大小 / Font size |
14 |
docReader.lineHeight |
行高 / Line height |
1.6 |
docReader.theme |
主题模式 (auto/light/dark) / Theme mode |
auto |
docReader.locale |
界面语言 (auto/en/zh-cn/zh-tw) / UI language |
auto |
docReader.showRecentList |
显示最近文件列表 / Show recent files list |
true |
docReader.recentLimit |
最近文件数量上限 / Recent files limit |
20 |
docReader.pdf.enableTextLayer |
启用 PDF 文本层搜索 / Enable PDF text search |
true |
docReader.docx.breakPages |
DOCX 分页渲染 / DOCX page breaks |
true |
快速上手(30秒)/ Quick Start (30s)
- 在 VSCode 安装并启用插件。
Install and enable the extension in VSCode.
- 打开命令面板(
Cmd/Ctrl + Shift + P),执行 文档&图片阅读器:打开文件。
Open Command Palette (Cmd/Ctrl + Shift + P) and run Document & Image Reader: Open File.
- 选择一个支持的文件(如
.md、.pdf、.docx、.png),进入独立阅读面板。
Pick a supported file (for example .md, .pdf, .docx, .png) to open in the dedicated reader panel.
- 按文件类型使用工具栏能力:
Use toolbar actions by file type:
- 文本/Markdown:搜索、字号调整、编辑、行号显示、保存
Text/Markdown: search, font zoom, edit mode, line numbers, save
- PDF/DOCX:分页导航、缩放
PDF/DOCX: page navigation, zoom
- 图片:缩放、旋转、适应窗口/宽度
Image: zoom, rotate, fit window/width
- 在“最近文件”视图中可快速重开、清空、显示/隐藏列表。
Use the Recent Files view to reopen quickly, clear, or show/hide the list.
常见问题 / FAQ
Q: 为什么有些文件无法打开?
Q: Why can't some files be opened?
A: 仅支持本地文件,且必须是支持的后缀格式。
A: Only local files are supported, and the file extension must be in the supported list.
Q: 图片预览时为什么没有搜索框和上一个/下一个按钮?
Q: Why are search box and previous/next buttons missing in image preview?
A: 图片模式不支持文本搜索,相关控件会自动隐藏。
A: Text search is not available in image mode, so related controls are hidden.
Q: PDF 搜索无结果怎么办?
Q: What if PDF search returns no results?
A: 请在设置中启用 docReader.pdf.enableTextLayer 后重试。
A: Enable docReader.pdf.enableTextLayer in settings and try again.
Q: 如何恢复到上次阅读位置?
Q: How to restore my last reading position?
A: 插件会自动记录阅读状态,重新打开同一文件时自动恢复。
A: The extension stores reading state automatically and restores it when the same file is reopened.
Q: 如何编辑并保存文本/Markdown 文件?
Q: How to edit and save text/markdown files?
A: 点击阅读面板右上角编辑按钮进入编辑态,左侧会显示行号,按 Cmd/Ctrl + S 保存。
A: Click the edit button in the reader panel to enter edit mode, line numbers appear on the left, then press Cmd/Ctrl + S to save.
赞赏作者 / Support Author
如果这款插件对您有帮助,欢迎赞赏支持!
If this extension helps you, welcome to support!
- 邮箱 / Email:
dijiuxiaoshi@foxmail.com
开发 / Development
npm install
npm run compile
npm test
简体中文搜索关键词: VSCode PDF 阅读器 | VSCode DOCX 查看器 | VSCode Markdown 预览插件 | VSCode 图片查看器 | VSCode 文档阅读器 | VSCode 本地文件预览 | VSCode 离线阅读器 | VSCode 全文搜索插件
繁體中文搜尋關鍵詞: VSCode PDF 閱讀器 | VSCode DOCX 檢視器 | VSCode Markdown 預覽插件 | VSCode 圖片檢視器 | VSCode 文件閱讀器 | VSCode 本地文件預覽 | VSCode 離線閱讀器 | VSCode 全文搜尋插件
English Search Keywords: VSCode PDF Viewer | VSCode DOCX Viewer | VSCode Markdown Preview Extension | VSCode Image Viewer | VSCode Document Reader | VSCode Local File Preview | VSCode Offline Reader | VSCode Full Text Search
最后更新 / 最後更新 / Last Updated: 2026-04-08
| |