Wordize provides C# developers with powerful high-level tools for programmatic modification of PDF documents. By integrating search and replace capabilities into their .NET projects, developers can create robust solutions for comprehensive PDF document updates.
Our interactive online demo with C# code examples helps you explore the possibilities of programmatic text search and replacement in PDF documents. To try it, upload any PDF file, specify the required search/replace strings, click the process button, and then download the modified PDF file for verification.
using Wordize.Replacing;
Replacer.Replace("Input.pdf", "Output.pdf", "Text or RegEx", "Text or RegEx");
using Wordize.Replacing;
Replacer.Replace("Input.pdf", "Output.pdf", "Text or RegEx", "Text or RegEx");
using Wordize.Replacing;
using Wordize.Saving;
var imageStreams = Replacer.ReplaceToImages("Input.pdf",
new ImageSaveOptions(SaveFormat.Pdf), "Text or RegEx", "Text or RegEx");
foreach (var (stream, page) in imageStreams.Select((s, i) => (s, i)))
{
using var _ = stream;
stream.Position = 0;
using var file = File.Create($"Output_{page + 1}.pdf");
stream.CopyTo(file);
}
using Wordize.Replacing;
FindReplaceOptions options = new FindReplaceOptions() { UseSubstitutions = true };
Replacer.Replace("Input.pdf", "Output.pdf", new Regex(@"Text or RegEx"), "Text or RegEx", options);
using Wordize.Replacing;
FindReplaceOptions options = new FindReplaceOptions() { UseSubstitutions = true };
Replacer.Replace("Input.pdf", "Output.pdf", new Regex(@"Text or RegEx"), "Text or RegEx", options);
using Wordize.Replacing;
using Wordize.Saving;
FindReplaceOptions options = new FindReplaceOptions() { UseSubstitutions = true };
var imageStreams = Replacer.ReplaceToImages("Input.pdf",
new ImageSaveOptions(SaveFormat.Pdf), new Regex(@"Text or RegEx"), "Text or RegEx", options);
foreach (var (stream, page) in imageStreams.Select((s, i) => (s, i)))
{
using var _ = stream;
stream.Position = 0;
using var file = File.Create($"Output_{page + 1}.pdf");
stream.CopyTo(file);
}