0

This is an MVC3 application. I have numerous pdf files in a database and i want to retrieve them and display them in a popup window. I have my pdf file in a Stream object and I send it to the popup window from my controller like this:

 //This returns my model which contains a Stream 
 //object with the pdf retrieved from the database
   var model = GetPdf() ;

      //fileStream is of type Stream
       model.fileStream.Position = 0;
        return new FileStreamResult(model.fileStream, "application/pdf")
        {
            FileDownloadName = "download.pdf"
        };

But my popup window looks likegarbage. Its gonna be displayed in a Telerik window, buti dont think that matters. How do i display a PDF file from a database in a popup window via MVC3? Thanks

BoundForGlory
  • 4,114
  • 15
  • 54
  • 81

0 Answers0