How do I edit PDF text?

Q:
I am trying to in place edit text in the PDF doc by using special
characters to recoginze what text needs to be replaced. Do you have
docs or samples on using the TextExtractor class to in place edit
text?
----
A:

You could use TextExtractor to extract words from the page and to
identify their location, however this class can't be used for in place
editing.

To edit PDF content you would need to use ElementReader and
ElementWriter (similar to ElementEdit sample project -
www.pdftron.com/net/samplecode.html#ElementEdit) and copy graphical
elements from one page to another. During the copy stage you could
modify element's graphics state or you could completely replace the
element with another element (e.g. replace a text element with an
image etc). As an example of this approach you may want to take a look
at the following Knowledge Base Article:
  http://groups.google.com/group/pdfnet-sdk/browse_thread/thread/74b709f5a426d348
  (or search for "How can I modify text color" in
http://groups.google.com/group/pdfnet-sdk).

Direct content editing of PDF text can be quite tricky (due to
different font and encoding issues). It is usually better idea to
completely replace text strings instead of trying to edit original
text data. Also, in most cases using PDF forms (www.pdftron.com/net/
samplecode.html#InteractiveForms; www.pdftron.com/net/usermanual.html#forms)
is a better and easier way to deal with variable text content.