web viewer don't show pdf file

web viewer don't show pdf file

Good evening, i'm doing an app Where i put this code:

<script>
            function onDeviceReady(){
                intel.xdk.device.hideSplashScreen();   
            }
            document.addEventListener("intel.xdk.device.ready", onDeviceReady, false);               
            
            function test(){
                alert("Executed from child browser")
            }
            
            function ListinoGruppi(){
                intel.xdk.device.showRemoteSite("https://www.dropbox.com/s/9t0q95of8e7i8hh/Listino%20Gruppi%20di%20acquis...", 280, 20, 40, 40);    
            }

 

but the web viewer don't show me the pdf file located in dropbox site.

can you help me??

 

 

 

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Chirag Chinmay's picture

Is your dropbox file shared as public? Because when I try to access the link given above it shows a 404 Error.

Thank you.

 

Alexander Weggerle (Intel)'s picture

I moved the thread to the XDK forum. I guess more people can help you here :-)

Elroy Ashtian Jr (Intel)'s picture

Your PDF file that is stored in your dropbox account is not visible to everyone or accessible.  

intel.xdk.device.showRemoteSite(url, closeImageX, closeImageY, closeImageWidth, closeImageHeight)

https://software.intel.com/en-us/node/493054

In order to view online PDF files in the current versions of Android and Windows Phone, you are required to use third party apps or download the files. There is no support for viewing online PDF in the webView(Android)/webbrowser control(Windows Phone) or even the native web browser. iOS devices are the only platform of the three that allows users to view PDF files in the browser and also in the WebView where HTML5 based native built apps are contained. The showRemoteSite function is implemented within the WebView which means that it is bounded to the same rules as web content in the browser. PDF files will not be viewable in the current version of Android or Windows Phone using the showRemoteSite function.

Elroy Ashtian, Jr.

Login to leave a comment.