Problem in converting PDF to SWF from C#.Net webSite

Using Batch Processing and Enhanced Batch Processing
Post Reply
ajaysoft
Posts:1
Joined:Tue Jun 03, 2008 8:11 am
Problem in converting PDF to SWF from C#.Net webSite

Post by ajaysoft » 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

staff
Posts:267
Joined:Sat Dec 15, 2007 4:48 pm

Re: Problem in converting PDF to SWF from C#.Net webSite

Post by staff » Fri Oct 17, 2008 5:36 am

You need to use Print2Flash Automation API and run it under different user account for conversion of documents from ASP.NET. The problem is many applications refuse to print documents under the user account used for running ASP.NET scripts.
You may find further information here:
- Automation API: http://print2flash.com/help/AboutAutomationAPI.php
- Running automation objects under different user account: http://print2flash.com/help/SettingupAu ... ccount.php

Also, Print2Flash SDK contains an ASP.NET/C# sample for this. The SDK can be downloaded from http://print2flash.com/download.php. The ASP.NET sample is located in the Automation\Samples\ASP.NET folder of SDK archive.

sweeppicker
Posts:1
Joined:Wed Jul 28, 2010 4:32 am

Re: Problem in converting PDF to SWF from C#.Net webSite

Post by sweeppicker » Thu Jul 29, 2010 5:38 am

i'm facing the same problem. Tried these solutions but somehow they are not working properly.

Post Reply