Skip to main content

rgPDF

繁體中文 · English

rgPDF 是一套跨平台桌面工具,可使用純文字或規則表達式搜尋具有文字層的 PDF 與 Word 文件。每筆命中會在找到時立即顯示,並可在非同步頁面預覽中查看精確且可自訂顏色的螢光筆標示。

名稱中的 rg 是向文字搜尋工具 ripgrep 致敬。

功能

  • 可選擇搜尋 PDF、Word 文件(.doc、.docx)或兩者,並可選擇是否包含子資料夾。
  • 支援純文字、規則表達式及區分大小寫。
  • 支援跨行、跨頁匹配與行尾英文斷字合併。
  • 每找到一筆結果就立即顯示,搜尋期間介面仍可操作。
  • 檔案、命中段落與 PDF 頁面預覽三個連動區域。
  • 逐字元反白座標與可自訂的螢光筆顏色。
  • 繁體中文/英文介面,以及系統/淺色/深色主題。
  • 保存搜尋與外觀偏好。

rgPDF 只搜尋 PDF 已有的文字層。搜尋 Word 文件需要 Microsoft Word(Windows)或 LibreOffice;文件會先轉成快取 PDF,再搜尋文字並提供頁面預覽。rgPDF 不會執行文件巨集、不執行 OCR,也不修改來源檔案。

搜尋類型包含 Word 時,選定資料夾就會開始背景轉檔。變更主檔名篩選、檔案類型或子資料夾設定,會補入新符合的文件並移除尚未開始的排程;已在轉換的文件可完成並保留快取。搜尋與轉檔獨立進行,只有輪到尚未轉好的檔案時才等待,狀態列會顯示目前處理的檔名。取消搜尋不會中止背景準備;關閉程式才會停止背景工作。

使用方式

按「瀏覽」選取資料夾,輸入文字或規則表達式後按「搜尋」。選取檔案及命中段落即可查看頁面與螢光標示。

「文件資料夾」下方的「主檔名篩選」可限制要搜尋的檔案,留空時不篩選。點擊輸入欄位左側的說明圖示,可查看語法說明與範例。此欄位比對不含最後一個副檔名的完整主檔名,不區分大小寫;支援 *(任意字串)、?(單一字元)、[abc]、[0-9] 與 [!abc]。例如 ch0* 會包含 ch01.pdf、ch02.docx,排除 ch1.pdf、ch2.docx;ch01 則只比對完全相同的主檔名。篩選會在讀取 PDF 或轉換 Word 前執行,並搭配檔案類型與子資料夾設定;此欄位會保存至下次啟動,不受文字搜尋的 Regex 與區分大小寫設定影響。

預覽窗格的「上一頁/下一頁」會逐頁瀏覽整份文件,包含未命中頁;選取命中項目窗格中的其他段落即可跳至其命中頁面。「符合頁面」會依預覽區域的寬度與高度完整顯示整頁,並隨窗格大小調整;「符合寬度」則可用較大尺寸閱讀。

下表依工具列由左至右排列;滑鼠停留可查看目前設定,三態按鈕每按一次切換一個狀態。

工具列圖示 功能 操作說明
父子資料夾 包含子資料夾 切換是否遞迴搜尋子資料夾。
PDF Word PDF 與 Word 搜尋檔案類型 循環切換 PDF → Word(DOC/DOCX)→ 兩者。搜尋 Word 需已有 Windows Microsoft Word 或 LibreOffice。
Aa 區分大小寫 切換搜尋時是否區分大小寫。
規則表達式 規則表達式 切換 Regex;搜尋欄旁的說明圖示提供語法範例。
螢光筆 螢光筆顏色 選取預設色或自訂顏色。
垃圾桶 清除 Word 快取 確認後刪除轉換產生的 PDF,保留原始 Word 文件;搜尋或背景準備期間停用。
系統語言 中文 英文 語言 循環切換跟隨系統 → 繁體中文 → English。
系統配色 淺色 深色 配色 循環切換跟隨系統 → 淺色 → 深色。
資訊 關於 查看版本、授權與原始碼連結。

將滑鼠停留在圖示上即可查看功能說明。搜尋、顏色設定與預覽按鈕如下:

圖示 Tooltip/功能
瀏覽… 瀏覽…
搜尋 搜尋
取消 取消
搜尋樣式說明 搜尋樣式說明
自訂顏色… 自訂顏色…
上一頁 上一頁
下一頁 下一頁
縮小 縮小
放大 放大
符合寬度 符合寬度
符合頁面 符合頁面

