English
A web-based utility to visually compare two PDF files and highlight their differences.
| Side-by-Side Comparison | Difference List |
![]() |
![]() |
- Backend: Python 3.8+, FastAPI, PyMuPDF
- Frontend: Node.js v18.x, React, TypeScript, pdf.js
Follow these steps to run the project locally.
git clone https://github.com/Wilsonoonn/pdf-diff.git
cd pdf-diffNavigate to the backend directory, create a virtual environment, and install dependencies.
cd pdf-diff-backend
# Create and activate a virtual environment (recommended)
# On macOS/Linux:
python3 -m venv venv
source venv/bin/activate
# On Windows:
# python -m venv venv
# .\venv\Scripts\activate
pip install -r requirements.txtStart the backend server.
# The server will run on http://127.0.0.1:8000
uvicorn main:app --reloadIn a new terminal, navigate to the frontend directory and install dependencies.
cd pdf-diff-frontend
npm installStart the frontend development server.
# The application will be available at http://localhost:3000
npm startOpen your browser and go to http://localhost:3000. Upload two PDF files to see the comparison.
简体中文
一个在线的PDF文件对比工具,可以可视化地比较两个PDF文件的差异并高亮显示。
| 并排对比视图 | 差异列表 |
![]() |
![]() |
- 后端: Python 3.8+, FastAPI, PyMuPDF
- 前端: Node.js v18.x, React, TypeScript, pdf.js
按照以下步骤在本地运行此项目。
git clone https://github.com/Wilsonoonn/pdf-diff.git
cd pdf-diff进入后端目录,创建并激活虚拟环境,然后安装依赖。
cd pdf-diff-backend
# 创建并激活虚拟环境 (推荐)
# macOS/Linux:
python3 -m venv venv
source venv/bin/activate
# Windows:
# python -m venv venv
# .\venv\Scripts\activate
pip install -r requirements.txt启动后端开发服务器。
# 服务器将运行在 http://127.0.0.1:8000
uvicorn main:app --reload在 新的终端窗口 中,进入前端目录并安装依赖。
cd pdf-diff-frontend
npm install启动前端开发服务器。
# 应用将运行在 http://localhost:3000
npm start打开浏览器并访问 http://localhost:3000。上传两个PDF文件即可查看对比结果。

