Thank you for sharing!
Thank you for sharing!
Mike or Maryna,
Where would I put this command to allow pinch and zoom of PDFs within the app?
window.open('URL', '_blank', 'EnableViewPortScale=yes');
Hi Jay,
Add it to any action. For example click on the button.
More information here: http://docs.appery.io/documentation/w...
Sergiy,
Just so I understand properly. Right now, I have a tap event for a button that will navigate to the database and open a pdf. Do I put the script on the end of the link or is this an entirely new event that has to be added for opening the pdf? If it is a new event then what kind of event should it be?
Thanks.
Jay,
I have a single "Click--Run JavaScript" event on my button where I entered the following:
window.open('URL', '_blank', 'EnableViewPortScale=yes');
where URL is the link to the PDF on your database.
Mike,
Are you sure this is the exact script you used? I am getting all sorts of error messages.
Expected ')' and instead saw ','
Missing semicolon
Unclosed string
Unclosed string
Missing semicolon
Expected an assignment or function call and instead saw an expression
Missing semicolon
Here is the script I ran...
window.open('https://api.appery.io/rest/1/db/files...');
Am I leaving something out? Does this script have anything to do with a PhoneGap plugin? That could be the problem since I haven't used this.
Hi Jay,
You can use < pre and < code tags. Works for me on this forum.
Jay,
Yes the script provided was correct.
In looking at your PDF file's URL, it looks like you're missing a space and apostrophe before _blank which is causing everything after the URL to mistakenly be included in the URL.
Try this:
window.open('https://api.appery.io/rest/1/db/files...', '_blank', 'EnableViewPortScale=yes');
That worked. Thanks.