Hi Ikramshams,
There are two approaches to open a Pdf file.
First save the pdf file using Aspose.Pdf.
Then use the path to open the pdf using the following way.
1st Approach
You can use System.Diagnostics.Process.Start for opening PDF files using the default viewer.
C#
private void btnView_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start(@"D:\Test.pdf");
}
VB.Net
Private Sub btnView_Click(ByVal sender As Object, ByVal e As EventArgs)
System.Diagnostics.Process.Start("D:\Test.pdf")
End Sub
2nd Approach
Place a WebBrowser Control into your Form and then use the Navigate method for display the PDF file in the Form.
C#
private void btnOpen_Click(object sender, EventArgs e)
{
webBrowser1.Navigate(@"D:\Test.pdf");
}
VB.Net
Private Sub btnOpen_Click(ByVal sender As Object, ByVal e As EventArgs)
webBrowser1.Navigate("D:\Test.pdf")
End Sub