We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Attempting to find and replace text in PDF

All,

I realize this has been asked before, but the source code links are broken:

https://www.syncfusion.com/forums/34980/pdf-search-replace

I need to do the following:

1. Open a PDF.
2. Find/Replace a few text items
3. Save the PDF. 

Thanks,

Philip

3 Replies

SA Sabari Anand Senthamarai Kannan Syncfusion Team June 1, 2017 01:35 PM UTC

Hi Philip, 
  
Thank you for your update. 
  
At present, we do not support replacing a text in the PDF document using Syncfusion PDF library. However, we can find the texts in the PDF document using FindText() method. The sample provided in the forum is a workaround sample. But it has some drawbacks. We cannot retrieve the font name and the font color for the found text. While replacing the text, we cannot place the text in the exact bound of the text found(overlapping of the texts may occur). We will consider this as a feature in our product. Please let us know your requirements regarding the find and replace of the texts in the PDF document. This will be helpful for us to analyze further and assist you better. 
  
Regards, 
Sabari Anand 



PT Philip Tenn June 2, 2017 01:33 PM UTC

Sabari,

Could you *please* post the code from that forum thread you referenced?

If you try downloading the attachment from that thread, you will see it fails due to Access Denied.

Thanks,

Philip


SA Sabari Anand Senthamarai Kannan Syncfusion Team June 5, 2017 12:15 PM UTC

Hi Philip, 
  
Thank you for your update. 
  
As updated earlier, at present we do not have support for "Replacing a text in the PDF document using Syncfusion PDF library". The sample provided in the forum is for demonstrating ExtractText() and ExtractImages() features of the PDF library. Please refer the following UG documentation links for ExtractText() and ExtractImages() features. 
  
  
Please let us know if you need any further assistance. 
  
Regards, 
Sabari Anand 


Loader.
Live Chat Icon For mobile
Up arrow icon