pdf2swf -bl -o document.swf document.pdf
to link viewer and preloader.
However, the Steps below are still valid for jpeg2swf.
-
+
Step 1: Converting the documents
Suppose you have an arbitrary pdf file, "document.pdf".
use
jpeg2swf -o tmp.swf pic1.jpeg pic2.jpeg ...
and read on)
-
+
Step 2: Linking a viewer
Just take a viewer of your choice (e.g. [1]SimpleViewer.swf ) and put
swfcombine -o flashfile.swf SimpleViewer.swf viewport=tmp.swf
Now, 'flashfile.swf' is "browsable", i.e. there are some buttons in it
for turning pages.
-
+
Step 3: Linking a Preloader
Depending on the size of your PDFs/SWFs, you may want to have some
swfcombine -o flashfile.swf PreLoader.swf -x 3000 -y 3000
loader=loading.swf movie=flashfile.swf
and try playing around with the values after -x and -y)
-
+
Step 4: Correcting the size and framerate
Sometimes, the bounding box of the generated flash file is not
Use:
swfcombine --dummy `swfdump -r loading.swf` flashfile.swf -o
flashfile.swf
-
+
Step 5: Embedding the SWF into a html page
Usually, one wants to put the generated SWFs on his web page. To do
Also, you can simply type
swfdump --html flashfile.swf
and insert the output into your html document
-
+
Appendix A: Creating your own Viewers
If you know about Flash, and you want to substitute SimpleViewer from
1. There has to be some rectangle (Movieclip, whatever... ) in your
Viewer, named "viewport". (This name is used to reference the object
when using swfcombine for merging it with the converted pdfs)
- 2. Browsing buttons next to the rectangle (which turn pages in the
+ 2. The First frame should contain an actionscript "Stop" instruction.
+ (Otherwise, the browsing buttons turn pages, but pages get also
+ automatically turned every few seconds)
+ 3. Browsing buttons next to the rectangle (which turn pages in the
shown pdf) should trigger some Actionsscript events, like
-
+
SetTarget "viewport"
NextFrame
SetTarget ""
-
+
to set the frame in the to-be-replaced rectangle. (It will be replaced
with a MovieClip, therefore a SetTarget is neccessary)
It's important that the Target Name ist "viewport", not "/viewport",
- as the Movie will get inserted into a Movieclip.
+ as the Movie will get inserted into a Movieclip (Sprite).
_________________________________________________________________
-
+
[5]Back to the SWFTools Project page
+
References
+ Visible links
1. http://www.quiss.org/swftools/SimpleViewer.swf
2. http://www.quiss.org/swftools/PreLoader.swf
3. http://www.quiss.org/swftools/loading.swf
4. http://www.macromedia.com/support/flash/ts/documents/tn4150.html
5. http://www.quiss.org/swftools
+
+
+