cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco Share Flash Preview

benswitzer
Champ in-the-making
Champ in-the-making
Good day.

Been kicking the tires on the latest beta of 3.0 and have been having an issue with the flash document preview.  I have only ever seen the dark grey box with the spinning patter in the middle.

I've installed the Windows Setup as per the instructions with MySQL.  There no exceptions being through at the default log level.

Do I have to install the other SWF Tools?  Thoughts on how I might get this to work.

Thanks,
Ben
46 REPLIES 46

zaizi
Champ in-the-making
Champ in-the-making
Have you got pdf2swf installed?

Install pdf2swf to enable the Flash preview functionality. Make sure you use the last development snapshots because 0.8.1 from 2007-02-28 does not support some functionalities Alfresco needs to render the preview.

as per http://wiki.alfresco.com/wiki/Installing_Labs_3

benswitzer
Champ in-the-making
Champ in-the-making
Hi Zaizi.

Yes, I've subsequently installed SWF Tools (swftools 2008-08-21-2105).  Its on the path.  Restarted Tomcat, no luck.

Thanks

kraemer
Champ in-the-making
Champ in-the-making
Hi,

got exactly the same problem on Kubuntu 8.04, newest swftools installed.
Anyone solved that problem?

pdf2swf works:
alfresco@alfresco-dev:/root$ pdf2swf /usr/lib/vmware-tools/GuestSDK/GuestSDK_Terms_and_Conditions.pdf /home/alfresco/test.swf
NOTICE  processing PDF page 1 (612x792:0:0) (move:0:0)
NOTICE  processing PDF page 2 (612x792:0:0) (move:0:0)
NOTICE  Writing SWF file /home/alfresco/test.swf

swftools version
alfresco@alfresco-dev:/root$ pdf2swf -V
pdf2swf - part of swftools 2008-10-27-2255

Thanks a lot!

benswitzer
Champ in-the-making
Champ in-the-making
Turns out, for me it was a browser issue.  Works fine in IE 7, but doesn't work with Firefox 3.0.  Firefox being my main browser of course.

mikeh
Star Contributor
Star Contributor
Turns out, for me it was a browser issue.  Works fine in IE 7, but doesn't work with Firefox 3.0.  Firefox being my main browser of course.
Make sure you've got Flash 9 installed for Firefox - it's a separate download from the IE7 one.

Mike

benwah1983
Champ in-the-making
Champ in-the-making
I've been trying to get Alfresco to work on a virgin Ubuntu 8.10 Interpid Ibex server edition installation and ran into this same problem (amongst others…). I am not sure how to fix it.

The symptoms are:
When I load a document (click on a document from the document library), it loads a page, the flash applet loads and the little arrows in the middle just keep spinning forever.

This only happens when I upload documents processed by OOo (.doc, .odt, .pdf). Images are handled perfectly by the flash preview.

I've tried with Firefox 3.03 (Linux) with Flash 9 AND 10, Internet Explorer 6 with Flash9, Internet Explorer 8 with Flash 10 and none seem to work.

I'm currently running alfresco as root until I can get it to work properlly, then I will give run it as its own user.

