Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IPhone phonegap pdf issue

I have a strange issue in phonegap framework. I want to display PDF file in my application, when I am trying to add PDF file with iFrame tag it doesn't show a PDF with horizontal scroll and with a big zoom size. so getting out of screen.

I tried by another way using embed tag, its also having same problem with addition to that its showing PDF for only first time in the application.

If anybody know how to display a PDF in phonegap with specified zoom level or with scroll bar. Above code is working fine in iPhone mobile safari, but not in phonegap. Any Idea?

Thanks.

like image 754
jaxb Avatar asked Jul 31 '10 12:07

jaxb


2 Answers

To display pdf in phonegap, have lots of trouble, but best solution so far,is to used ChildBrowser Plugin for phonegap here is the link- https://github.com/purplecabbage/phonegap-plugins/tree/master/iPhone/ChildBrowser this will help you to call child native uiwebview in your application(only for iphone), so you can easily enjoy pinch zoom feature

like image 193
Mayur Birari Avatar answered Nov 16 '22 14:11

Mayur Birari


Using Phonegap you'll have only one UIWebView so probably the best idea is to open the pdf as a new object link using rel=external

Other suggestion is look at the view-port size, maybe you'll have to increase it's size to allow the pinch and zoom.

like image 24
ppaulojr Avatar answered Nov 16 '22 15:11

ppaulojr