PDF Viewer in Ionic

Hi Guys,

  1. I am using PDFMAKE to create a base64 encoded pdf and I tried to show it with the Iframe by giving the encoded base64 to iframe src. It works on PC but it didn’t work on the mobile ( android and ios ).

  2. So, finally I stumbled upon Angularjs-PDF to show the pdf. Now, I am able see the pdf in mobile. But when I try to give custom width and height respective to device it takes. But the problem arises when I use zoom functionality, the page gets zoomed but it goes out of the screen. I can not even slide or swipe to see the content outside of the screen.

I want to make a pdf on the client side and preview to user with zoom functionality.

If anybody got any solution for this please share, Thank You.

1 Like

Hi,

I am using PDF.js for my project PodioBox.com ( based on ionic) and I embed the player and tha is working perfectly in a responsive web page .
I suggest to take a look.

Antonio

As you can read on my blog, I download PDF’s from a server and use pdf.js to render the pdf.
Showing the pdf with zooming worked as soon as I added the the “enableViewportScale=yes” option in the window.open directive.

I don’t know how Angular-PDF works but check out my post on this matter. Maybe you can find something of use for your case.

@nitinmegamind can you provide your solution to show pdf in mobile ?
Because I facing problem to show pdf on device with same lib.

Hello @santosh plz follow below link