Logo
My Account |  Site Map | Contact Us  
Welcome Guest Search | Active Topics | Sign In | Register

How to receive touch input events from PDFViewer? Options
WhetherMan
Posted: Friday, June 4, 2021 11:54:46 AM
Rank: Newbie
Groups: Member

Joined: 3/10/2021
Posts: 4
Hi all, I'm trying to get touch input events out of the WebView when the current address points to a PDF file. It seems that the PDF viewer handles these events, as WebView.MouseClick doesn't fire for touch input when interacting with a PDF.

Is there a way to be notified when a user is interacting with a PDF using a touch screen?

Thanks!

EDIT:

I should clarify that I've looked at the documentation and saw the events that would answer this question already. Maybe a better way to ask would be: can I get the PDF viewer out of the WebView when a PDF address is loaded?
eo_support
Posted: Friday, June 4, 2021 4:29:49 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 22,900
Hi,

There is no way you can get the PDF Viewer out of the WebView because PDF is handled by a plugin, and the plugin MUST "live" inside a WebView. I am not exactly sure what you meant by your original question though. Touch event does not automatically translate to mouse event in EO.WebBrowser (because the browser engine explicitly told Windows that it wants to receive touch event), so even for regular Web page, touching the page does not trigger MouseClick event either.

Thanks!
WhetherMan
Posted: Friday, June 4, 2021 4:36:33 PM
Rank: Newbie
Groups: Member

Joined: 3/10/2021
Posts: 4
eo_support wrote:
Hi,

There is no way you can get the PDF Viewer out of the WebView because PDF is handled by a plugin, and the plugin MUST "live" inside a WebView. I am not exactly sure what you meant by your original question though. Touch event does not automatically translate to mouse event in EO.WebBrowser (because the browser engine explicitly told Windows that it wants to receive touch event), so even for regular Web page, touching the page does not trigger MouseClick event either.

Thanks!


You're right, I was misinterpreting the logging that I was getting. In a normal browser webpage, I am injecting JS that calls back out into my application to let it know there was input taking place like a touch (and on what type of page element). For the same reason you mentioned, this has no effect for a PDF in the plugin.

I might have to hook into the Windows messages or something to listen for that sort of thing in a PDF.

Thanks
eo_support
Posted: Saturday, June 5, 2021 5:39:06 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 22,900
Hi,

Yes. You can try to do that. We actually re-route mouse and keyboard message to your .NET process so you would have a chance to examine those message without having to write code to intercept the message. However we were not able to do so for touch message because touch message contains a "handle" that is only valid inside the process it is for (in this case would be the browser engine process, not your .NET process). So even if we routed the message to your process, it would still be useless because most information related to the touch event comes from that handle. As such when you hook into Windows message, you may need to do something special to make sure your hook handler actually runs inside the browser engine process, not in your .NET process.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.