Introduction
"Permanently free, never expires, no ads, no popups, no privacy snooping."
This is Part 53 of the "One Open Source Project a Day" series. Today's project is PDF 补丁丁 (PDFPatcher, GitHub).
Need to edit PDF bookmarks, remove copy/print restrictions, merge/split documents, extract images, or turn image-based PDFs into searchable bookmarks? PDF 补丁丁 is a PDF toolbox built on the .NET Framework: supports bookmark editing, page crop/rotate, restriction removal, extract/merge documents, structure exploration, OCR, font replacement, and more. Licensed under AGPL + Conscience License, permanently free, no ads, no popups.
What You'll Learn
- PDFPatcher's core features and use cases
- Technical architecture: iText + MuPDF dual-engine
- Bookmark editor, document merge, OCR and other highlights
- Meaning of the Conscience License
- Comparison with similar PDF tools
Prerequisites
- Basic understanding of PDF documents
- Windows experience (tool is Windows-only)
Project Background
Project Overview
PDF 补丁丁 (PDFPatcher) is a PDF processing tool built with .NET Framework, using iText and MuPDF as core libraries. iText handles parsing, generation, modification, and font embedding; MuPDF handles PDF-to-bitmap rendering. Features cover editing, creation, split/merge, OCR, and structure analysis.
Author
- Author: wmjordan
- Repos: GitHub and Gitee
- Website: pdfpatcher.cnblogs.com
Project Data
- 📄 License: AGPL + Conscience License
- 📦 Version: v1.1.0
- 🌐 Documentation: GitHub README, User Manual .docx
- 💬 Community: GitHub Issues
Core Features
Main Capabilities
| Category | Features |
|---|---|
| Modify | Document properties, page numbers, links; unify page size; remove auto-open actions; remove copy/print restrictions; set reader initial mode; clean hidden junk; recompress B&W images; rotate pages |
| Bookmarks | Reading UI (vertical right-to-left); batch edit bookmark properties; precise bookmark positioning; find/replace (regex, XPath); auto-generate bookmarks |
| Create PDF | Merge PDFs or images; keep or add bookmarks; generate bookmarks from filenames; unify page size |
| Split/Merge | Split or merge PDFs, preserve or add bookmarks |
| Extract | High-speed lossless image export; pages to images; extract/delete pages; reorder pages |
| Advanced | Rename by metadata; OCR (Microsoft Office MODI); image PDF TOC to bookmarks; font replacement; embed fonts |
| Structure | Tree view of document structure; edit nodes; export to XML |
Use Cases
- Ebook organization: Merge scanned PDFs, generate bookmarks, unify page size
- Remove restrictions: Remove copy/print limits for easier reading and citation
- Batch processing: Rename by metadata, extract pages, batch export images
- Image PDF optimization: OCR TOC pages into clickable bookmarks
- Font embedding: Embed fonts to fix garbled text on Kindle and similar devices
Quick Start
Requirements:
- Windows 7 or later
- .NET Framework 4.0–4.8
- OCR requires Microsoft Office 2003/2007 Document Imaging (MODI)
Download:
Get the latest release from GitHub Releases, extract and run — no installer.
Build from source (optional):
- Visual Studio 2022 or newer
- ".NET desktop development" and "C++ desktop development" workloads
- Target .NET Framework 4.8
Conscience License
AGPL + Conscience License: The software is under AGPL with an extra condition — "if the software helps you, do one good deed after each use." Deeds can be small; intention matters. If you build commercial software from the source and earn revenue, donate at least 0.1% to those in need. Compliance is a matter of conscience.
Project Advantages
| Comparison | PDFPatcher | Commercial PDF Tools | Online PDF Tools |
|---|---|---|---|
| Cost | Permanently free | Subscription | Free/limited |
| Ads | None | None | Possible |
| Privacy | Local processing | Varies | Upload risk |
| Features | Edit, OCR, structure | Full-featured | Basic |
| Platform | Windows only | Multi-platform | Cross-platform |
Deep Dive
Technical Architecture
Core components:
- iText: .NET library for parsing, generating, modifying PDF, embedding TTF font subsets
- MuPDF: C library for PDF-to-bitmap rendering, called via P/Invoke (SharpMuPDF)
- JBig2: JBIG2 image encode/decode
Other components: ObjectListView, FreeImage, Cyotek ImageBox, TabControlExtra, HTMLRenderer, etc.
Source Structure
PDFPatcher/
├── App/ # Main application
│ ├── Common/ # Utilities
│ ├── Functions/ # UI and controls
│ ├── Lib/ # Third-party libs
│ ├── Model/ # Models
│ ├── Options/ # Options
│ └── Processor/ # PDF processing (incl. Mupdf P/Invoke)
├── JBig2/ # JBIG2 codec
├── doc/ # Documentation
└── 使用手册.docxFeature Highlights
Bookmark editor: Regex and XPath support, quick selection of chapter/section bookmarks, auto-generation of document bookmarks.
OCR: Uses Microsoft Office MODI (Document Imaging) to recognize text in images and convert image PDF TOC pages into clickable bookmarks.
Font replacement and embedding: Replace document fonts; embed fonts into PDF to fix garbled text on devices like Kindle.
Project Links and Resources
Official Resources
- 🌟 GitHub: https://github.com/wmjordan/PDFPatcher
- 🌐 Gitee: https://gitee.com/wmjordan/pdfpatcher
- 📚 Documentation: README, User Manual .docx
- 💬 Issues: GitHub Issues
Target Audience
- Ebook organization, scanned PDF handling
- Users needing to remove PDF restrictions
- Users needing batch merge, split, page extraction
- Users needing OCR and font embedding
- PDF format enthusiasts and developers
Visit my homepage for more useful knowledge and interesting products