Problem in converting PDF to SWF from C#.Net webSite
Posted: Sat Jun 07, 2008 1:02 am
Hi
I want to convert a PDF file to SWF file from My C#.net webApplication Code.
This works fine of some computer, but doesnt create SWF file on some computers.
Code is as below.
string strPDFPath = HttpContext.Current.Server.MapPath("~/Test.pdf");
string strSWFPath = strPDFPath.Replace("Test.pdf", "Test.swf");
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.CreateNoWindow = true;
p.StartInfo.RedirectStandardError = true;
//p.StartInfo.WorkingDirectory = HttpContext.Current.Server.MapPath("~") + "//";
//p.StartInfo.FileName = HttpContext.Current.Server.MapPath("~/p2fServer.exe");
p.StartInfo.WorkingDirectory = "C:\\Program Files\\Print2Flash\\";
p.StartInfo.FileName = "C:\\Program Files\\Print2Flash\\p2fServer.exe";
p.StartInfo.Arguments = @"" + strPDFPath + " " + strSWFPath + " /ProtectionOptions:4";
p.Start();
p.WaitForExit();
p.Close();
I checked all the required settings/Permission on each Computer, like
1) Full Control to "EveryOne" user to Root folder
2) Write,Executable permision to Virtual directory
3) PrintSpooler Service is running
4) FlashPlayer is Installed
5) Acrobat Reader Is Intstalled
But even after all this settings, This code doesn't works on some computer.
If I create window application in C#.net and paste the same code, then it works fine in all computers.
Can anyone plz tell me that what could be the problem.
Regards
Ajay Dekavadiya
I want to convert a PDF file to SWF file from My C#.net webApplication Code.
This works fine of some computer, but doesnt create SWF file on some computers.
Code is as below.
string strPDFPath = HttpContext.Current.Server.MapPath("~/Test.pdf");
string strSWFPath = strPDFPath.Replace("Test.pdf", "Test.swf");
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.CreateNoWindow = true;
p.StartInfo.RedirectStandardError = true;
//p.StartInfo.WorkingDirectory = HttpContext.Current.Server.MapPath("~") + "//";
//p.StartInfo.FileName = HttpContext.Current.Server.MapPath("~/p2fServer.exe");
p.StartInfo.WorkingDirectory = "C:\\Program Files\\Print2Flash\\";
p.StartInfo.FileName = "C:\\Program Files\\Print2Flash\\p2fServer.exe";
p.StartInfo.Arguments = @"" + strPDFPath + " " + strSWFPath + " /ProtectionOptions:4";
p.Start();
p.WaitForExit();
p.Close();
I checked all the required settings/Permission on each Computer, like
1) Full Control to "EveryOne" user to Root folder
2) Write,Executable permision to Virtual directory
3) PrintSpooler Service is running
4) FlashPlayer is Installed
5) Acrobat Reader Is Intstalled
But even after all this settings, This code doesn't works on some computer.
If I create window application in C#.net and paste the same code, then it works fine in all computers.
Can anyone plz tell me that what could be the problem.
Regards
Ajay Dekavadiya