搜尋設定會保存至下次啟動。啟動時會刪除 30 天未使用的轉換快取,若總量仍超過 500 MB,優先刪除最久未使用的項目。搜尋期間可按「取消」停止。

安裝最新版本

Windows 免安裝版

從 最新 GitHub Release下載有版本編號的 rgpdf-*-windows-x86_64.exe 與對應 .sha256 檔。執行檔目前未簽章,因此 Windows SmartScreen 可能顯示未知發布者警告;選擇執行前,請先確認 SHA-256 與發布頁提供的值相同。

免安裝版不需要 Python 或 uv。搜尋 PDF 不需其他軟體;搜尋 Word 則需要 Windows 上既有的 Microsoft Word,或已安裝 LibreOffice。

macOS App(Apple Silicon)

從最新 GitHub Release下載有版本編號的 rgpdf-*-macos-arm64.dmg 與對應 .sha256 檔。先核對下載檔:

shasum -a 256 rgpdf-*-macos-arm64.dmg

確認輸出與 .sha256 檔相同後,開啟 DMG,將 rgpdf.app 拖曳至 Applications。這個版本適用 Apple Silicon(M 系列)Mac,不需要安裝 Python 或 uv。

App 只有 ad-hoc 簽章且未經 Apple 公證。若 macOS 阻擋首次啟動,請在 Finder 的 Applications 中按住 Control 點按 rgpdf、選擇「打開」,再於確認視窗選擇「打開」。

使用 uv 安裝

先安裝 uv,再從 PyPI 安裝最新發布版本:

uv tool install rgpdf

執行程式:

rgpdf

更新已安裝的版本:

uv tool upgrade rgpdf

支援 Windows 與 macOS,所需 Python 環境由 uv 管理。

若要直接從 GitHub 安裝最新原始碼發布版本,請使用會移動的 latest 標籤:

uv tool install "git+https://github.com/codemee/rgpdf.git@latest"

開發

git clone https://github.com/codemee/rgpdf.git
cd rgpdf
uv sync
uv run pytest
uv run rgpdf

工具列圖示修改後,使用 uv run python scripts/generate_toolbar_icons.py 更新 README 圖片。

架構、匹配語意、並行處理與發布方式請參閱技術細節,版本歷程請參閱變更紀錄。

發布版本

GitHub Releases 提供 Windows 執行檔、macOS App、SHA-256 檢查碼與對應原始碼;Python 套件可從 PyPI 安裝。latest Git 標籤指向最新發布版本的原始碼。

發布流程與維護說明請參閱技術細節。

授權

rgPDF 依 GNU Affero General Public License version 3 授權。你可以依該授權條款使用、研究、修改及重新散布本程式;散布執行檔時,必須同時提供該版本的完整對應原始碼。

本程式依 AGPLv3 使用 PyMuPDF/MuPDF,並依 LGPLv3 使用 PySide6/Qt。詳見第三方授權聲明與發布授權檢查清單。

Metadata

Release files for rgpdf 0.0.12

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

Source distribution (sdist)

Source distribution for rgpdf 0.0.12
File Size Uploaded Provenance Actions
rgpdf-0.0.12.tar.gz 141.4 kB With provenance Details for rgpdf-0.0.12.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rgpdf 0.0.12
File Interpreter ABI Platform Actions
rgpdf-0.0.12-py3-none-any.whl Python 3 none any Details for rgpdf-0.0.12-py3-none-any.whl

Total release size: 196.1 kB

Release files / rgpdf-0.0.12.tar.gz

Download URL rgpdf-0.0.12.tar.gz
Size 141.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6cf266f633837b82f247e228fbc238ec778b5ce21523c6c843a3a38100b4aab6
BLAKE2b-256 checksum
How to use checksums
0c6bee8d96f2de9cd8f1312194d7e8e7044566df43581876d4daff201c38dace
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / rgpdf-0.0.12-py3-none-any.whl

Download URL rgpdf-0.0.12-py3-none-any.whl
Size 54.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0068eb641d92eacb03d88a3381f1ab04a1a811208cae583e7b4d8c61eeed2f0e
BLAKE2b-256 checksum
How to use checksums
fee41c5f6db94b5b6cb34d1a9eda571c716672689bd53f42bccdd07a1f7a3181
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Security for rgpdf 0.0.12

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for rgpdf-0.0.12.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

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