Configuring SWFTools
Esta página aún no está disponible en tu idioma.
By default the application comes with tomcat bundled with SWFTools that is pre-configured.
Ubuntu
Section titled “Ubuntu”sudo add-apt-repository ppa:guilhem-fr/swftoolssudo apt-get updatesudo apt-get install swftoolsImproving Performance:
Section titled “Improving Performance:”For better performance, use the following configuration.
| Property | Description |
|---|---|
| system.swftools.pdf2swf | Pdf2swf tool used to convert PDF documents to SWF. /usr/bin/pdf2swf -T 9 -f -t -G -s storeallcharacters ${fileIn} -o ${fileOut} |
The parameters specify that:
- -f : Fonts should be embedded, improves searchability in the document
- -t : Inserts a stop between each frame, improves stability
- -G : Makes the document smaller and faster to render
- -s storeallcharacters : Stores all character information about the texts in the document, improves searchability
Red Hat and CentOS
Section titled “Red Hat and CentOS”It is better to compile version 0.9.x
yum install zlib-devel libjpeg-devel giflib-devel freetype-devel gcc gcc-c++wget http://www.swftools.org/swftools-0.9.1.tar.gztar xzf swftools-0.9.1.tar.gzcd swftools-0.9.1./configure --prefix=/usr/localmakemake installImproving Performance:
Section titled “Improving Performance:”For better performance, use the following configuration.
| Property | Description |
|---|---|
| system.swftools.pdf2swf | Pdf2swf tool used to convert PDF documents to SWF. /usr/bin/pdf2swf -T 9 -f -t -G -s storeallcharacters ${fileIn} -o ${fileOut} |
The parameters specify that:
- -f : Fonts should be embedded, improves searchability in the document
- -t : Inserts a stop between each frame, improves stability
- -G : Makes the document smaller and faster to render
- -s storeallcharacters : Stores all character information about the texts in the document, improves searchability
Debian
Section titled “Debian”This package is not include in the Debian repositories, so you need to compile from source:
aptitude install build-essential libgif-dev xpdf libfreetype6 libfreetype6-dev libjpeg62 libjpeg8 libjpeg8-devwget http://www.swftools.org/swftools-0.9.1.tar.gztar xzf swftools-0.9.1.tar.gzcd swftools-0.9.1./configure --prefix=/usr/localmakemake installImproving Performance:
Section titled “Improving Performance:”For better performance, use the following configuration.
| Property | Description |
|---|---|
| system.swftools.pdf2swf | Pdf2swf tool used to convert PDF documents to SWF. /usr/bin/pdf2swf -T 9 -f -t -G -s storeallcharacters ${fileIn} -o ${fileOut} |
The parameters specify that:
- -f : Fonts should be embedded, improves searchability in the document
- -t : Inserts a stop between each frame, improves stability
- -G : Makes the document smaller and faster to render
- -s storeallcharacters : Stores all character information about the texts in the document, improves searchability
Windows
Section titled “Windows”Download the latest Swftools from http://www.swftools.org/download.html and install it (for example at c:\tomcat-7.0.61\tools\swftools).
Improving Performance:
Section titled “Improving Performance:”For better performance, use the following configuration.
| Property | Description |
|---|---|
| system.swftools.pdf2swf | Pdf2swf tool used to convert PDF documents to swf. c:\tomcat-7.0.61\tools\swftools\pdf2swf.exe -T 9 -f -t -G -s storeallcharacters ${fileIn} -o ${fileOut} |
The parameters specifies that:
- -f : Fonts should be embedded, improves searchability in the document
- -t : Inserts a stop between each frame, improves stability
- -G : Makes the document smaller and faster to render
- -s storeallcharacters : Stores all character information about the texts in the document, improves searchability
Troubleshooting
Section titled “Troubleshooting”Conversion problems with big files
Section titled “Conversion problems with big files”If the document is large (has many pages) or is complex, the conversion may fail with this error:
You can workaround this error adding the -s poly2bitmap parameter which convert graphics to bitmaps:
| Property | Description |
|---|---|
| system.swftools.pdf2swf | /usr/bin/pdf2swf -T 9 -f -t -G -s poly2bitmap -s storeallcharacters ${fileIn} -o ${fileOut} |
Segmentation fault (core dumpled)
Section titled “Segmentation fault (core dumpled)”This is a log of a segmentation fault error:
/home/openkm/tomcat-7.0.61/bin/pdf2swf -f -T 9 -t -s storeallcharacters input.pdf -o output.swfNOTICE processing PDF page 1 (878x1105:0:0) (move:0:0)NOTICE File contains formsNOTICE File contains pbm picturesNOTICE File contains soft masksWARNING multiply blended transparency groups not yet supported!NOTICE File contains transparency groupsSegmentation fault (core dumped)You can try the -s poly2bitmap or -s bitmap arguments. In our experience it seems the bitmap option is more reliable for fixing display issues, but of course you decimate any text, and in some cases increases file size and processing time. You can also add the -s multiply=4 the bitmap argument to get a really crisp bitmap output further increasing size and processing time, but gets you pretty close to the original PDF.
/home/openkm/tomcat-7.0.61/bin/pdf2swf -f -T 9 -t -s bitmap -s storeallcharacters input.pdf -o output.swfNOTICE processing PDF page 1 (878x1105:0:0) (move:0:0)NOTICE Writing SWF file output.swfError with copy protected PDF
Section titled “Error with copy protected PDF”Perhaps the PDF is copy protected. Hence, you’re not allowed to convert it.
If you created this PDF using Acrobat Distiller, try switching the copy protection checkbox off. If you can’t disable the protection you can modify the ’pdf2swf source code to disable this check (see http://www.foolabs.com/xpdf/cracking.html).