0

I have a PDF that have some paragraphs of text and there is the string "Hello" in red over this text. I want to find a simple way to replace this text by an empty string or simply remove it, without hiding the paragraph under it.

Is there a simple and free solution in C# ?

The solutions found on other forums require a licence or are simply hiding the word with a white box, so the text behind is invisible.

Thanks

Thomas Jomphe
  • 117
  • 6
  • 17
  • 2
    **Pro tip** : How do we know what other forums say? we dont know what you have tried, at worst someone will give you an answer that does the same thing, so its pertinent to tell us what you have tried, ect – TheGeneral Feb 12 '20 at 06:03
  • I tried with the following libraries : iText7, iTextSharp, GroupDocs, PDFTron. – Thomas Jomphe Feb 12 '20 at 06:32
  • 1
    But what did you try with those libraries? And how exactly is that text drawn? – mkl Feb 12 '20 at 08:46
  • 1
    Depending on the exact way the text is drawn, you can find inspiration for iText based solutions in [this answer](https://stackoverflow.com/a/35915789/1729265) and [this one](https://stackoverflow.com/a/38663088/1729265). As you can read there, one needs a good criterion to recognize the text in question. In your case probably the red color? (Beware, though, there are many shades of red.) – mkl Feb 12 '20 at 10:29

0 Answers0