maltaisn / swf-convert Goto Github PK
View Code? Open in Web Editor NEWUtility to convert static SWF files to PDF or SVG
License: GNU Lesser General Public License v3.0
Utility to convert static SWF files to PDF or SVG
License: GNU Lesser General Public License v3.0
The program sometimes fail to convert some paths to the intermediate representation, so both SVG and PDF are affected.
This seems to be a common problem in many applications that convert SWF to SVG. The algorithm used by swf-convert was copied from the one used by as3swf. The result is that this file gets converted to the path seen in the first image (viewed from Inkscape with added stroke) while the second image is the expected output (viewed from Flash Player or Lightspark).
I searched for another algorithm, however all of the following open source programs produce the same wrong output:
I also asked for help on StackOverflow. It's entirely possible that there's currently no program able to reliably convert SWF shapes to SVG, in which case this issue will pretty much exist forever.
As far as i can understand the only way to pass file
command pdf file1 file2 file3 -o outpout1.pdf output2.pdf output3.pdf
, or i'll be prompted with the error message ERROR: Expected as many output files or directories as input.
Is there a way to pass only the list of input items with just one single output name ?
Hey, maltaisn, and thanks for the great tool!
Here's the issue -- this is a minimal example (only 160 bytes!):
There's just one frame, and the only thing on that frame is a thin horizontal line. No animations or anything else. When converting to PDF this bar is not rendered.
I am using v. 0.0.2, running command:
java -jar swf-convert.jar pdf bug.swf -o bug.pdf -t tmp
Adding "-DdrawShapeBounds" to the command options shows the green horizontal bar bounds where the line ought to be.
Adding "-DdisableClipping" rectifies the problem (!), so there must be some problem within the clipping algo (if the algo is just 1 pixel off somewhere it could be just enough to erase thin lines).
When running:
java -jar swf-convert.jar pdf "$SWF" -o "$PDF" -t "$TMPDIR"
where $SWF is a single file name and $PDF is also a single file name that contains a comma,
swf-convert exits with:
ERROR: Expected as many output files or directories as input.
Looks like a comma is searched for as a file separator.
can we do the same for swf's sprite, maltaisn? i don't have any code information, I don't even know how to run it. can you help?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.