Find and replace text in PDF files programmatically with C#. Direct content stream editing — no conversion to DOCX, no external dependencies, no data loss.
dotnet add package Exis.PdfEditor
Most .NET PDF libraries — IronPDF, Spire.PDF, Aspose, Syncfusion — replace text by converting the PDF to an intermediate format, redacting text and drawing new text on top, or rebuilding pages from scratch.
This approach breaks:
Exis.PdfEditor parses PDF content streams directly at the byte level. It locates text in the actual PDF operators, modifies only the targeted string operands, and writes back using PDF incremental update.
Everything not touched stays byte-for-byte identical:
using Exis.PdfEditor;
using Exis.PdfEditor.Licensing;
ExisLicense.Initialize(); // Free 14-day trial — no key needed
var result = PdfFindReplace.Execute(
"contract.pdf",
"contract-updated.pdf",
"Acme Corporation",
"Globex Industries");
Console.WriteLine($"Replaced {result.TotalReplacements} occurrences " +
$"across {result.PagesModified} pages.");
var pairs = new[]
{
new FindReplacePair("2025", "2026"),
new FindReplacePair("Draft", "Final"),
new FindReplacePair("CONFIDENTIAL", "PUBLIC"),
};
var result = PdfFindReplace.Execute(
"report.pdf",
"report-final.pdf",
pairs);
var options = new PdfFindReplaceOptions { UseRegex = true };
// Replace all US phone numbers with a placeholder
var result = PdfFindReplace.Execute(
"document.pdf",
"redacted.pdf",
@"\(\d{3}\)\s?\d{3}-\d{4}",
"[PHONE REDACTED]",
options);
// Purchase at officefindreplace.com/Home/pdf-find-replace-csharp — $499/developer/year
ExisLicense.Initialize("XXXX-XXXX-XXXX-XXXX");
// Unlimited pages, no restrictions, no console messages
var result = PdfFindReplace.Execute("large-doc.pdf", "output.pdf", "old", "new");
| Feature | Exis.PdfEditor | IronPDF | Spire.PDF | Aspose.PDF | Syncfusion |
|---|---|---|---|---|---|
| Direct content stream editing | ✓ | ✗ Renders HTML | ✗ Redaction overlay | ✗ Fragment replace | ✗ Redaction overlay |
| Preserves form fields | ✓ | ✗ | Partial | Partial | ✗ |
| Preserves digital signatures | ✓ Unmodified pages | ✗ | ✗ | ✗ | ✗ |
| Preserves text spacing/kerning | ✓ | ✗ | ✗ | Partial | ✗ |
| Zero native dependencies | ✓ Pure .NET | ✗ Chromium engine | ✓ | ✓ | ✓ |
| DLL size | < 500 KB | ~250 MB | ~20 MB | ~40 MB | ~15 MB |
| Batch multi-pair replacement | ✓ Single pass | Manual loop | Manual loop | Manual loop | Manual loop |
| .NET Framework 4.8 | ✓ | ✓ | ✓ | ✓ | ✗ .NET 6+ only |
| Cross-platform | ✓ | ✓ | ✓ | ✓ | ✓ |
| Regex support | ✓ | ✓ | ✓ | ✓ | ✓ |
| Price (per developer/year) | $499 | $749 | $999 | $1,175 | $995* |
| Company HQ | 🇺🇸 USA | 🇺🇸 USA | 🇨🇳 China | 🇦🇺 Australia | 🇺🇸 USA |
Comparison based on publicly available documentation as of February 2026. Feature support may vary by version.
"Direct content stream editing" means the library modifies PDF text operators in-place without converting, re-rendering, or overlaying.
Modifies content stream operators. No intermediate conversion.
No Ghostscript, no LibreOffice, no Chromium. Pure managed .NET.
Forms, signatures, annotations, bookmarks — all preserved.
.NET 8+, .NET Framework 4.8, and .NET Standard 2.0.
Multiple find/replace pairs executed in a single pass.
Full .NET regex support for pattern-based replacements.
Windows, Linux, macOS. Anywhere .NET runs.
Single DLL, under 500 KB. No native binaries to deploy.
Install the NuGet package and call ExisLicense.Initialize() — full functionality for 14 days. After trial, evaluation mode processes up to 3 pages per document. No watermarks. When ready, purchase a license key at officefindreplace.com/Home/pdf-find-replace-csharp.
Prices in US dollars. One key per developer. Works on dev machine, build server, and production — no per-machine or per-deployment limits.
Your code does not change between trial and licensed mode. Just add your key when ready.
dotnet add package Exis.PdfEditor
Questions? Email support@exisone.com — you will hear from a developer, not a bot.