brought up to date
[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 t1lib, freetype and jpeglib to compile pdf2swf.
28     Links:
29         freetype:
30          http://www.freetype.org
31         t1lib: 
32          ftp://sunsite.unc.edu/pub/linux/libs/graphics/t1lib-1.3.1.tar.gz
33         t1lib (mirrored here): 
34          http://www.quiss.org/swftools/t1lib-1.3.1.tar.gz
35         jpeglib: 
36          http://www.ijg.org/files/jpegsrc.v6b.tar.gz
37
38     Furthermore, if you want to compile avi2swf, you need the avifile library:
39         http://avifile.sourceforge.net
40     .
41
42 5.) when compiling the sourcecode version, configure doesn't find my jpeglib / my t1lib!
43
44     In case some of your libraries/include files are installed in /usr/local,
45     try the following:
46
47     rm -f config.cache
48     LDFLAGS="-L/usr/local/lib" CPPFLAGS="-I/usr/local/include" ./configure
49
50     Furthermore, a new installation of jpeglib (the following assumes it's in
51     /usr/local/lib) often requires doing a
52
53     ranlib /usr/local/lib/libjpeg.a
54     ldconfig /usr/local/lib
55
56     In order to install jpeglib, it's furthermore been remarked that you need
57     to do
58     make install-lib
59     make install-headers
60     .
61
62     If it still doesn't work, try removing the file "config.cache"
63     before running configure again.
64
65 6.) There are problems during compilation:
66     Error messages complain about "undefined reference to `operator new(unsigned)'"
67     as well as "undefined reference to `__gxx_personality_v0'".
68
69     Try running configure as
70
71     LDFLAGS=-lstdc++ ./configure
72
73 7.) How do I compile swftools on Mac OS X?
74
75     You need to get fink (http://fink.sourceforge.net), and install it.
76     After this, you need to install all the required libs (jpeg, freetype, lame):
77    
78     fink install libjpeg libjpeg-shlibs freetype2 freetype2-shlibs lame lame-shlibs
79
80     Then, you have to inform configure of where they are:
81
82     LDFLAGS="-L/sw/lib" CPPFLAGS="-I/sw/include -I/sw/include/lame" ./configure
83     make
84     sudo make install
85
86     If this doesn't work, especially if you want to use the python library and
87     get weird exceptions, try to remove all versions of jpeglib, freetype and 
88     lame from /usr/lib and /usr/local/lib, and then run configure / make / make install
89     again.
90
91     If you also want to use the python interface, you may have to copy the
92     Imaging headers (Imaging.h, ImPlatform.h, ImConfig.h) to
93       /System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/
94     before running configure.
95
96 8.) Is there a pdf2swf/avi2swf for Windows?
97
98     Windows versions of all SWF utilities are downloadable from
99         http://www.quiss.org/swftools/download.html
100     .
101     (There's a self-extracting .exe version of all versions since 0.6.1, 
102      and a .zip or .rar archive of the newest development snapshot)
103
104 9.) Where's the source code of the Windows version?
105
106     It's the same as the Unix source code. If you want to compile
107     under Windows, it's recommended that you get the CVS version
108     of the sources.
109     You need MingW (http://www.mingw.org) to compile it.
110     When cross-compiling under Linux, e.g. the following generates the Windows .exe files:
111
112     CXX=i386-mingw32msvc-g++ CPP=i386-mingw32msvc-cpp CC=i386-mingw32msvc-gcc \
113     ./configure --host=i586-mingw32msvc && make
114
115     For compiling on Windows itself, there's a HOWTO from Daichi Shinozaki:
116     http://lists.gnu.org/archive/html/swftools-common/2005-02/msg00023.html
117
118 10.) The fonts in the SWFs generated by pdf2swf are wrong!
119
120     Watch the output of pdf2swf closely.
121     You should see something like:
122
123       WARNING Font Myriad-Roman could not be loaded.
124       WARNING Try putting a TTF version of that font (named "Myriad-Roman.ttf") into /swftools/fonts
125
126     Provided you actually own the font in question (here: Myriad-Roman.ttf), 
127     you can copy that fonts into your current directory and pass 
128     the "-F ./" (--fontpath ./) option to pdf2swf. 
129     If you use a font in several PDFs, you can also simply copy it
130     to (on Windows) C:\SWFTools\Fonts\, or (on Unix) /usr/local/share/swftools/fonts 
131     to make it work all the time.
132
133 11.) Can png2swf handle transparency?
134
135     Yes. It supports PNG mode 2 transparency (256 color palettes with alpha) since version 0.4.2. 
136     Mode 6 (32 bit RGBA truecolor) is also supported since version 0.4.4.
137
138 12.) How to do Flash MX compression with SWFTools?
139
140     Most tools support the -z flag for outputting compressed SWF.
141     Furthermore you can compress/uncompress SWF files using swfcombine:
142
143         swfcombine -dz file.swf -o file_new.swf
144
145     compresses, while
146
147         swfcombine -d file.swf -o file_new.swf
148
149     decompresses.
150
151 13.) avi2swf converts my avi files upside down!
152
153     Try using the -p (--flip) switch.
154
155 14.) How to extract images/sounds from myfile.swf using swfextract?
156
157     First list all extractable items:
158
159         swfextract myfile.swf
160     
161     The result is something like:
162
163         Objects in file myfile.swf:
164          [-i] 3 Shapes: ID(s) 1-3
165          [-i] 5 MovieClips: ID(s) 4, 5, 8, 10, 12
166          [-j] 3 JPEGs: ID(s) 69, 116, 447
167          [-p] 1 PNG: ID(s) 318
168          [-s] 3 Sounds: ID(s) 28-30
169          [-f] 10 Frames: ID(s) 0-10
170
171     Now you can extract a shape using
172
173         swfextract -i 2 myfile.swf -o shape.swf
174
175     a sound using
176         
177         swfextract -s 28 myfile.swf -o sound.wav
178
179     a PNG image file using
180         
181         swfextract -p 318 myfile.swf -o file.png
182
183     etc.
184
185 15.) Is there a mailing list for SWFTools?
186
187     Yes there is. You can subscribe by going to
188     
189     http://mail.nongnu.org/mailman/listinfo/swftools-common
190
191 16.) Why didn't Matthias answer my swftools-related mail?
192
193     Currently, Matthias is getting much more mails than he can answer. It's frustrating,
194     but it's true.
195     He tries his best to at least *read* all mails he receives. 
196     If you need an answer to something, it's usually more effective to post it on the
197     mailing list, though, as there are a lot of friendly users around there which may 
198     have the one or other helpful tip concerning your problem.
199