How to display pdf file in asp.net web form

I am looking for a free .Net method or component for displaying PDF files in a browser and also allowing printing files. What methods / components / libraries can do this, and what recommendations do you have on this issue in general.

+4
source share
6 answers

http://www.beansoftware.com/ASP.NET-Tutorials/PDF-View-Custom-Control.aspx

I was looking for what I was looking for. A control that can display PDF in a browser in a web form, with other elements on the page and whose pdf file can be modified by the server code.

+3
source

I think you can look at this:

how to convert pdf to html using c #

The code will help you download the PDF in html format in the document.

+4
source

If you do not want to display as PDF on the client, you have some options ... Basically, most of your options revolve around converting the documentation to something else that the user can use:

  • HTML
  • RTF (most people can view / print this using client software)
  • You can always use software to convert this into a set of images, but it is quite processor intensive and requires the user to print them out of turn.
  • Converting to xps, but for this you will need to install xps on client computers.

So why can't you rely on a PDF viewer?

+1
source

You can do this using this Microsoft Silverlight-based project .

There are two cases in the mentioned project:

  • Blend visually - used to output PDF to

    • Create DIV Positioning
    • Create IFRAME and position / size
    • Call mqzJsCalls.moveHTMLZone (x, y, w, h) from a Silverlight user control
    • Upload PDF to IFRAME
  • Data exchange between Silverlight and PDF (input / output from / to PDF)

    • Configuring a message handler and hostContainer
    • Expose scriptable object from managed code
    • PDF tells host that it is ready
    • Host sends data to PDF
    • Host notifies PDF when user data is needed
    • PDF sends user data to the host

I have not personally tested this particular project, but found this site to be good and reliable for .NET solutions.

+1
source

Flash applications are available for this. for example, regardless of http://issuu.com/ .

0
source

Even when converting PDF to HTML or IMAGE you will not get the same quality or something next to the original document. This is more than a bunch of texts and images using PDF .

If your customers cannot support the most well-known document format (portable document format β†’ pdf), you need to think about the design again.

0
source

Source: https://habr.com/ru/post/1340863/


All Articles