0

I need to highlight some random text to my PDF file. My friend advised me to convert the PDF to a Word document and parse the doc and do the highlighting before converting back to PDF.

Is there any way to this highlighting of text?

Any 3rd party library that can be use to convert PDF to doc and vice versa. Thanks.

jomsk1e
  • 3,585
  • 7
  • 34
  • 59
  • possible duplicate so question http://stackoverflow.com/questions/8582706/highlighting-text-colors-of-existing-pdf-using-itextsharp-using-c-sharp – pmtamal Oct 23 '12 at 06:09
  • My problem is that, the word that I need to highlight can be anywhere in the PDF file. So getting the coordinate will be the problem, is there any 3rd party library that can convert PDF to doc? Thanks for your help pmtamal. :D – jomsk1e Oct 23 '12 at 06:14

2 Answers2

3

You can use Aspose dll 's which has option to convert pdf file to word and vice versa.

For highlighting of specific words you can use BytesCout.pdfextractor dll to find the location of the searched word.Once you have find the location of word you can easily highlight it.

2

Conversion of PDF to Word, especially if you want the resulting Word document to be easily editable, in general is not an easy task. I doubt you'll find that as free software.

Maybe you should instead look for a lib which can search PDFs and highlight text in it. It is possible in iTextSharp (free with AGPL) if you create a custom RenderListener which waits for the word you search. When it finds the word, mark it like this (thanks, pmtamal, for the link).

There of course are numerous other PDF libs which can do that, too, I'm merely predominantly using iText...

Community
  • 1
  • 1
mkl
  • 90,588
  • 15
  • 125
  • 265