简体   繁体   中英

C# Converting PDF file to Word doc and vice versa

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.

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.

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...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM