Find a replace text in pdf

Find a replace text in pdf

Forum member · Apr 12, 2021
I have a simple requirement to find and replace text in pdf. I try with below code. Just add a label and try to modify the label. However the element collection seems to be empty. Any idea on this. Is there any better idea for FIND AND REPLACE TEXT in pdf? Please let me know. /*Add a label element*/ MergeDocument document = new MergeDocument(); Page page = new Page(PageSize.Letter, PageOrientation.Portrait); page.Elements.Add(new Label("Cover Page", 0, 0, 512, 12)); document.Pages.Add(page); document.Draw(@"Output.pdf"); /*Try to read modify the label element. However the elements collection is empty*/ MergeOptions options = new MergeOptions(false); MergeDocument document1 = new MergeDocument(@"Output.pdf", options); ceTe.DynamicPDF.Page page1 = document1.Pages[0]; var elements = page1.Elements; Console.ReadKey();

Re: Find a replace text in pdf

Support · Apr 12, 2021
Hello, DynamicPDF Core Suite for .NET allows you to fill and read the form fields in a PDF. Please refer to the documentation on form filling here and reading from field values here . DynamicPDF Core Suite for .NET does not support replacing text on a page. Thanks, ceTe Software Support Team