C# PDF Viewers

C# PDF Viewers

C# PDF ViewersPhoto by Thomas Lefebvre

Originally Posted On: https://ironpdf.com/docs/questions/net-pdf-viewer/


Viewing PDFs in our applications is a common request that is easily solved.

We are working on a visual framework for viewing PDFs in C#/.Net – in the mean time you have lots of viable free options without resorting to Adobe Acrobat.

ASP.Net & MVC PDF vierwer.

For web applications – PDFs can be viewed in a browser window or iframe. You may also use the amazing pdf.js library from mozilla to leverage a full PDF viewer written in pure javascript code.


WPF C# PDF Viewer

For viewing PDF documents directly in WPF you can use the native WebBrowser control.

Windows Forms PDF Viewer

For viewing PDF documents directly in windows forms (WinForms) applications the WebBrowser control is also a good choice.

Viewing a PDF in a the Default System PDF Viewer

To open a PDF from any application in an external window, we may use a trick involving System.Diagnostics.Process.Start.

This will generally open the PDF in the default web browser which supports viewing PDF content, or Adobe Acrobat if installed.

  1. // Render any HTML fragment or document to HTML
  2. var Renderer = new IronPdf.HtmlToPdf();
  3. var PDF = Renderer.RenderHtmlAsPdf(“<h1>Hello IronPdf</h1>”);
  4. var OutputPath = “HtmlToPDF.pdf”;
  5. PDF.SaveAs(OutputPath);
  6. // This neat trick opens our PDF file so we can see the result in our default PDF viewer
  7. System.Diagnostics.Process.Start(OutputPath);

Copy code to clipboardVB C#

Information contained on this page is provided by an independent third-party content provider. Frankly and this Site make no warranties or representations in connection therewith. If you are affiliated with this page and would like it removed please contact pressreleases@franklymedia.com

Powered by Frankly
All content © Copyright 2000 - 2020 WNCONTENT. All Rights Reserved.
For more information on this site, please read our Privacy Policy, and Terms of Service, and Ad Choices.