polygon intersector: added horizontal line reconstruction
[swftools.git] / FAQ
1 1.) What's the price of swftools?
2
3     SWFTools is free of charge (donations are welcome, though), and is 
4     released under the GPL (http://www.gnu.org/licenses/gpl.html).
5
6 2.) Where can I donate?
7
8     You can donate via PayPal by clicking on the "donate" button
9     on http://www.swftools.org/donate.html
10     .
11
12 3.) How to compile/link swftools on Unix/Linux/BSD?
13
14     Download swftools-0.x.x.tar.gz. Then type, on the
15     command-line:
16
17     tar -zvxf swftools-0.x.x.tar
18     cd swftools-0.x.x
19     ./configure
20     make 
21     make install
22
23     (you will have to be root for the last step)
24
25 4.) What libraries do I need to compile swftools on Unix/Linux/BSD?
26
27     You need freetype and jpeglib to compile pdf2swf.
28     Links:
29         freetype:
30          http://www.freetype.org
31         jpeglib: 
32          http://www.ijg.org/files/jpegsrc.v6b.tar.gz
33
34 5.) when compiling the sourcecode version, configure doesn't find my jpeglib!
35
36     In case some of your libraries/include files are installed in /usr/local,
37     try the following:
38
39     rm -f config.cache
40     LDFLAGS="-L/usr/local/lib" CPPFLAGS="-I/usr/local/include" ./configure
41
42     Furthermore, a new installation of jpeglib (the following assumes it's in
43     /usr/local/lib) often requires doing a
44
45     ranlib /usr/local/lib/libjpeg.a
46     ldconfig /usr/local/lib
47
48     In order to install jpeglib, it's furthermore been remarked that you need
49     to do
50     make install-lib
51     make install-headers
52     .
53
54     If it still doesn't work, try removing the file "config.cache"
55     before running configure again.
56
57 6.) There are problems during compilation:
58     Error messages complain about "undefined reference to `operator new(unsigned)'"
59     as well as "undefined reference to `__gxx_personality_v0'".
60
61     Try running configure as
62
63     LDFLAGS=-lstdc++ ./configure
64
65 7.) How do I compile swftools on Mac OS X?
66
67     You need to get fink (http://fink.sourceforge.net), and install it.
68     After this, you need to install all the required libs (jpeg, freetype, lame):
69    
70     fink install libjpeg libjpeg-shlibs freetype2 freetype2-shlibs lame lame-shlibs
71
72     Then, you have to inform configure of where they are:
73
74     LDFLAGS="-L/sw/lib" CPPFLAGS="-I/sw/include -I/sw/include/lame" ./configure
75     make
76     sudo make install
77
78     If this doesn't work, especially if you want to use the python library and
79     get weird exceptions, try to remove all versions of jpeglib, freetype and 
80     lame from /usr/lib and /usr/local/lib, and then run configure / make / make install
81     again.
82
83     If you also want to use the python interface, you may have to copy the
84     Imaging headers (Imaging.h, ImPlatform.h, ImConfig.h) to
85       /System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/
86     before running configure.
87
88 8.) Is there a pdf2swf/avi2swf for Windows?
89
90     Windows versions of all SWF utilities are downloadable from
91         http://www.quiss.org/swftools/download.html
92     .
93     (There's a self-extracting .exe version of all versions since 0.6.1, 
94      and a .zip or .rar archive of the newest development snapshot)
95
96 9.) Where's the source code of the Windows version?
97
98     It's the same as the Unix source code. If you want to compile
99     under Windows, it's recommended that you get the CVS version
100     of the sources.
101     You need MingW (http://www.mingw.org) to compile it.
102     When cross-compiling under Linux, e.g. the following generates the Windows .exe files:
103
104     CXX=i386-mingw32msvc-g++ CPP=i386-mingw32msvc-cpp CC=i386-mingw32msvc-gcc \
105     ./configure --host=i586-mingw32msvc && make
106
107     For compiling on Windows itself, there's a HOWTO from Daichi Shinozaki:
108     http://lists.gnu.org/archive/html/swftools-common/2005-02/msg00023.html
109
110 10.) The fonts in the SWFs generated by pdf2swf are wrong!
111
112     Watch the output of pdf2swf closely.
113     You should see something like:
114
115       WARNING Font Myriad-Roman could not be loaded.
116       WARNING Try putting a TTF version of that font (named "Myriad-Roman.ttf") into /swftools/fonts
117
118     Provided you actually own the font in question (here: Myriad-Roman.ttf), 
119     you can copy that fonts into your current directory and pass 
120     the "-F ./" (--fontpath ./) option to pdf2swf. 
121     If you use a font in several PDFs, you can also simply copy it
122     to (on Windows) C:\SWFTools\Fonts\, or (on Unix) /usr/local/share/swftools/fonts 
123     to make it work all the time.
124
125 11.) Can png2swf handle transparency?
126
127     Yes. It supports PNG mode 2 transparency (256 color palettes with alpha) since version 0.4.2. 
128     Mode 6 (32 bit RGBA truecolor) is also supported since version 0.4.4.
129
130 12.) How to do Flash MX compression with SWFTools?
131
132     Most tools support the -z flag for outputting compressed SWF.
133     Furthermore you can compress/uncompress SWF files using swfcombine:
134
135         swfcombine -dz file.swf -o file_new.swf
136
137     compresses, while
138
139         swfcombine -d file.swf -o file_new.swf
140
141     decompresses.
142
143 13.) avi2swf converts my avi files upside down!
144
145     Try using the -p (--flip) switch.
146
147 14.) How to extract images/sounds from myfile.swf using swfextract?
148
149     First list all extractable items:
150
151         swfextract myfile.swf
152     
153     The result is something like:
154
155         Objects in file myfile.swf:
156          [-i] 3 Shapes: ID(s) 1-3
157          [-i] 5 MovieClips: ID(s) 4, 5, 8, 10, 12
158          [-j] 3 JPEGs: ID(s) 69, 116, 447
159          [-p] 1 PNG: ID(s) 318
160          [-s] 3 Sounds: ID(s) 28-30
161          [-f] 10 Frames: ID(s) 0-10
162
163     Now you can extract a shape using
164
165         swfextract -i 2 myfile.swf -o shape.swf
166
167     a sound using
168         
169         swfextract -s 28 myfile.swf -o sound.wav
170
171     a PNG image file using
172         
173         swfextract -p 318 myfile.swf -o file.png
174
175     etc.
176
177 15.) Is there a mailing list for SWFTools?
178
179     Yes there is. You can subscribe by going to
180     
181     http://mail.nongnu.org/mailman/listinfo/swftools-common
182
183 16.) Why didn't Matthias answer my swftools-related mail?
184
185     Currently, Matthias is getting much more mails than he can answer. It's frustrating,
186     but it's true.
187     He tries his best to at least *read* all mails he receives. 
188     If you need an answer to something, it's usually more effective to post it on the
189     mailing list, though, as there are a lot of friendly users around there which may 
190     have the one or other helpful tip concerning your problem.
191
192 16.) When will feature/bugfix/enhancement XY be implemented?
193
194     Setting deadlines in a non-commercial, spare-time project like swftools tools is hard,
195     and keeping them is even harder, if not impossible. 
196
197     Therefore, do not ask about deadlines, and you won't get fuzzy, or even wrong, answers.
198
199 17.) How to compile avi2swf?
200
201     avi2swf isn't part of the swftools distribution anymore. If you want to convert avi files
202     to swf, please use either mencoder or ffmpeg:
203
204     mencoder file.avi -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames \
205                       -ffourcc FLV1 -oac mp3lame -of lavf -ovc lavc \
206                       -lavcopts vcodec=flv:acodec=mp3:vbitrate=500:abitrate=56 -srate 22050  \
207                       -o file.swf
208
209     or
210
211     ffmpeg -i video.mpg -b <bitrate> -s <X>y<Y> -pass 1 -passlogfile log_file video.flv
212     ffmpeg -i video.mpg -b <bitrate> -s <X>y<Y> -pass 2 -passlogfile log_file video.flv
213     flvtool2 -UP video.flv
214
215 18.) How can I create transparent SWFs from PDFs?
216
217     Run pdf2swf as usual, and then, on the resulting file, execute:
218
219         swfextract -i 3- file.swf -o file.swf
220
221 19.) How can I convert SWF frames to bitmap?
222
223     There's a "swfrender" utility in the CVS, which isn't finished yet,
224     and will only work for *very* simple SWF files. (No Actionscript, no
225     gradient fills, no morph shapes, no blending modes, no filters, etc.)
226     Probably other Flash Open-Source projects (like Gnash) have some
227     more sophisticated utilities for this. (One user reported that
228     swfdec (http://swfdec.freedesktop.org/wiki/) and pyswfdec 
229     (http://www.gnome.org/~gianmt) work good)
230     If you find other tools that work, I'd like to know about it. 
231     Please mail me at kramm@quiss.org.