How do I delete a line of text in a pdf document?

Q: we want to delete a line of text in a pdf document. Could you
please send us an example how to do?
A: A good starting point is ElementEdit sample project (http:// In this case all
images are deleted from a given PDF page, but the same approach can be
used to delete (i.e. skip during copy) text. You can use
element.GetBBox(ret) to determine if the text element is in the page
area that should be deleted.

Q: The information you have sent to me regarding the delete text from
a PDF file can not help me, because I must search PDF text, and then
the line (the complete line) must be deleted, because the line can
always be on another place. if you have an info I would be very
A: For text search within PDF you could use pdftron.PDF.TextExtractor.
As a starting point you may want to take a look at TextExtract sample
project (

Once you find the text you are looking for, use word.GetBBox() method
to obtain the bounding box for each word/character/line. You may want
to alter the rectangle (e.g. perfrom a union on serval rects or extend
its width accross the whole page, etc)

This rectangle information can be later used to selectively
'delete' (i.e. skip) text-run elements (during page copy - as show in
ElementEdit). So you would obtain a bounding-box for each element
(element.GetBBox(rect)) and compare it for intersection with the
'delete' rectangle.