Here is what I did so far:
-Installed sun-java6-jdk (1.6.0-10) (Deb)
-Installed mysql server (Deb)
-Installed the latest Alfresco Labs 3 (the version available today at Alfresco.com's main download link)
-Installed ImageMagick (Deb)
-Installed all required libs to compile swftools
-Downloaded, and compiled swftools-2008-10-27-2255
-Tested swftools (pdf2swf works fine)
-Downloaded and installed OpenOffice.org 3.0's debs
-Configured Alfresco to use MySQL (based mainly on instructions provided on http://wiki.alfresco.com/wiki/Installing_Labs_3_on_Linux_with_command_line_interface)

My alfresco.sh:

#!/bin/sh
# Start or stop Alfresco server
# Set the following to where Tomcat is installed
ALF_HOME=/opt/Alfresco
cd "$ALF_HOME"
APPSERVER="${ALF_HOME}/tomcat"
export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.10/
# Set any default JVM values
export JAVA_OPTS='-Xms128m -Xmx512m -XX:MaxPermSize=128m -server'
# Following only needed for Sun JVMs before to 1.5 update 8
export JAVA_OPTS="${JAVA_OPTS} -XX:CompileCommand=exclude,org/apache/lucene/index/IndexReader\$1,doBody -XX:CompileCommand=exclude,org/alfresco/repo/search/impl/lucene/index/IndexInfo\$Merger,mergeIndexes -XX:CompileCommand=exclude,org/alfresco/repo/search/impl/lucene/index/IndexInfo\$Merger,mergeDeletions"
#
if [ "$1" = "start" ]; then
  if [ -r "$ALF_HOME"/start_oo.sh ]; then
    sh "$ALF_HOME"/start_oo.sh
  fi
  "${APPSERVER}/bin/startup.sh"
#  if [ -r ./virtual_start.sh ]; then
#    sh ./virtual_start.sh
#  fi
elif [ "$1" = "stop" ]; then
  "${APPSERVER}/bin/shutdown.sh"
#  if [ -r ./virtual_start.sh ]; then
#    sh ./virtual_stop.sh
#  fi
  if [ -r "$ALF_HOME"/start_oo.sh ]; then
    killall soffice.bin
  fi
fi

This is the content of my start_oo.sh:
/opt/openoffice.org3/program/soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" "-env:UserInstallation=file:////opt/openoffice.org3" -nologo -headless -nofirststartwizard -nocrashrep -norestore &

I can confirm soffice.bin runs fine, everytime I upload a document, soffice.bin shows up in "top". In addition, a thumbnail of the documents is created (doc, odt and pdf), so I guess OOo reads the document fine.

Here is the output of Alfresco:
CompilerOracle: exclude org/apache/lucene/index/IndexReader$1.doBody
CompilerOracle: exclude org/alfresco/repo/search/impl/lucene/index/IndexInfo$Merger.mergeIndexes
CompilerOracle: exclude org/alfresco/repo/search/impl/lucene/index/IndexInfo$Merger.mergeDeletions
4-Nov-2008 3:11:49 AM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
4-Nov-2008 3:11:50 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 7573 ms
4-Nov-2008 3:11:51 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
4-Nov-2008 3:11:51 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.23
4-Nov-2008 3:11:51 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
4-Nov-2008 3:11:57 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive share.war
03:12:28,874  INFO  [web.site.FrameworkHelper] Successfully Initialized Web Framework
4-Nov-2008 3:12:29 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive alfresco.war
03:15:15,823  INFO  [config.xml.XMLConfigService$PropertyConfigurer] Loading properties file from class path resource [alfresco/file-servers.properties]
03:16:51,377  INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
03:16:57,314  INFO  [domain.schema.SchemaBootstrap] No changes were made to the schema.
03:17:15,006 User:System INFO  [repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: /opt/Alfresco/alf_data
03:17:15,524 User:System INFO  [admin.patch.PatchExecuter] Checking for patches to apply …
03:17:18,011 User:System INFO  [admin.patch.PatchExecuter] No patches were required.
03:17:18,030 User:System INFO  [repo.module.ModuleServiceImpl] Found 0 module(s).
03:17:24,726 User:System INFO  [service.descriptor.DescriptorService] Alfresco JVM - v1.6.0_10-b33; maximum heap size 506.313MB
03:17:24,730 User:System INFO  [service.descriptor.DescriptorService] Alfresco started (Labs): Current version 3.0.0 (b 1164) schema 131 - Installed version 3.0.0 (b 1164) schema 131
03:17:26,480 User:System WARN  [alfresco.linkvalidation.LinkValidationServiceImpl] LinkValidationService Update is not running (virtualization server not registered or started)
4-Nov-2008 3:18:35 AM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
4-Nov-2008 3:18:36 AM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
4-Nov-2008 3:18:37 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 407283 ms

kraemer
Champ in-the-making
Champ in-the-making
When I load a document (click on a document from the document library), it loads a page, the flash applet loads and the little arrows in the middle just keep spinning forever.
This only happens when I upload documents processed by OOo (.doc, .odt, .pdf). Images are handled perfectly by the flash preview.

Confirmed. Same here. Setup identical.
A normal 'pdf' transformed on commandline via 'pdf2swf' can be viewed in Firefox.

I guess the pdf file is transformed on demand using 'pdf2swf' and streamed to the browser, right? At least I could not find a .swf rendition in the repository.
How to debug this ? Only debugging output I could find (log4j) was something like this:

/api/node/workspace/SpacesStore/02a38305-ae29-40b1-ae0e-a41a5382493e/content/thumbnails/webpreview
15:02:21,509  DEBUG [web.scripts.DeclarativeRegistry] Web Script index lookup for uri /api/node/workspace/SpacesStore/02a38305-ae29-40b1-ae0e-a41a5382493e/content/thumbnails/webpreview took 0.592714ms
15:02:21,510  DEBUG [scripts.servlet.WebScriptServletRequest] Content Type: null
15:02:21,561  DEBUG [web.scripts.AbstractRuntime] Agent: null

Any hint would be greatly appreciated.

jeckman
Champ in-the-making
Champ in-the-making
I'm having the same issue.

You can see in /opt/alfresco/tomcat/temp/Alfresco   (exact path might vary based on where you've put temp files) the interim docs from the transform:

ImageMagickContentTransform_init_source_39434.gif
ImageMagickContentTransformer_init_target_39435.png
PDFToSWFContentTransformer_source_39453.pdf
PDFToSWFContentTransformer_target_39454.swf

I can even open the _target_39454.swf in an SWF player and see that it is a flash movie with each page from the pdf as a frame.

However, from the web side, in FF 3 or Safari, all I get is the spinning dark grey circle - no error message.

This makes me believe it is not an issue with pdf2swf, or ImageMagick, or soffice transformations, but an issue with the swf that is supposed to display the preview.

Image previews work fine, and the pdfs and office docs do get a custom thumbnail in the document library list.

mikeh
Star Contributor
Star Contributor
Which version of pdf2swf do you have installed?