This topic describes how to view a Pdf file in your MVC application using C1 PdfViewer template. The C1 PdfViewer template provides two different options to preview PDF file on the web browser. Users can preview the Pdf files that are stored on local system using the Pdf in current project option or can view the Pdf files that hosted on WebApi service URL using Pdf in other Pdf service option.
Index.cshtml |
Copy Code
|
---|---|
<head> <title>C1 MVC PdfViewer</title> <c1-styles /> <c1-scripts> <c1-flex-viewer-scripts /> </c1-scripts> </head> <body> <c1-pdf-viewer file-path="PdfRoot/DefaultDocument.pdf" service-url="https://demos.componentone.com/ASPNET/c1webapi/4.0.20171.91/api/pdf"> </c1-pdf-viewer> </body> |