我正在Windows 2008 R2上运行IIS7.5,在上传到带有SWFTools‘pdf2swf的SWF之后,我尝试将一些PDF转换成SWF。如果我用相同的参数手动启动转换器,那么一切都很好。但是,如果我从我的HttpHandler中启动转换器,或者进程不返回任何输出(而且似乎根本没有启动),或者转换没有任何文本的PDF --这取决于我如何启动这个过程。
下面是我开始这个过程的方式:
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.FileName = ToolsPath;
p.StartInfo.Arguments = arguments
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.Password = secPw;
p.StartInfo.UserName = username;
p.StartInfo.Domain = domain;
p.Start();
p.WaitForExit();我通过了哪些论点:
"%%source%% -o %%target%% -v -v -v -f -T 9 -t -s storeallcharacters"非常感谢您的帮助!
编辑:我也尝试过没有附加的StartInfo (用户凭证),这是我第一次尝试的,结果是没有文本的SWF。使用凭据(作为管理员或标准),我不会从转换器获得任何SWF或输出。
编辑2: --我也尝试过这些论点:
"%%source%% -o %%target%% -f -T 9 -t -s storeallcharacters"发布于 2012-04-14 16:14:37
好的,我通过添加一个具有管理权限的独立控制台应用程序来解决这个问题:我用
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />这个控制台应用程序名为pdf2swf.exe,由我的HttpHandler调用。
我还在我的HttpHandler中添加了“中间人”的调用代码行:
p.StartInfo.UseShellExecute = false;
if (System.Environment.OSVersion.Version.Major >= 6)
p.StartInfo.Verb = "runas";发布于 2012-06-01 09:54:45
我.我也有类似的问题。升级到最新版本的pdf2swf (Build0857)为我解决了这个问题。
https://stackoverflow.com/questions/10137401
复制相似问题