cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to preview docs

cristina_aragon
Champ on-the-rise
Champ on-the-rise
Hi all!

I´m newbie with Alfresco and just installed all bundled (soffice, Imagemagick, share, alfresco, awe, …) except for mysql (it´s on another machine).
I'm testing my installation and within "alfresco" I have created one site with a "doc" document that I wish to see with "share".
When I try to see this word document it says that "Can´t load preview from server" or something like that and nothing is shown. I can download the document but in the left side of the navigator it must be a preview of the document that it´s not.
In the log files it doesn´t appear nothing.
Any help? Thanks in advance!

Cristina
11 REPLIES 11

gnyce
Champ in-the-making
Champ in-the-making
edit your ~/tomcat/shared/classes/alfresco-global.properties and enable openoffice (true) from false…  restart Alfresco, then try.

### External executable locations ###
ooo.enabled=true

cristina_aragon
Champ on-the-rise
Champ on-the-rise
Good morning!

Thanks for your answer:

I have set ooo.enable=true but nothing.

The only line that appears in the log file about soffice is:

08:46:29,982  INFO  [management.subsystems.ChildApplicationContextFactory] Startup of 'OOoDirect' subsystem, ID: [OOoDirect, default] complete

I launch soffice with this command:

/Alfresco/openoffice/program/soffice.bin -accept="socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" -nologo -headless -nofirststartwizard

(I have tried with the same command but ~/program/soffice (without .bin) but nothing appears. The message is the same)

What else can I try? (this issue is very relevant for us and without it nothing appears to be sense in a CM context)

Thanks in advance!
Cristina

cristina_aragon
Champ on-the-rise
Champ on-the-rise
Hi again!

I have test if I could preview pdf files but I can´t.
So my situation is that I can´t preview any type of file. The answer from server is the same:
The preview could not be loaded from the server.
These are my alfresco-global.properties options about that:

ooo.exe=/Alfresco/openoffice/program/soffice.bin
ooo.enabled=true
img.root=/Alfresco/common/
img.dyn=/Alfresco/common/lib
img.exe=/Alfresco/common/bin/convert
swf.exe=/Alfresco/common/bin/pdf2swf
jodconverter.enabled=true
jodconverter.officeHome=/Alfresco/openoffice
jodconverter.portNumbers=8101

The only thing that I can see in the log file as an error is:

GRAVE: A web application created a ThreadLocal with key of type [org.alfresco.repo.policy.BaseBehaviour.StackThreadLocal] (value [org.alfresco.repo.policy.BaseBehaviour$StackThreadLocal@36851b]) and a value of type [java.util.Stack] (value [[]]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.

Please, any help would be appreciate!
thanks in advance!
Cristina

gnyce
Champ in-the-making
Champ in-the-making
You should not have to manually launch openoffice, alfresco should start it.  You should be able to, after starting alfresco, see soffice running (and listening on port 8100 I believe).

You don't say what OS this is on?  If this is Linux - look in your ~/common/lib/ directory for libstdc++.so.5  -  it should be a symlink, as I have below.  If it is just a short-file, you need to correct that.

-rw-r–r– 1 root root 694K Nov 29 07:52 libstdc++.so.5.0.3
lrwxrwxrwx 1 root root   20 Feb  8 14:52 libstdc++.so.5 -> ./libstdc++.so.5.0.3

gnyce
Champ in-the-making
Champ in-the-making
Also - do you get valid output if you just run the ~/common/bin/pdf2swf binary?

cristina_aragon
Champ on-the-rise
Champ on-the-rise
Thanks for your replies gnyce!

But I keep on trying to preview doc or pdf files within share with no success.

I have done the soft link you say (it was a little file):

lrwxrwxrwx 1 root   root     16 feb 10 11:00 libstdc++.so.5 -> libstdc++.so.5.3
-rw-r–r– 1 tomcat si   710608 nov 29 13:52 libstdc++.so.5.0.3


Now I don´t launch soffice: it´s alfresco who launch soffice. This is the process:

/Alfresco/openoffice/program/soffice.bin -accept=socket,host=127.0.0.1,port=8100;urp;StarOffice.ServiceManager -env:UserInstallation=file:///Alfresco/alf_data/oouser -nologo -headless -nofirststartwizard -nocrashrep -norestore

When I stop alfresco, the soffice process keep alive …must I kill it?

From the command line I can get swf files from pdf correctly:

pdf2swf /root/2015_0001.pdf -o /root/2015_0001.swf
NOTICE  Adding /usr/share/swftools/fonts to font directories
Creator:      Canon iR1022
Producer:     Canon iR1022
CreationDate: 20110120193539Z00'00'
Pages:        4
Linearized:   no
Encrypted:    no
NOTICE  processing PDF page 1 (599x837:0:0) (move:0:0)
NOTICE  file contains jpeg pictures
NOTICE  file contains pbm pictures (masked)
NOTICE  processing PDF page 2 (599x837:0:0) (move:0:0)
NOTICE  processing PDF page 3 (599x837:0:0) (move:0:0)
NOTICE  processing PDF page 4 (599x837:0:0) (move:0:0)
NOTICE  SWF written

Ah! My OS is CentOS 5.5. What else could I try?
Thans in advance for your help!
Cristina

cristina_aragon
Champ on-the-rise
Champ on-the-rise
I just created a HTML Content and neither can I preview it! (something is wrong!!!)

cristina_aragon
Champ on-the-rise
Champ on-the-rise
Finally, I found the solution: It was the library issue. It seems that in CentOs5.5,  the soft link that bundles within alfrescofor libstdc++.so.5 doesn´t work, so you have to delete it and create a new link in this manner:

libstdc++.so.5 -> libstdc++.so.5.0.3

Now, I can preview html, docs and pdfs! (I haven´t test other type of files)

Thanks to all!

Cristina

jtk
Champ in-the-making
Champ in-the-making
I was running into this problem with a fresh install on Ubuntu 9.04 Desktop, after running the .bin installer.

I installed OpenOffice 3.3 (package comes with 3.2 and 3.2 is preinstalled on Ubuntu, need 3.2.1 or higher).  That fixed the thumbnail views (along with doc and docx preview, once you had previewing working).

For the previewer, I updated the pdf2swf to the latest version in the repository using apt-get. (apt-get install swftools)

Then I just had to change:

ooo.exe="filepath/soffice.bin"
ooo.enabled=true
swf.exe="filepath/pdf2swf"

Also changed:
jodconverter.officeHome="filepath/openoffice.org3


Seems to work so far.