I have a View called ShowDocument.cshtml.
I want to show the pdf document in a view.
First I am converting the html page to .pdf which contains the information as :
The code in the controller is:
Stream stream = HtmlToPdfBuilder.GetHtmlForm(model.Type, 16);
If I give return File(stream, "application/pdf", "Authorization.pdf"), I will be getting as save, save as dialog box.
I do not want this dialog box ,I want to show the pdf content inside the page only .
So Is there any pdf viewer in MVC so that I can show the content in a View only using some control
This may not be exactly what you want but might meet your need. You can embed the PDF in a partial view then update the partial view via ajax with the PDF on the form submit button.
Example code:
Partial view
Controller call:
main view:
(Edit: Changed “main view” to a title ish)