javascript - PDF Viewer on Sencha Touch 2 -
i have got weird situation on sencha touch2 .
i have issue read , display pdf file in framework. read on sencha forum/google .etc , didn't find real solution.
i have json object feed pdf's url (pdfs not locally) .
what tried this:
<embed type="application/pdf" width="100%" height="100%" src="file.pdf" />i have have scroll issue, t shows first page, because sencha has got own scroll panel ... etc
<object data="yourfile.pdf" type="application/x-pdf" width="100%" height="100%" </object>
it has same thing, scrolling issue
<iframe src="http://docs.google.com/viewer?url='+encodeuri+'&embedded=true" width="100%" height="780" style="border: none;"></iframe>
i kind of liked google idea, nor reason did not worked on ipad, think google requires logged in, in case want read view pdf
ps: these 3 methots set html in sencha panel:
{ xtype:'panel', height:'100%' html:'iframe or object or google' } did find solution or maybe workaround view pdf files ?
thanks ay !!!!!
i found few alternatives use or have in plan use:
- google pdf viewer https://docs.google.com/viewer, not perfect me , has got session issue when logged in , session expired
- in case app fine open new window pdf, can open new window in browser version , can use in phonegap childbrowser example view pdf
- i use use 1 app third party servie ex: http://crocdoc.com/, doesn't work me, cause nee upload pdf in http://crocdoc.com/ after can preview in app, not on fly
- next in line me using pdfjs https://github.com/sunbox/st2_pdf_panel. still have play cross domain documents, got.
if have real solution awesome, issue been wile in app implementation time, not sure real solution in situation.
Comments
Post a Comment