|
Rank: Advanced Member Groups: Member
Joined: 7/21/2014 Posts: 130
|
Hi,
How can i make difference in the WebView.ZoomFactorChanged event between a "standard" web page and the built-in PDF Viewer?
The extension of the url aren't a solution because it doesn't work for pdf create "on the fly".
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi, I do not believe this is possible. It appears that in the latest Chrome engine they treat PDF somewhat "native", so a PDF document and a regular HTML document share the same zooming level. If you wish them to have different zoom level, you can turn the built-in PDF plug-in off and rely on Adobe's plugin. You would set this property to false to disable the built-in PDF plug-in: http://www.essentialobjects.com/doc/eo.webbrowser.runtime.disablebuiltinplugins.aspxThanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 7/21/2014 Posts: 130
|
The problem is that we need to keep the built-in plugin
Is there a way to get the MIME type (or something else) in the WebView.ZoomFactorChanged, to detect if the page is a pdf or not.
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi, You can do this:
Code: C#
string type = WebView1.EvalScript("document.body.getElementsByTagName('embed')[0].type") as string;
This should return "application/pdf" for a PDF file. Thanks!
|
|