I am using windows 7 X64.
I have installed Adobe Acrobat, so that I have a virtual PDF printer. I have also install the adobe flash player on the system.
I open the SWF file using the flash player, and from the flash player I can print the file to PDF.
I wonder if that is possible to repeat the process for a folder of SWF files.
During the "print" process, the PDF printer asks for a file name, which I want to use the file name from the SWF file. I hope this can be automated as well.
Thanks!
Best Answer
I was looking for the same thing. Well, I couldn't find any specific library to this job either. But at the very least we will be able to automate this process using GUI automation tools.
There are lots of libraries and standalone applications for this job. One that seems promising to me is Autoit.
But as a Python fan I found this amazing library called pywinauto and wrote the following script to convert my swf files:
This method has its own limitations. For example you won't be able to use your computer during the conversion process as mouse and keyboard are controlled by the script. The script needs adjustments for individual computers. Also the GUI controlling process is supposed to be a lot slower than a CLI application designed to do the same job. However this is still far easier and faster than converting them manually.
P.S. I can't help but to mention Sikuli. Another amazing python library for GUI automation.
Update
The above method produces vector graphics, but if anyone is interested in rasterized .png files (which can be easily converted to pdf using freely available tools), they may want to try
swfrender
from swftools package. Currently, the latest stable binary version available for Windows is 0.9.0 (2009-07-21). But I recommend trying the development snapshotswftools-2013-04-09-1007.exe
which offers some more options including the option-r
which is used to adjust the resolution of the output file.