• 5.0.2 Mac OS X Server (10.6) & PDF Preview

  • Problems with installing OpenKM? No problemo, the solution is closer than you think.
Problems with installing OpenKM? No problemo, the solution is closer than you think.
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.
 #9060  by joako
 
Hi all,

I've installed for evaluation OpenKM on Linux and now closer to production I wish to evaluate the same on Mac OS X Server mainly to see if it's viable to run on this platform, i've installed it and almost everything is working great, one thing I could not find documented is how to setup OpenOffice for MacOS X, the correct way is:
Code: Select all
system.openoffice.path=/Applications/OpenOffice.org.app/Contents
system.openoffice.tasks=5
system.openoffice.port=8100
Despite if you have the "correct" directory you are given an error that "soffice.bin" is not in that directory, very odd, but it works as above and when launching OpenKM you will see OpenOffice.org load in the MacOS dock.

But still I can not preview .PDF files, the errors are as follows:
Code: Select all
00:43:38,458 WARN  [DocConverter] Abnormal program termination: {}139
00:43:38,459 WARN  [DocConverter] STDERR: 
00:43:38,460 ERROR [OKMDownloadServlet] /jboss-4.2.3.GA/cache/swf/e3984e34-aca8-44a0-9506-656d5b97b89d.swf (No such file or directory)
java.io.FileNotFoundException: /jboss-4.2.3.GA/cache/swf/e3984e34-aca8-44a0-9506-656d5b97b89d.swf (No such file or directory)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:106)
	at com.openkm.frontend.server.OKMDownloadServlet.service(OKMDownloadServlet.java:171)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
	at java.lang.Thread.run(Thread.java:680)
 #9062  by joako
 
So I am doing some further testing and it seems some PDF files will show a preview. If I download a .docx from OpenKM as PDF and upload it I can view the preview.
 #9083  by jllort
 
Somes files are previewed and other not, is that ?
Any version or file type of the non previewed documents ?
 #9098  by joako
 
Some PDF files can be previewed while other PDF files can not.

Now I see the problem more clearly, using a file that fails to preview in OpenKM:
Code: Select all
macserver:~ joako$ pdf2swf /About\ Stacks.pdf 
NOTICE  Output filename not given. Writing to /About Stacks.swf
NOTICE  processing PDF page 1 (612x792:0:0) (move:0:0)
NOTICE  File contains jpeg pictures
Segmentation fault
I've installed pdf2swf from macports.
 #9141  by joako
 
My version is:
Code: Select all
$ pdf2swf -V
pdf2swf - part of swftools 0.9.1
I suspect this could be an issue that maybe not all the fonts are installed?

Anyways I've setup using a wrapper script with options -O 2 or -s bitmapfonts and these PDF files are converted. I should at least change the script so it attempts the normal conversion first and only if it fails use the -O 2 option since the text quality is degraded some with the bitmap fonts option -- but it's just a preview, I think I can live with that.
 #9202  by pavila
 
pdf2swf is not perfect, but v 0.9.1 works pretty well under Ubuntu / Debian. In the past, I had some problem with an older pdf2swf version under RedHat (always giving Segmentation fault), but last stable release also works fine. May be this is a problem with the Mac port or compilation. In that case should be reported to the PDFTools people or the package maintainer.
 #9216  by joako
 
I think I described my solution in another post. It's not perfect because it involves setting the bitmapfonts option in pdf2swf, so the text quality isn't the best... but it's just supposed to be a preview so I think that can work fine for me. I discovered this by reading about the pdf2swf error and your documentation about a wrapper script, using the wrapper script I set some option like -O 2 for this. If I wanted to be neat about it I can write the script to attempt the normal pdf2swf and then the bitmapfonts pdf2swf if the first fails, but for now I am lazy.

So I think everything is working 100% on MacOS Server, now I just need to work with some general OpenKM issues.

pavila, thanks for the continued help! I'll need to get in touch with you later about a development offer you made.
 #9332  by hlara
 
Excuse me, Joako, can'u preview word, excel and powerpoint files???

If so, can'u tell me your configuratión? what can I do? I also have Mac OSX Server 10.6 and OpenKM 5.0.2, I have image and pdf preview, but no office documents preview nor download as pdf.

Any lifeboat here is appreciated!!!!

Best Regards.
 #9334  by joako
 
I installed OpenOffice to /Applications directory, as you may or may not know MacOS X applications are actually folders (you can right click and "Show Package Contents") so if you install OpenOffice and you have the Application showing in /Applications/OpenOffice.org.app then you would configure your OpenKM as follows:

system.openoffice.path=/Applications/OpenOffice.org.app/Contents

Then after when you launch (or restart if its already running) OpenKM you should see the OpenOffice icon in the dock.
 #9369  by joako
 
Maybe it's permissions? I have the administrator user on my server "joako" and I installed OpenOffice.org and OpenBravo and run OpenBravo all under that same users.

When I ran one time OpenBravo as root there became issues with the database, and I just started over with a new JBoss, database, etc. Maybe you can try to run OpenBravo as root and see it it works.

Also when I start OpenBravo I see messages in my log about OpenOffice is launched and what PID, so see if your log as has some error.
 #9372  by hlara
 
This is bizarre! I try to run it as "Admin" not as "Root" as usual, obviously lots of errors and panic halted of the OpenKM, I run it as "Root" as usual and leave it there.

30 minutos later I log in to the OpenKM to work with some documents (daily labor) and click "Preview" and there it is!!! IT'S WORKING!!!!!

I don't know what happen, but I don't wanna reboot it again!!!!

Best Regards

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.