Skip to main content
Boris56
Known Participant
January 22, 2020
Question

How to replace one text with another?

  • January 22, 2020
  • 1 reply
  • 465 views

Hi,

I need to replace one text with another. Using the PDWordFinderAcquireWordList method, I get the text of each page of the document. Then I find the text I need in the text of the page and determine which characters in which words of the document I need to replace.
To replace characters in a document, you need to get the context of the desired page. I do this using the PDEContent operator pdeContent = PDPageAcquirePDEContent (pdPage, gExtensionID);
As I understand it, to replace the text you need to remove the elements of the pdeContent object and insert your elements. I need to find out which elements contain the characters that I need to replace, delete these elements and insert a new element. I do not know how to find these elements.
Perhaps there is another way to replace one text with another.
I would be grateful for any help.

This topic has been closed for replies.

1 reply

Boris56
Boris56Author
Known Participant
January 22, 2020

And one more question. Is it possible somehow to change the text of a text element from a PDEContent object?