Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello all,

I have developed a website where I am displaying a PDF in a popup window.

But when I view the same website on Ipad, the same PDF by default gets downloaded instead of opening a popup window.

What needs to be for Ipad to show the popup windows?
Posted

1 solution

For that browser to be able to preview the PDF document, you need to be using the compatible browser, the browser which supports previewing the PDF documents, either by a thir-party plugin or right out of the box; built-in support.

If the browser doesn't support a file, instead of opening it... It will download and save the file on the machine for the user to preview (open) it using any of the software application installed on their machine.

To preview PDFs, you need to be reading the PDF yourself; using a library. And then streaming those bytes down to the client and rendering them as HTML content. There are quite multiple libraries which allow you to convert the PDF data to HTML data. Read the following threads.

http://stackoverflow.com/questions/2295555/how-to-convert-pdf-into-html-using-c-sharp[^]
PDF to HTML conversion in asp.net(c#)[^]
http://forums.asp.net/t/1417395.aspx?convert+pdf+to+html+in+c+[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900