felipericcetto
Posts: 0
Joined: Thu Aug 07, 2014 2:01 pm

Android open or download PDF in browser

Hi,
I need to be able to open or download PDF file from browser in Android.
In my App I open my website using this:
window.open('a href="http://" rel="nofollow"http:///a...............', '_blank', 'location=no,enableViewportScale=yes');

I cannot use http://docs.google.com/viewer because my website is not public, it requires authentication.

Any other ideas?

Thanks

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Android open or download PDF in browser

Hello,

Please try following JS code:

pre

window.open('http://...............', '_system');

/pre

See more here: https://devcenter.appery.io/tutorials...

Regards.

felipericcetto
Posts: 0
Joined: Thu Aug 07, 2014 2:01 pm

Android open or download PDF in browser

Hello,

To clarify, my App has a button that open a login page using: window.open('a href="http://" rel="nofollow"http:///a...............', '_blank', 'location=no,enableViewportScale=yes');

The user authenticates in my login page (browser).

After the user is authenticated, shows up another webpage with some links.

One of them is a link for a PDF file.

So I tried to put "window.open('a href="http://" rel="nofollow"http:///a...............', '_system');" in my webpage but does not work...

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Android open or download PDF in browser

Hello Felipe,

Could you please clarify, do you get any error in a browser console?
Also please look at these links, they may be useful for you:
https://getsatisfaction.com/apperyio/...
https://getsatisfaction.com/apperyio/...
https://getsatisfaction.com/apperyio/...

felipericcetto
Posts: 0
Joined: Thu Aug 07, 2014 2:01 pm

Android open or download PDF in browser

Hello,
This link that you sent was not usefull.

In my case, the link to open the PDF is not in the app, it is in the webpage, as I said before:

My App has a button that open a login page using: window.open('[url=http://...........htm]http://...........htm[/url]', '_blank', 'location=no,enableViewportScale=yes');

The user authenticates in my login page (browser).

After the user is authenticated, shows up another webpage with some links.

One of them is a link for a PDF file (this link is on webpage, not in the app).

When I click in that link (PDF) nothing happens.

How can I see error messages in the browsers app?
I use the app "Appery" on my Android phone.

Thanks

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Android open or download PDF in browser

Hello,

It seems inappBrowser could open just one window at one time.

Please try following workflow:

  1. Open first URL in inAppBrowser - to login. Make login there.

  2. Close window (1st step).

  3. Open new window with needed URL.

    Regards.

Return to “Issues”