- 🖱 Add PDF / image files by drag-and-drop or click
- 🔀 Reorder files with up / down buttons
- 🔗 Merge everything into a single PDF
- 🖼 Supports PDF, PNG, JPG, JPEG, BMP, TIFF, GIF, WEBP
- 📏 Estimates output size and total pages before merging
- 🪶 Lossless PDF page copy — output size ≈ sum of inputs (no rasterization bloat)
- 🖍 Keeps the visual "proof stamp" of digital signatures (baked into page content, while the signature validation itself is dropped)
⚠️ Please use Python 3.12 (or 3.10/3.11). Python 3.13/3.14 bundles Tcl/Tk 9.x, which is incompatible with thetkinterdnd2drag-and-drop extension and causesthis extension is compiled for Tcl 8.x.
- Windows
- Python 3.12
python -m venv venv
venv\Scripts\python -m pip install -r requirements.txtvenv\Scripts\python pdf_merger_gui.pyvenv\Scripts\python build_exe.pyOutput: dist\PDF合并工具.exe
To regenerate the icon:
venv\Scripts\python make_icon.pypdf_parser/
├── pdf_merger_gui.py # GUI (entry point)
├── pdf_processor.py # Core processing logic
├── build_exe.py # PyInstaller build script
├── make_icon.py # Generate icon.ico
├── requirements.txt # Dependencies
└── icon.ico # App icon
- PDF merging:
bake()flattens annotations / form fields (including the visual stamp of digital signatures) into page content, theninsert_pdf()copies pages losslessly — text stays vector, so file size does not bloat. - Image merging: image pages are embedded with JPEG compression (quality adjustable, default 90); transparent images get a white background.
- The legacy rasterization implementation (
pdf_to_images/images_to_pdf/merge_files_to_images) is kept only for backward compatibility and is no longer used.
一个基于 Python + Tkinter 的桌面小工具:拖入多个 PDF / 图片文件,自由排序后合并为单个 PDF。
A desktop tool based on Python + Tkinter: drag in multiple PDF / image files, reorder them, and merge them into a single PDF.
作者 / Author: BlueEve
- 🖱 拖拽或点击添加 PDF / 图片文件
- 🔀 支持上移 / 下移自由排序
- 🔗 一键合并为单个 PDF
- 🖼 支持 PDF、PNG、JPG、JPEG、BMP、TIFF、GIF、WEBP
- 📏 合并前预估输出大小与总页数
- 🪶 PDF 页面无损复制,输出体积 ≈ 输入文件之和(不再栅格化膨胀)
- 🖍 保留数字签名的「证明章」外观(拍扁进页面内容,丢弃签名校验本身)
⚠️ 请使用 Python 3.12(或更早的 3.10/3.11)。 Python 3.13/3.14 自带的 Tcl/Tk 为 9.x,与tkinterdnd2拖拽扩展不兼容,会导致this extension is compiled for Tcl 8.x报错。
- Windows
- Python 3.12
python -m venv venv
venv\Scripts\python -m pip install -r requirements.txtvenv\Scripts\python pdf_merger_gui.pyvenv\Scripts\python build_exe.py产物:dist\PDF合并工具.exe
如需重新生成图标:
venv\Scripts\python make_icon.pypdf_parser/
├── pdf_merger_gui.py # GUI 界面(入口)
├── pdf_processor.py # 核心处理逻辑
├── build_exe.py # PyInstaller 打包脚本
├── make_icon.py # 生成 exe 图标 icon.ico
├── requirements.txt # 依赖
└── icon.ico # 应用图标
- PDF 合并:先
bake()把注释/表单(含数字签名章外观)烘焙为页面内容,再insert_pdf()无损复制页面 —— 文本仍是矢量,体积不膨胀。 - 图片合并:图片页使用 JPEG 压缩嵌入(质量可调,默认 90),透明图自动铺白底。
- 旧版「栅格化」实现(
pdf_to_images/images_to_pdf/merge_files_to_images) 仅作兼容保留,不再使用。