ASP.NET PDF Preview Control
How to open, preview, view PDF file online using C# ASP.NET MVC component. Free Download.


Easy to read, preview a PDF document online in web browser in an ASP.NET, Core, MVC web application using C#. Free C# example source code included.









In this guide, you will learn how to preview and navigate a PDF in web browser in an ASP.NET Core, framework, MVC web application using C# programming.

How to open, preview PDF file through web browser in C# asp.net web application

  1. Download EdgePDF asp.net PDF viewer web control
  2. Integrate ASP.NET PDF control into your ASP.NET Core, MVC project
  3. Preview a PDF in web browser
























  • Best online ASP.NET PDF Viewer web control to preview, view, navigate PDF in web browser with C# programmatically
  • Easy to preview PDF document online through thumnails, bookmarks, and all pages panel
  • Help to preview PDF in high quality in browser using C#.NET HTML5 PDF Viewer control
  • Fully support ASP.NET Core, ASP.NET Framework, MVC on Azure web service
  • Able to read PDF document from web user local/remote file system, from byte array, and stream object.
  • Able to display PDF file in browser in div or iframe





How to preview PDF in ASP.NET MVC C# using EdgePDF?



EdgePDF is an ASP.NET PDF Viewer web control for C# program. EdgePDF includes several buildin features to preview an existing PDF file pages and contents online in web browser without any C# code.

Here are the list of methods to preview PDF online in your ASP.NET Core, MVC web application.

  • Preview PDF through thumbnails: Open the PDF viewer Page Thumbnails pane on the left side, you will view all pdf pages thumbnails. Click one thumnail to jump to and navigate to the target PDF page.


  • Preview PDF through bookmarks: Open the PDF reader Bookmarks pane on the left side, you can preview the whole PDF document content outline. Click interested topic to jump to and view the specific PDF page.


  • Preview PDF through "Re-order Pages" panel : Goto toolbar Pages > section Manipulate Page > click command Re-order Pages. The popup panel will display all pages thumbnails in the opened PDF file. Use the right scroll bar to navigate and preview all PDF pages.






  • Preview PDF pages in ASP.NET, MVC using C# PDF library



    EdgePDF is an ASP.NET PDF reader web control, and it includes a powerful C# PDF library (XDoc.PDF for .NET). C# developers can easily create a preview thumbnail image from PDF page. The following text and C# example source code show how to create and preview PDF page through thumbnail using C#.

    1. Create a PDFDocument object from an existing PDF file
    2. Get a PDFPage object from the specific page to preview
    3. Create a Size object for thumbnail image width and height in pixel.
    4. Utilize method PDFPage.ConvertToImage(Size) to create the preview page thumbnail image in Bitmap.



    String inputFilePath = Program.RootPath + "\\" + "1.pdf";
    PDFDocument doc = new PDFDocument(inputFilePath);
    PDFPage page = (PDFPage)doc.GetPage(0);
    
    //  define the size of the thumbnail
    Size thumbnailSize = new Size(80, 100);
    //  create the thumbnail
    Bitmap thumbnail = page.ConvertToImage(thumbnailSize);
    //  do something ...