湘潭赵氏族谱网>>小憩驿站

 主题:如何转换SWF转为pdf

赵永红  发表于2018-05-21 14:25:08.0


 

试过格式工厂,较傻,不行。

先装好Adobe nbsp;Flash nbsp;Player
1、网上下个SWFToImageLibrary.exe(可惜win10不行,只能xp)
2、将以下代码保存为Convert nbsp;all nbsp;SWFs nbsp;to nbsp;JPG.vbs
' nbsp;This nbsp;example nbsp;converts nbsp;all nbsp;SWF nbsp;files nbsp;in nbsp;the nbsp;folder nbsp;into nbsp;JPG nbsp;image nbsp;files
' nbsp;Copy nbsp;this nbsp;script nbsp;to nbsp;the nbsp;folder nbsp;with nbsp;SWF nbsp;flash nbsp;movies nbsp;and nbsp;run nbsp;it
' nbsp;Script nbsp;will nbsp;generate nbsp;JPG nbsp;image nbsp;files nbsp;using nbsp;extracted nbsp;frames nbsp;from nbsp;SWF

nbsp; nbsp;Set nbsp;SWFToImage nbsp;= nbsp;CreateObject("SWFToImage.SWFToImageObject")

nbsp; nbsp;SWFToImage.InitLibrary nbsp;"demo", nbsp;"demo"

nbsp; nbsp;Dim nbsp;WshShell, nbsp;fs, nbsp;f, nbsp;fc, nbsp;f1, nbsp;tsFile, nbsp;index, nbsp;outFile
nbsp; nbsp;Set nbsp;WshShell nbsp;= nbsp;WScript.CreateObject("WScript.Shell")

nbsp; nbsp;sCurrentFolder nbsp;= nbsp;WshShell.CurrentDirectory

nbsp; nbsp;Set nbsp;fs nbsp;= nbsp;CreateObject("Scripting.FileSystemObject")
nbsp; nbsp;Set nbsp;f nbsp;= nbsp;fs.GetFolder(sCurrentFolder) nbsp;' nbsp;current nbsp;directory
nbsp; nbsp;Set nbsp;fc nbsp;= nbsp;f.Files

' nbsp;converting nbsp;SWF nbsp;files nbsp;to nbsp;JPG nbsp;image nbsp;files
For nbsp;Each nbsp;f1 nbsp;in nbsp;fc
nbsp;index=InstrRev(f1.name, nbsp;".")
nbsp;outFile=Mid(f1.name, nbsp;1, nbsp;index nbsp;- nbsp;1) nbsp; amp; nbsp;".jpg"

nbsp;if nbsp;fs.FileExists(outFile) nbsp;then
nbsp;else
nbsp; nbsp;if nbsp;UCase(Mid(f1.name,index nbsp;+ nbsp;1 nbsp;)) nbsp;= nbsp;"SWF" nbsp;then nbsp;
nbsp; nbsp; nbsp; nbsp;SWFToImage.InputSWFFileName nbsp;= nbsp;f1.name
nbsp; nbsp; nbsp; nbsp;SWFToImage.FrameIndex nbsp;= nbsp;0 nbsp;' nbsp;number nbsp;of nbsp;frame nbsp;to nbsp;extract
nbsp; nbsp; nbsp; nbsp;SWFToImage.ImageOutputType nbsp;= nbsp;1 nbsp;' nbsp;set nbsp;output nbsp;image nbsp;type nbsp;to nbsp;Jpeg nbsp;(0 nbsp;= nbsp;BMP, nbsp;1 nbsp;= nbsp;JPG, nbsp;2 nbsp;= nbsp;GIF)


nbsp; nbsp; nbsp; nbsp;SWFToImage.JPEGQuality=100
' nbsp; nbsp; nbsp; nbsp;SWFToImage.ImageWidth=985
' nbsp; nbsp; nbsp; nbsp;SWFToImage.ImageHeight=829

nbsp; nbsp; nbsp; nbsp;SWFToImage.Execute nbsp;
nbsp; nbsp; nbsp; nbsp;SWFToImage.SaveToFile nbsp;outFile
nbsp; nbsp;End nbsp;If
nbsp;End nbsp;If
Next
nbsp; nbsp;
Set nbsp;SWFToImage nbsp;= nbsp;nothing

nbsp; nbsp;Set nbsp;fs nbsp;= nbsp;Nothing

3、将要转换的swf放入该目录

4、运行Convert nbsp;all nbsp;SWFs nbsp;to nbsp;JPG.vbs

5、使用pdf制作软件即可将jpg转换



 


用图文帖子回复 用所见即所得帖子回复
用 户 名           密 码     新用户注册
标    题  
标题图标  
无图标 原创 转贴 文章 问题 主意 请进 注意
你好 赞扬 反对 喜欢 不爽 有趣 无聊 好奇 疲倦
摆谱 高兴 忧愁 吐舌 发愁 挤眼 生气 大笑 大哭
晕倒 弱智 急死 鬼脸 羞涩 傻笑 伤心 痛苦 恶魔
帖子内容