Marcelh1983/angular-document-viewer

does not render in ionic cordova

Closed this issue · 4 comments

does not render in ionic cordova

iOS renders but no scrolling or library features for pdf just first page

Android renders blank white page for pdf

Hi @nhhockeyplayer ,

I use the embed tag to display the pdf. It depends on the browser how it's rendered.
If you want to be sure that local pdf file are shown correctly on each browser then I would recommend using pdf.js: https://www.npmjs.com/package/ng2-pdfjs-viewer. I will update the readme with more info about pdf rendering.

thanks marcel for your speedy response

yeah i peeked at your source code and saw the embed tag being used and tried to search web for ay hints

be nice if you could find a wokraorund

i like your code

nice job

I'm not planning to do a lot of effort to support cordova or ionic in this library. Think this become more stackoverflow question right now :)

I haven't used ionic but did create a cordova app. You can check whether your app is running in cordova and call a cordova plugin right? Maybe you could call something like this: https://github.com/sitewaerts/cordova-plugin-document-viewer.

Did you try pdf.js? Didn't that work?

thanks, your viewer works great for web