+ Start a Discussion
arytenaryten 

Open PPT or PDF Document uploaded to Salesforce in a Mobile Hybrid App

Hi there,

 

I'm running the following scenario:

I have a Mobile Hybrid App connected to my org in SF. This app uses REST services to get data from Salesforce.

I found the way to get Images as Attachments from the SF using a custom Apex REST (wich returns the Blob Body of the Attachment, encoded in base64 format) and i'm currently displaying those images in my app.

 

I uploaded a PDF file and a PPT to Salesforce Document, and want to access them by using my App.

Then i created an Apex REST service to return the Body in base64 format..

 

Questions:

1) Is it possible to display that base64 representation of PDF in my App (HTML5)?

2) Can i use the base64 rep to store a file (by using Phonegap FileWriter) in my device and then access it from external app?

3) Is there a way to directly display the document without prompting for salesforce login?

 

Thanx in advance for your support..

ritika@developerforceritika@developerforce

I too have a similar requirement. Did you find any solution ?

 

Regards,

Ritika

arytenaryten

Hi Ritika,

 

by now, we found no easy or affordable solution to solve the problem and we decided to use a workaround: simply opening the pdf within the Safari browser by enabling the "open external links in other apps" in SF Mobile SDK framework and using direct links with the oAuth token, so the user won't be prompted for password.

 

Hope this will help you as well

ritika@developerforceritika@developerforce

Thanks.

 

But for that, my Phone / Pad has to be online always, right ?

I have downloaded the base 64 PDF data from Contents in Salesforce, in local javascript objects. This I want to render on the App itself.

 

My guess is that some plugin has to be used for this.

 

I am looking for a renderer which renders all kinds of content (pdf, video, audio) etc.

 

Please let me kno if you have any clue on this.

 

Thanks again.