On the server, I try to open a command prompt and call an executable file that converts the file to PDF. For this, I use the open source program PDFCreator.
In C #, I'm calling with this code:
ProcessStartInfo processStartInfo = new ProcessStartInfo("cmd.exe"); processStartInfo.RedirectStandardInput = true; processStartInfo.RedirectStandardOutput = true; processStartInfo.UseShellExecute = false; Process process = Process.Start(processStartInfo); process.StandardInput.WriteLine(@"cd c:\program files (x86)\pdfcreator"); process.StandardInput.WriteLine(@"PDFCreator.exe /PF""c:\dwf\dwf.dwf""");
It works without errors, but does not give a result. What this PDFCreator.exe file does is call another Autodesk Design Review program that opens, uses the PDF driver to print to PDF, and saves the file. The command you see works great and works autonomously.
From clearing other threads, it seems security may be my problem. So I went to the folders / executables of the PDFCreator and Design Review and granted full access to NETWORK, NETWORK SERVICE, IIS_WPG, IIS_IUSRS and the ASP.NET Machine account (you understand that this is probably a security thread, but it turns off when I find out the source problem). It did not help.
It should be noted that I can change the directory using the first command above, and then create the "test123" folder in the PDFCreator and Design Review folders. Seems like I'm getting closer here, any ideas?
source share