asp.net mvc - mvc-pdf not opening in mobile browsers -


i using object render pdf works fine on desktop browsers on mobile browsers not opening pdf file,it says pdf reader not supported on device.i have tried using embed didn't worked out.

view

 <object type="application/pdf"                     data="@url.content(model.reporturl)"                     width="100%" height="100%">pdf reader not supported device.             </object>    //tried these     @*<object type="application/pdf"                     data="@url.content(model.reporturl)"                     width="100%" height="100%">pdf reader not supported device.             <a href="@url.content(model.reporturl)"></a></object>*@        @*<object type="application/pdf"                     data="@url.content(model.reporturl)"                     width="100%" height="100%">pdf reader not supported device.             <embed src="@url.content(model.reporturl)" type="application/pdf" width="100%" height="100%" /> </object>*@ 

i tried searching not able find useful result.

on phone, when click on pdf link launch external pdf viewer. built in browser doesn't have plug-in can process pdfs handled externally. believe done because on desktop these plug-ins major source of security vulnerabilities.

trying embed pdf page on browser may not viable. may want try browsing other sites embed pdfs determine if device can this.

if not, there things can improve user experience. on sites when downloads pdf ends in downloads directory. have go find , click on view it. on other sites automatically dialog asking me app want use view pdf downloaded.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -