03-15-2013 05:27 AM
Hi all. I trying to view pdf on the browser but when I click on the link, it ask to save to the device instead.
My code:
strQPartiClaim += '<div class="particularsLabel">RECEIPT</div><div class="particularsValue"><span class="noLine" x-blackberry-focusable="true" onmouseover="pageHighlight(this)" onmouseout="noPageHighlight(this)" onclick="openLink(\''+partiReceipt+'\')">VIEW</span></div>';
partiReceipt is the url so it will be 'http://www.view.com/view/pdfs/view.pdf'
The function:
function openLink(url){
var args = new blackberry.invoke.BrowserArguments(url);
blackberry.invoke.invoke(blackberry.invoke.APP_BRO WSER, args);
}
I have also added in the config.xml
<feature id="blackberry.identity" /> <feature id="blackberry.invoke" /> <feature id="blackberry.invoke.BrowserArguments" />
Can anyone please advise on this?
TQ!
03-18-2013 09:03 AM
Which platform (BB10, Tablet OS, BBOS) and device are you testing on?
In most cases, the experience will be to prompt you to download or open the document. In some cases, the PDF reader application may then be opened to display the document.
I believe only BBOS 5.0 and earlier supported PDF-in-the browser because the connected back-end service transcoded the PDF document into content readable by the browser.
03-18-2013 09:57 PM
I am testing on 9900 running on OS 7.1.
The user of the app would like to view attachment and not save it to the device. So when they click on the link it will prompt to save and they have to switch application to Pdf To Go to view the downloaded pdf.
Is there any way to allow Pdf To Go automatically launch when user view pdf attachment?
03-19-2013 10:06 AM
I got the same problem with the black berry playbook os to open pdf from my web app.
Here is my post:
I tried also embed and object: