Page 1 of 2

Link to pdfs contained within the app

Posted: Fri Nov 08, 2013 2:39 pm
by Jay6395558

How do you link directly to a pdf? I am using the ist component and I don't want to link each button to an external url but rather a pdf that is contained within the app or appery cloud. Would I use a database?


Link to pdfs contained within the app

Posted: Fri Nov 08, 2013 4:36 pm
by Kateryna Grynko

Hi Jay,

Then you should upload PDF to Appery.io Database as a file.
http://docs.appery.io/tutorials/uploa...


Link to pdfs contained within the app

Posted: Tue Nov 12, 2013 2:45 pm
by Jay6395558

Can you elaborate on your response? The link you provided gives info on how to create an upload page on your app. I am not interested in having the user upload a pdf. I need to store pdfs so the user can access my pdf when they click on a button.


Link to pdfs contained within the app

Posted: Wed Nov 13, 2013 6:32 am
by Kateryna Grynko

Jay,

First, you would need to upload PDF file via Appery.io: https://appery.io/database/ choose Database - Files data - upload.

Here is how to open it: https://getsatisfaction.com/apperyio/...


Link to pdfs contained within the app

Posted: Mon Feb 17, 2014 5:28 pm
by Mike6580064

Katya,

I have done this but, using the Appery Previewer on my device, the PDF is not scalable and only fits the screen. I would like to be able to zoom in and out of the PDF. Is this a limitation due to the Appery Previewer?


Link to pdfs contained within the app

Posted: Tue Feb 18, 2014 12:03 am
by Alena Prykhodko

Hello Mike,

I can not reproduce, please tell us how do you open .pdf?


Link to pdfs contained within the app

Posted: Tue Feb 18, 2014 3:28 pm
by Mike6580064

Alena,

As suggested in this thread, I have uploaded a PDF file to my database.

I have a button component where Action--Navigate to Link (Open in New Window: True).

The link is the hyperlink generated from the Appery database PDF file.


Link to pdfs contained within the app

Posted: Tue Feb 18, 2014 3:32 pm
by Mike6580064

I have successfully tried running JavaScript on the button's action so that it opens the PDF in the device's standard browser (in my case, Safari) using the following command:

window.open("LINK", "_system");

In this case, the PDF is scalable. However, I would really like to be able to view this PDF within the app itself and not be directed to a browser.


Link to pdfs contained within the app

Posted: Wed Feb 19, 2014 5:34 pm
by Maryna Brodina

Hello! Looks like there is no way to do that, but you can try to search for PhoneGap plugin online to be able to open PDF in app and scale it.


Link to pdfs contained within the app

Posted: Thu Feb 27, 2014 7:30 pm
by Mike6580064

window.open('URL', '_blank', 'EnableViewPortScale=yes');

This allows pinch and zoom of PDFs within the app.