Viewing PDFs in Android...

Terry Judd terry.judd at unimelb.edu.au
Tue Jun 18 19:29:36 EDT 2013


OK - for this to work the PDF has to be stored online - it doesn't appear to work with local (file) urls.

Anyway, all you need to do is construct a URL based on the URL for your PDF and the correct Google Docs URL. Something like this...

put "http://mydomain.com/myfile.pdf" into tPDF
put ("http://docs.google.com/gview?embedded=true&url="&tPDF) into tURL

...then set the URL of the browser control.

The result isn't perfect, and the download link that is included on the displayed page won't work, but at least you can view the contents of the PDF.

Terry...


On 18/06/2013, at 10:49 PM, Terry Judd wrote:

> Hi Paul - it's not ideal, but you can hand the PDF off to Google Docs, which will render it in a browser compatible format. I don't have the url handy but will post it when I'm back at work tomorrow.
> 
> Terry...
> 
> On 18/06/2013, at 10:16 PM, "Paul Maguire" <me at paulmaguire.me> wrote:
> 
>> Hi all.
>> 
>> My porting to Android saga continues - last chapter...
>> 
>> I've just identified that PDFs cannot be loaded into the browser native control in Android. This breaks my app quite badly. I see there is a workaround to:
>> 
>> launch URL http://blah.com/someFile.pdf
>> 
>> ... but this is going to cause the app to quit is it not? 
>> 
>> I'm a total Android hater at the moment. Anybody got any ideas on how to best proceed?
>> 
>> Kind regards,        Paul.
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 

Dr Terry Judd
Senior Lecturer in Medical Education
Medical Eduction Unit
Faculty of Medicine, Dentistry & Health Sciences
The University of Melbourne








More information about the use-livecode mailing list