Difference between revisions of "Third-party software integration: SWFTools"
(→Improving performance) |
|||
Line 1: | Line 1: | ||
− | To enable preview UI tab, OpenKM need to convert pdf files to swf. | + | To enable preview UI tab, OpenKM need to convert pdf files to swf. |
== Linux == | == Linux == | ||
Line 54: | Line 54: | ||
{{Note|Take a look at [http://wiki.swftools.org/index.php/Pdf2swf pdf2swf wiki] for complete parameters reference, and remember that JBoss must be restarted after any OpenKM.cfg modification.}} | {{Note|Take a look at [http://wiki.swftools.org/index.php/Pdf2swf pdf2swf wiki] for complete parameters reference, and remember that JBoss must be restarted after any OpenKM.cfg modification.}} | ||
+ | |||
+ | See also [[Troubleshooting#Some_PDF_file_not_shown_in_preview|Troubleshooting: Some PDF file not shown in preview]]. | ||
== Windows == | == Windows == | ||
Line 83: | Line 85: | ||
{{Note|Take a look at [http://wiki.swftools.org/index.php/Pdf2swf pdf2swf wiki] for complete parameters reference, and remember that JBoss must be restarted after any OpenKM.cfg modification.}} | {{Note|Take a look at [http://wiki.swftools.org/index.php/Pdf2swf pdf2swf wiki] for complete parameters reference, and remember that JBoss must be restarted after any OpenKM.cfg modification.}} | ||
+ | |||
+ | See also [[Troubleshooting#Some_PDF_file_not_shown_in_preview|Troubleshooting: Some PDF file not shown in preview]]. | ||
[[Category: Installation Guide]] | [[Category: Installation Guide]] | ||
[[Category:OKM Network]] | [[Category:OKM Network]] |
Revision as of 10:10, 4 November 2010
To enable preview UI tab, OpenKM need to convert pdf files to swf.
Linux
Swftools can be installed running in terminal:
$ sudo aptitude install swftools
Enable in OpenKM.cfg
system.pdf2swf=/usr/bin/pdf2swf
In Ubuntu 10.04 is possible you need to add this line to /etc/apt/sources.list
deb http://archive.canonical.com/ubuntu lucid partner |
In Ubuntu 10.10 this package is not included, so you need to compile it or grab from https://launchpad.net/~tldm217/+archive/coba. |
Red hat
Better if you 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.gz tar xzf swftools-0.9.1.tar.gz cd swftools-0.9.1 ./configure make make install
Improving performance
For better performance, use this configuration. Create file pdf2swf_wrapper.sh
#!/bin/bash
/usr/bin/pdf2swf $* -f -t -G -s storeallcharacters
The last 5 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
Make it executable:
$ chmod +x pdf2swf_wrapper.sh
And don't forget to change the OpenKM.cfg file:
system.pdf2swf=/path/to/pdf2swf_wrapper.sh
Take a look at pdf2swf wiki for complete parameters reference, and remember that JBoss must be restarted after any OpenKM.cfg modification. |
See also Troubleshooting: Some PDF file not shown in preview.
Windows
Donwload last swftools http://www.swftools.org/download.html and install it.
Enable in OpenKM.cfg ( put this character to indicate path separator "/" not "\" )
system.pdf2swf=c:/program files/swftools/pdf2swf.exe
Improving performance
For better performance in conversion, create file pdf2swf_wrapper.bat
c:\path\to\pdf2swf %1 %2 %3 -f -t -G -s storeallcharacters
The last 5 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
And don't forget to change the OpenKM.cfg file:
system.pdf2swf=c:/path/to/pdf2swf_wrapper.bat
Take a look at pdf2swf wiki for complete parameters reference, and remember that JBoss must be restarted after any OpenKM.cfg modification. |
See also Troubleshooting: Some PDF file not shown in preview.