"pdf2swf" - Convert PDF to SWF

This section provides a tutorial example on how to convert a PDF of a book into a SWF file so that it can be embedded in a Web page using the PDF2SWF tool.

To testing PDF2SWF, I used the PDF version of my JavaScript book "JavaScript Tutorials - Herong's Tutorial Examples", herong_book_JavaScript.pdf:

C:\herong>\local\SWFTools\pdf2swf -p 1-7 herong_book_JavaScript.pdf

NOTICE  Output filename not given. Writing to herong_book_JavaScri...
NOTICE  processing PDF page 1 (576x792:0:0) (move:0:0)
NOTICE  File contains pbm pictures
NOTICE  processing PDF page 2 (576x792:0:0) (move:0:0)
NOTICE  File contains links
NOTICE  processing PDF page 3 (576x792:0:0) (move:0:0)
NOTICE  processing PDF page 4 (576x792:0:0) (move:0:0)
NOTICE  processing PDF page 5 (576x792:0:0) (move:0:0)
NOTICE  processing PDF page 6 (576x792:0:0) (move:0:0)
NOTICE  processing PDF page 7 (576x792:0:0) (move:0:0)
NOTICE  Writing SWF file herong_book_JavaScript.swf

The output message is useful:

The header information of the output file herong_book_JavaScript.swf is:

C:\herong>\local\SWFTools\swfdump herong_book_JavaScript.swf | more
[HEADER]        File version: 6
[HEADER]        File is zlib compressed. Ratio: 54%
[HEADER]        File size: 95453
[HEADER]        Frame rate: 0.250000
[HEADER]        Frame count: 7
[HEADER]        Movie width: 576.00
[HEADER]        Movie height: 792.00
[009]         3 SETBACKGROUNDCOLOR (ff/ff/ff)

Notice that the frame rate is 0.25 frame per second, or 1 frame per 4 seconds.

When I embedded herong_book_JavaScript.swf in a Web page, I saw that my book page frames were played 1 page every 4 seconds like a slide show! There was no way for me to navigate through those page frames.

Read the next section on how to add navigation controls to herong_book_JavaScript.swf.

Last update: 2014.

Table of Contents

 About This Book

 Introduction of Adobe Flash

 Adobe Flash Player Plugin for Firefox

 Adobe Flash Player Plugin for Chrome

 Adobe Flash Player Plugin for Safari

 Adobe Flash Player ActiveX for IE

 Using "object" Elements for Flash Files

 Using "embed" Elements for Flash Files

 "mp3player" - MP3 Music Player

 SWFObject - Hidding "object" behind JavaScript

 Flash Player Projector

SWFTools - SWF File Manipulation Tools

 What Is SWFTools?

 Downloading and installing SWFTools

 SWFDump - SWF File Dump Tool

 "swfdump" - Dump SWF File Header

 "swfdump -E" - Generate HTML Code

 JPEG2SWF - JPEG to SWF File Conversion Tool

 "jpeg2swf *.jpg" - Create a Slide Show

 PDF2SWF - PDF to SWF File Conversion Tool

"pdf2swf" - Convert PDF to SWF

 "master and slave" - Viewer and Page Frames

 SWFCombine - SWF File Merging Tool

 "swfcombine masterfile viewpoint=slavefile"

 "swfcombine -a" - Concatenate SWF Files

 "swfcombine -d" - Change Frame Rate and Size

 SWFC Script to Generate Flash SWF Files

 ActionScript Embedded in SWFC Script

 AS3Compile - ActionScript 3 Compiler

 Adobe Flex SDK 4

 SWF File Struture and Tags

 SWF File Processing Rules

 SWF Files for Video and Audio Streams

 Outdated Tutorials


 PDF Printing Version