How to open or launch PDF Files in C#.Net?

87,047

Solution 1

I assume you just want to open the file. Try the following

System.Diagnostics.Process.Start(@"c:\file.pdf");

Solution 2

What do you mean for "open PDF file"? If you need to read all byties more simple method is:

byte[] byteArray = System.IO.File.ReadAllBytes(@"c:\file.pdf");

If you want display its on WinForm - look that

Solution 3

to give the third possible answer to your question:

if you want to edit the PDF-file you can use a library like iTextSharp or PDFSharp

Share:
87,047
Happy boy
Author by

Happy boy

Updated on September 28, 2020

Comments

  • Happy boy
    Happy boy over 3 years

    How do I launch a PDF Programmatically from a C# application in it's own process?

    Originally: I want to open PDF file when i click button in C#.Net?