added some more generic tag functions.
[swftools.git] / FAQ
1 1.) What's the cost of swftools?
2
3     SWFTools is free of charge, and is released under the GPL
4     (http://www.gnu.org/licenses/gpl.html).
5
6 2.) How to compile/link swftools on Unix/Linux/BSD?
7
8     Download swftools-0.x.x.tar.gz. Then type, on the
9     command-line:
10
11     tar -zvxf swftools-0.x.x.tar
12     cd swftools-0.x.x
13     ./configure
14     make 
15     make install
16
17     (you will have to be root for the last step)
18
19 3.) What libraries do I need to compile swftools on Unix/Linux/BSD?
20
21     You need t1lib, freetype and jpeglib to compile pdf2swf.
22     Links:
23         freetype:
24          http://www.freetype.org
25         t1lib: 
26          ftp://sunsite.unc.edu/pub/linux/libs/graphics/t1lib-1.3.1.tar.gz
27         t1lib (mirrored here): 
28          http://www.quiss.org/swftools/t1lib-1.3.1.tar.gz
29         jpeglib: 
30          http://www.ijg.org/files/jpegsrc.v6b.tar.gz
31
32     Furthermore, if you want to compile avi2swf, you need the avifile library:
33         http://avifile.sourceforge.net
34     .
35
36 4.) when compiling the sourcecode version, configure doesn't find my jpeglib / my t1lib!
37
38     In case some of your libraries/include files are installed in /usr/local,
39     try the following:
40
41     rm -f config.cache
42     LDFLAGS="-L/usr/local/lib" CPPFLAGS="-I/usr/local/include" ./configure
43
44     Furthermore, a new installation of jpeglib (the following assumes it's in
45     /usr/local/lib) often requires doing a
46
47     ranlib /usr/local/lib/libjpeg.a
48     ldconfig /usr/local/lib
49
50     If it still doesn't work, try removing the file "config.cache"
51     before running configure again.
52
53 5.) There are problems during compilation:
54     Error messages complain about "undefined reference to `operator new(unsigned)'"
55     as well as "undefined reference to `__gxx_personality_v0'".
56
57     Try running configure as
58
59     LDFLAGS=-lstdc++ ./configure
60
61 6.) How do I compile swftools on Mac OS X?
62
63     You need to get fink (http://fink.sourceforge.net), and install it.
64     After this, you need to install all the required libs (jpeg, freetype, lame):
65    
66     fink install libjpeg libjpeg-shlibs freetype2 freetype2-shlibs lame lame-shlibs
67
68     Then, you have to inform configure of where they are:
69
70     LDFLAGS="-L/sw/lib" CPPFLAGS="-I/sw/include -I/sw/include/lame" ./configure
71     make
72     sudo make install
73
74     If this doesn't work, especially if you want to use the python library and
75     get weird exceptions, try to remove all versions of jpeglib, freetype and 
76     lame from /usr/lib and /usr/local/lib, and then run configure/make/make install
77     again.
78
79 7.) Is there a pdf2swf/avi2swf for Windows?
80
81     Windows versions of all SWF utilities are downloadable from
82         http://www.quiss.org/swftools/download.html
83     .
84     (There's a self-extracting .exe version of all versions since 0.6.1, 
85      and a .zip or .rar archive of the newest development snapshot)
86     Notice: For now, the utilities need to be installed to C:\SWFTOOLS to make pdf2swf work-
87     otherwise it won't be able to find its fonts.
88
89 8.) Where's the source code of the Windows version?
90
91     It's the same as the Unix source code. If you want to compile
92     under Windows, it's recommended that you get the CVS version
93     of the sources.
94     You need MingW (http://www.mingw.org) to compile it.
95     When cross-compiling under Linux, e.g. the following generates the Windows .exe files:
96
97     CXX=i386-mingw32msvc-g++ CPP=i386-mingw32msvc-cpp CC=i386-mingw32msvc-gcc \
98     ./configure --host=i586-mingw32msvc && make
99
100 9.) The fonts in the SWFs generated by pdf2swf are wrong!
101
102     Watch the output of pdf2swf closely.
103     You should see something like:
104
105       WARNING Font Myriad-Roman could not be loaded.
106       WARNING Try putting a TTF version of that font (named "Myriad-Roman.ttf") into /swftools/fonts
107
108     Provided you actually own the font in question (here: Myriad-Roman.ttf), 
109     you can copy that fonts into your current directory and pass 
110     the "-F ./" (--fontpath ./) option to pdf2swf. 
111     If you use a page in several PDFs, you can also simply copy it
112     to (on Windows) C:\SWFTools\Fonts\, or (on Unix) /usr/local/share/swftools/fonts 
113     to make it work all the time.
114
115 10.) Can png2swf handle transparency?
116
117     It supports PNG mode 2 transparency (256 color palettes with alpha) since version 0.4.2. 
118     Mode 6 (32 bit RGBA truecolor) is also supported since version 0.4.4.
119
120 11.) How to do Flash MX compression with SWFTools?
121
122     Most tools support the -z flag for outputting compressed SWF.
123     Furthermore you can compress/uncompress SWF files using swfcombine:
124
125         swfcombine -dz file.swf -o file_new.swf
126
127     compresses, while
128
129         swfcombine -d file.swf -o file_new.swf
130
131     decompresses.
132
133 12.) avi2swf converts my avi files upside down!
134
135     Try using the -p (--flip) switch.
136
137 13.) How to extract images/sounds from myfile.swf using swfextract?
138
139     First list all extractable items:
140
141         swfextract myfile.swf
142     
143     The result is something like:
144
145         Objects in file myfile.swf:
146         3 Shapes: ID(s) 1-3
147         5 MovieClips: ID(s) 4, 5, 8, 10, 12
148         3 JPEGs: ID(s) 69, 116, 447
149         1 PNG: ID(s) 318
150         3 Sounds: ID(s) 28-30
151         10 Frames: ID(s) 0-10
152
153     Not you can extract a shape using
154
155         swfextract -i 2 myfile.swf -o shape.swf
156
157     a sound using
158         
159         swfextract -s 28 myfile.swf -o sound.wav
160
161     a PNG image file using
162         
163         swfextract -p 318 myfile.swf -o file.png
164
165     etc.
166
167 14.) Is there a mailing list for SWFTools?
168
169     Yes there is. You can subscribe by going to
170     
171     http://mail.nongnu.org/mailman/listinfo/swftools-common
172
173 15.) Where can I donate?
174
175     You can donate via PayPal by clicking on the "donate" button
176     on http://www.quiss.org/swftools/index.html
177     .
178     Any financial support for this project is most welcome!
179