How to edit page content (text) in a given selection rectangle?

Q:

the problem is that when i am selecting a text based on rectangular..

code is here...
string field1 = util.ReadTextFromRect(first_page, new Rect (85, 170,
503, 124), reader);
then i want to perform some fuctionality on this area...

e.g field1.remove();
filed1.replace(str1,str2);

but i m not able to do so...
----

A:
I guess you would like to replace a string from a given rectangle with
another string.
This can be done using PDFNet SDK but is not as simple. A good
starting point would be ElementEdit sample project (http://
www.pdftron.com/net/samplecode.html#ElementEdit).

So analogously to 'ReadTextFromRect' sample form TextExtract sample
you would copy Elements from one page to another. When you encounter
the element that intersects your selection rectangle you would not
copy the element but you would create a replacement element (e.g.
using ElementBuilder class; see http://www.pdftron.com/net/samplecode.html#ElementBuilder
for more info on how to use ElementBuilder) and would 'write' this
element instead.