PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

How to click on a word in the pdf and return a word
https://forum.pdfsharp.net/viewtopic.php?f=2&t=3220
Page 1 of 1

Author:  Paolo Zaia [ Tue Oct 27, 2015 1:37 pm ]
Post subject:  How to click on a word in the pdf and return a word

Hi,
is possible with PDFsharp click on a word in a pdf and return the word I clicked? I'm writing with C# VS2015 and my pdf is dislpayed with Adobe Reader tool into a winform. If it's possible, how can I do it?

I googled something but I wasn't very lucky..

Author:  TH-Soft [ Tue Oct 27, 2015 4:45 pm ]
Post subject:  Re: How to click on a word in the pdf and return a word

Hi!
Paolo Zaia wrote:
my pdf is dislpayed with Adobe Reader tool into a winform.
I don't know what Adobe Reader can do for you.
The PDFsharp FAQ indicate that PDFsharp cannot do much in that direction.

Author:  Paolo Zaia [ Wed Oct 28, 2015 8:47 am ]
Post subject:  Re: How to click on a word in the pdf and return a word

I've found this ( http://stackoverflow.com/questions/2100 ... ng-c-sharp ) for itextpdf, that might be a solution for what I want to do. Pdfsharp can't do it?

Author:  Thomas Hoevel [ Wed Oct 28, 2015 9:16 am ]
Post subject:  Re: How to click on a word in the pdf and return a word

PDFsharp can extract text from PDF files at a low level. There are libraries that use PDFsharp for that purpose:
https://www.nuget.org/packages/PdfTextract/

I never used that library and cannot say if you can get the word for a certain position using that library.
But PDF files can be very complicated and I cannot imagine that a library will handle all cases correctly.

Author:  Paolo Zaia [ Wed Oct 28, 2015 9:42 am ]
Post subject:  Re: How to click on a word in the pdf and return a word

Thank you Thomas, I'll try that! :wink:

Author:  Paolo Zaia [ Thu Oct 29, 2015 3:55 pm ]
Post subject:  Re: How to click on a word in the pdf and return a word

And what if my pdf is displayed with a WebBrowser Control?
Can I do resolve my problem with pdfSharp now?

ps: I forgot to say that I can't use the library TextExtractor because the GPL license!

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/