Click here to Skip to main content
15,884,388 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello every one.

i am working on my project , i added help tab to help the user how he can use my project. i wrote all instruction in PDF file in a path, by using following code , but the PDF is not showed ? there is a message says : can not open this PDF ?? why??

can you help me , please ?
C#
private void button12_Click(object sender, EventArgs e)
        {
            string path = @"D:\PDF Pro.pdf";
            System.Diagnostics.Process.Start("Chrome.exe", path);
        }
Posted
Comments
murkalkiran 4-Nov-14 3:21am    
using System.Diagnostics;

rivate void button12_Click(object sender, EventArgs e)
{
string pdfFileName = "C:\\mypdfFileName.pdf";
System.Diagnostics.Process.Start(pdfFileName);
}
Me is Needer 4-Nov-14 11:14am    
it is solved thanks alot ^_^

1 solution

There could be several reasons why the file will not open:

1. your system has no .pdf viewer installed (like Adobe's Acrobat Reader), and you have the default .pdf reader in Chrome disabled: [^].

2. the file name is incorrect.

3. the specific .pdf file is locked, encrypted, or you don't have permission necessary to open it.

For various techniques for displaying a .pdf in WinForms, see: [^].
 
Share this answer
 
Comments
Me is Needer 4-Nov-14 11:14am    
thank you ^_^

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900