Text Find and Replace
This code example demonstrates how to replace specific text in any PDF document. This feature can be applied to both newly rendered and existing PDFs.
To replace text in a PDF document, you can utilize the replaceText
method. It requires three arguments: the old text to find, the new text to replace it with, and the page index where this replacement should take place. In this example, it substitutes ".NET6" with ".NET7" on the specified page.
Once the text replacement is completed, you can save the modified PDF document using the saveAs
method. For more information on how to manipulate and manage PDF files, visit the IronPDF Features Page.
Additionally, you can explore other powerful tools offered by Iron Software, such as IronOCR for OCR capabilities, IronBarcode for barcode generation and reading, or ironsoftware.com for a full list of products.