• Can't preview word documents, PDF2swf fails

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #43411  by dxider
 
Basically, I'm having problems to be able to preview word documents.
When the server tries to perform the pdf2swf conversion, there are several error in the application log.

This is an extract of the log:
Code: Select all
2017-03-14 23:50:37,662 [http-apr-0.0.0.0-8082-exec-2] INFO com.openkm.spring.LoggerListener- Authentication ERROR: okAdmin
2017-03-14 23:51:15,850 [http-apr-0.0.0.0-8082-exec-1] INFO com.openkm.vernum.VersionNumerationFactory- VersionNumerationAdapter: com.openkm.vernum.MajorMinorVersionNumerationAdapter
2017-03-14 23:53:31,398 [http-apr-0.0.0.0-8082-exec-10] WARN com.openkm.util.ExecutionUtils- Abnormal program termination: 1
2017-03-14 23:53:31,398 [http-apr-0.0.0.0-8082-exec-10] WARN com.openkm.util.ExecutionUtils- CommandLine: [C:/tomcat/bin/pdf2swf.exe, -T, 9, -f, c:\tomcat\repository\cache\pdf\3fd264e9-8cfa-43e7-8ac4-1ee5b289af4b.pdf, -o, c:\tomcat\repository\cache\swf\3fd264e9-8cfa-43e7-8ac4-1ee5b289af4b.swf]
2017-03-14 23:53:31,398 [http-apr-0.0.0.0-8082-exec-10] WARN com.openkm.util.ExecutionUtils- STDERR: Error: May not be a PDF file (continuing anyway)
Error: PDF file is damaged - attempting to reconstruct xref table...
Error: Couldn't find trailer dictionary
Error: Couldn't read xref table
What I've seen so far, is that parameter mapping is failing, because as you can see, each parameter passed to the CommandLine is separated with commas, instead of just spaces, this is the configuration setting I have:
Code: Select all
C:/tomcat/bin/pdf2swf.exe -T 9 -f ${fileIn} -o ${fileOut}
[See attached picture with configuration and error]
So, the CommandLine must parse something like this:
Code: Select all
 [C:/tomcat/bin/pdf2swf.exe -T 9 -f c:\tomcat\repository\cache\pdf\3fd264e9-8cfa-43e7-8ac4-1ee5b289af4b.pdf -o c:\tomcat\repository\cache\swf\3fd264e9-8cfa-43e7-8ac4-1ee5b289af4b.swf]
I don't know why the server add the extra "commas" to the command line, making it fail.
I'm working with a Windows 2012 Server R2.
Attachments
Error log
Error log
kms2.png (90.47 KiB) Viewed 1850 times
Settings
Settings
kms.png (13.96 KiB) Viewed 1850 times

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.