Find a replace text in pdf

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v11)  /  Find a replace text in pdf

DynamicPDF CoreSuite for .NET (v11) Forum

 Apr 12 2021 11:43 AM
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();
 Apr 12 2021 1:00 PM
Posted by a ceTe Software moderator
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

All times are US Eastern Standard time. The time now is 9:26 AM.