Apr 02, 2009 08:13 AM|Krushna Chandra Sahu|LINK
I've an application developed in ASP.Net to convert any file to pdf file using Adobe PDF Printer.
In the .aspx page I've kept one button control and in the click event I've written :
protected void Button1_Click(object sender, EventArgs e)
Process printProcess = new Process();
printProcess.StartInfo.FileName = "E:\\Krushna.doc";
printProcess.StartInfo.Verb = "printto";
printProcess.StartInfo.Arguments = "\"Adobe PDF\"";
printProcess.StartInfo.WindowStyle = ProcessWindowStyle.Minimized;
printProcess.StartInfo.CreateNoWindow = true;
catch (InvalidOperationException ex)
catch (Exception ex)
Please note that I'm using Adobe Acrobat 6.0 Professional and PDF Printer is installed in my system and it is set to default printer.
In the properties of the PDF Printer, in the Port tab, I've set the port to "My Document\*.pdf " . It will save the .pdf file to My Document.
I'm using ASP.Net 2.0 with IIS 5.1 installed.
The issue is :
This is working fine while running the application directly(i.e. the Krushna.doc file is converting to Krushna.pdf and save to My Document Folder) .
But when the application running from IIS, it is asking to save the pdf file i.e. one save dialog window is opened. But I need to directly save the pdf file to the My Document Folder.
How I'll do it so that the pdf file will save automatically when running from IIS ?
Please reply...It is urgent requirment.
asp.net 2.0 C#
SQL SERVER 2000