Difference between revisions of "Third-party software integration: SWFTools"

From OpenKM Documentation
Jump to: navigation, search
Line 11: Line 11:
  
  
For extra configuration parameters:
+
'''For better performance configuration you can doing:'''
 +
 
 +
Create file pdf2swf_wrapper.sh
  
 
<source lang="bash">
 
<source lang="bash">
Line 44: Line 46:
  
 
  system.pdf2swf=c:/program files/swftools/pdf2swf.exe
 
  system.pdf2swf=c:/program files/swftools/pdf2swf.exe
 +
 +
 +
'''For better performance configuration you can doing:'''
 +
 +
Create file pdf2swf_wrapper.bat
 +
 +
<source lang="bash">
 +
c:\path\to\pdf2swf %1 %2 %3 -f -T 9 -t -G -s storeallcharacters
 +
</source>
 +
 +
The last 5 parameters specifies that:
 +
 +
* -f : Fonts should be embedded, improves searchability in the document
 +
* -T 9 : Sets the target flash version to 9, improves stability
 +
* -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:
 +
 +
<source lang="java">
 +
system.pdf2swf=c:/path/to/pdf2swf_wrapper.bat
 +
</source>
  
 
{{Note| Remember that JBoss must be restarted after any OpenKM.cfg modification.}}
 
{{Note| Remember that JBoss must be restarted after any OpenKM.cfg modification.}}

Revision as of 16:47, 23 September 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


For better performance configuration you can doing:

Create file pdf2swf_wrapper.sh

#!/bin/bash

/usr/bin/pdf2swf $* -f -T 9 -t -G -s storeallcharacters

The last 5 parameters specifies that:

  • -f : Fonts should be embedded, improves searchability in the document
  • -T 9 : Sets the target flash version to 9, improves stability
  • -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

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


For better performance configuration you can doing:

Create file pdf2swf_wrapper.bat

c:\path\to\pdf2swf %1 %2 %3 -f -T 9 -t -G -s storeallcharacters

The last 5 parameters specifies that:

  • -f : Fonts should be embedded, improves searchability in the document
  • -T 9 : Sets the target flash version to 9, improves stability
  • -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

Nota clasica.png Remember that JBoss must be restarted after any OpenKM.cfg modification.