|
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?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
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!
|
|
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
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
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!
|
|