有兴趣的请进:asp调用 flashpaper问题
asp调用swftools工具将pdf转swf成功,为何用同样方法调用flashpaper将doc转pdf不成功,提示:命令执行失败,返回码:1。请问:问题出在哪里? <%
Dim strdocFile ' doc的文件名
Dim strpdfFile ' pdf的文件名
Dim strCmd ' 命令行
strdocFile = "D:\APMServ5.2.6\www\htdocs\pdfswf\pdf\a.doc"
strpdfFile = "D:\APMServ5.2.6\www\htdocs\pdfswf\swf\a.pdf"
'命令行
strCmd = "D:\FlashPaper2.2\FlashPrinter.exe "&strdocFile&" -o "&strpdfFile&""
'执行命令行
Dim objShell
Dim intSecceed
Set objShell = Server.CreateObject("WScript.Shell")
Response.Write(strCmd & "<hr>")
intSecceed = objShell.Run(strCmd,0,True)
If intSecceed = 0 Then
Response.Write("命令成功执行,返回码:" & intSecceed)
Else
Response.Write("命令执行失败,返回码:" & intSecceed)
End If
%>
Dim strdocFile ' doc的文件名
Dim strpdfFile ' pdf的文件名
Dim strCmd ' 命令行
strdocFile = "D:\APMServ5.2.6\www\htdocs\pdfswf\pdf\a.doc"
strpdfFile = "D:\APMServ5.2.6\www\htdocs\pdfswf\swf\a.pdf"
'命令行
strCmd = "D:\FlashPaper2.2\FlashPrinter.exe "&strdocFile&" -o "&strpdfFile&""
'执行命令行
Dim objShell
Dim intSecceed
Set objShell = Server.CreateObject("WScript.Shell")
Response.Write(strCmd & "<hr>")
intSecceed = objShell.Run(strCmd,0,True)
If intSecceed = 0 Then
Response.Write("命令成功执行,返回码:" & intSecceed)
Else
Response.Write("命令执行失败,返回码:" & intSecceed)
End If
%>
Macromedia FlashPaper2.2和contribute3.1一样都是Studio 8里的组件,FlashPaper的作用就是可以把Office文档(Word、Excel、PowerPoint)转换成为SWF格式的Flash文件和PDF文档,转换速度非常快,效果非常漂亮。我转换过一个两百多页的Word文档,只用了一分钟左右。此外,也可以将图片转换成PDF或者Flash影片。小弟昨天弄了大半天,终于做好了这个绿色版本。希望大家喜欢。只要首先运行初始化文件夹中的“初始化.bat”就可以了,如果提示“没有找到Flash播放器”那就再运行“GetFlash.exe”。
下载地址:http://www.
附asp调用swftools代码:
<%
Dim strpdfFile ' pdf的文件名
Dim strswfFile ' swf的文件名
Dim strCmd ' 命令行
strpdfFile = "D:\APMServ5.2.6\www\htdocs\pdfswf\pdf\a.pdf"
strswfFile = "D:\APMServ5.2.6\www\htdocs\pdfswf\swf\a.swf"
'命令行
strCmd = "D:\SWFTools\pdf2swf "&strpdfFile&" -o "&strswfFile&" -T 9 -f -s languagedir=D:\SWFTools\xpdf\xpdf-chinese-simplified"
'执行命令行
Dim objShell
Dim intSecceed
Set objShell = Server.CreateObject("WScript.Shell")
Response.Write(strCmd & "<hr>")
intSecceed = objShell.Run(strCmd,0,True)
If intSecceed = 0 Then
Response.Write("命令成功执行,返回码:" & intSecceed)
Else
Response.Write("命令执行失败,返回码:" & intSecceed)
End If
%>
Dim strpdfFile ' pdf的文件名
Dim strswfFile ' swf的文件名
Dim strCmd ' 命令行
strpdfFile = "D:\APMServ5.2.6\www\htdocs\pdfswf\pdf\a.pdf"
strswfFile = "D:\APMServ5.2.6\www\htdocs\pdfswf\swf\a.swf"
'命令行
strCmd = "D:\SWFTools\pdf2swf "&strpdfFile&" -o "&strswfFile&" -T 9 -f -s languagedir=D:\SWFTools\xpdf\xpdf-chinese-simplified"
'执行命令行
Dim objShell
Dim intSecceed
Set objShell = Server.CreateObject("WScript.Shell")
Response.Write(strCmd & "<hr>")
intSecceed = objShell.Run(strCmd,0,True)
If intSecceed = 0 Then
Response.Write("命令成功执行,返回码:" & intSecceed)
Else
Response.Write("命令执行失败,返回码:" & intSecceed)
End If
%>
[ 本帖最后由 thbwn 于 2010-9-15 19:33 编辑 ]