How to embed PDF in a mobile application

I am trying to embed PDF in my mobile web application and I cannot force the PDF to automatically scale to the width of the device.

I have the following code to show pdf.

<embed type="application/pdf" width="100%" height="100%" src="file.pdf" /> 

If I remove the specification of the viewport, then pdf scales correctly, so I wonder if there is a value that I need to change in this so that it can display correctly?

  <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=0;" /> 

Any help would be great, thanks

+4
source share
1 answer

You really don't need to embed PDF for your mobile application. Allow native phone features to handle PDF display. <a target="_blank" href="file.pdf">PDF</a>

-2
source

All Articles