sayanee / angularjs-pdf

:page_facing_up: An AngularJS directive <ng-pdf> to display PDF files with PDFJS
http://sayan.ee/angularjs-pdf/
MIT License
494 stars 248 forks source link

pdf read work in browser but not in mobile device #136

Closed santoshshinde2012 closed 7 years ago

santoshshinde2012 commented 8 years ago

I have use the your given template example in my ionic app , it test very well in browser but not in device it shows blank screen.

Why it is happening ?

sayanee commented 8 years ago

Please check which browsers are supported for pdf.js: https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#what-browsers-are-supported

santoshshinde2012 commented 8 years ago

so it is not supported with ionic framework

sayanee commented 8 years ago

Which mobile browser are you using?

santoshshinde2012 commented 8 years ago

this is hybrid based mobile application which is run internally on system webview

paolorr commented 8 years ago

I solved this problem changing the reference from pdf.js to pdf.combined.js in the index.html

mayank-shekhar commented 8 years ago

this is not working for hybrid mobile applications. This is able to render PDF on android but not able to render pdf on IOS.

iOS version 9.3

Edit: For iOS check if position of any parent is set as absolute. Change that to relative and it renders correctly .