Search code examples
ioscordovainappbrowser

How to open PDF file in popup window using phonegap for ios


I am using phonegap for ios . I need to open pdf file from external URL as popup . Here i used InappBrowser plugin its working fine but it showing full window. i need to show like popup.

Here is the code by using InAppBrowser plugin:

        <a href="#" onclick="window.open('http://www.us-cert.gov/sites/default/files/publications/CloudComputingHuthCebula.pdf', '_blank', 'location=no');">Show PDF</a>

Solution

  • use google doc viewer is the best option ex:

    window.open("http://docs.google.com/viewer?url=<place your doc location address>", '_blank', 'location=yes');
    

    thats it.