Is it possible to get a webview on a windows OS build, I want to display a PDF and PDF on webview seems to work on everything except windows.
I don’t thinks so.
https://docs.coronalabs.com/daily/api/
https://docs.coronalabs.com/daily/api/library/native/newWebView.html
https://docs.coronalabs.com/daily/api/type/WebView/index.html
https://docs.coronalabs.com/daily/guide/distribution/win32Build/index.html#featurebehavior-notes (see note here about native.*)
However you can try it (assuming you have Windows)
You can’t display a PDF in an Android WebView either.
So, on Android and Windows, you’ll have to display your local PDF file via the default PDF viewer installed on the device/PC like this…
local platformName = system.getInfo("platformName") if (platformName == "Win") or (platformName == "Android") then local filePath = system.pathForFile("my.pdf") local wasOpened = system.openURL(filePath) if not wasOpened then -- Tell the user to install a PDF viewer. end else -- Display the PDF via a WebView on Apple's platforms. end
Now, this means the PDF file will be displayed by an external app and not within your app, but This is pretty normal on these platforms.
This is not pretty normal on Windows, there are SDK’s that have webview’s on windows, I need to be able to view the pdf in a window inside the App. I can’t expect the user to use an external program to view the PDF. Some of my clients use the PC apps at exhibitions and need to be able to bring the PDF up and be able to close it, if anybody has a solution for Corona I would be extremely grateful as the app I have is already written and I’ll have to use something else.
Microsoft’s native WebView (aka: Internet Explorer for Win32 apps) does not directly support PDF files.
Internet Explorer will only display a PDF file if you have Adobe’s PDF plugin installed, which of course is not installed by default. The end-user must install it manually. Don’t believe me? Install Windows from scratch and attempt to display a PDF file via Internet Explorer. It’ll fail to display it.
So, no, you can never depend on a native Windows WebView to be able to display a PDF. Never. Ever.
The same is true on Android. Android’s native WebViews (at least on Android 4.3 and older OSes; haven’t tried 4.4 chrome based WebVies) don’t support displaying PDF files either. So, you can’t depend on it on this platform either.
I’m ok with pre-installing something to make it show a pdf, but not having a webview on windows that I can show in a window is the problem.
I don’t thinks so.
https://docs.coronalabs.com/daily/api/
https://docs.coronalabs.com/daily/api/library/native/newWebView.html
https://docs.coronalabs.com/daily/api/type/WebView/index.html
https://docs.coronalabs.com/daily/guide/distribution/win32Build/index.html#featurebehavior-notes (see note here about native.*)
However you can try it (assuming you have Windows)
You can’t display a PDF in an Android WebView either.
So, on Android and Windows, you’ll have to display your local PDF file via the default PDF viewer installed on the device/PC like this…
local platformName = system.getInfo("platformName") if (platformName == "Win") or (platformName == "Android") then local filePath = system.pathForFile("my.pdf") local wasOpened = system.openURL(filePath) if not wasOpened then -- Tell the user to install a PDF viewer. end else -- Display the PDF via a WebView on Apple's platforms. end
Now, this means the PDF file will be displayed by an external app and not within your app, but This is pretty normal on these platforms.
This is not pretty normal on Windows, there are SDK’s that have webview’s on windows, I need to be able to view the pdf in a window inside the App. I can’t expect the user to use an external program to view the PDF. Some of my clients use the PC apps at exhibitions and need to be able to bring the PDF up and be able to close it, if anybody has a solution for Corona I would be extremely grateful as the app I have is already written and I’ll have to use something else.
Microsoft’s native WebView (aka: Internet Explorer for Win32 apps) does not directly support PDF files.
Internet Explorer will only display a PDF file if you have Adobe’s PDF plugin installed, which of course is not installed by default. The end-user must install it manually. Don’t believe me? Install Windows from scratch and attempt to display a PDF file via Internet Explorer. It’ll fail to display it.
So, no, you can never depend on a native Windows WebView to be able to display a PDF. Never. Ever.
The same is true on Android. Android’s native WebViews (at least on Android 4.3 and older OSes; haven’t tried 4.4 chrome based WebVies) don’t support displaying PDF files either. So, you can’t depend on it on this platform either.
I’m ok with pre-installing something to make it show a pdf, but not having a webview on windows that I can show in a window is the problem.