cancel
Showing results for 
Search instead for 
Did you mean: 

Document preview

ivan
Champ in-the-making
Champ in-the-making
Hello,
i installed latest versions of ImageMagick/swf2pdf and openoffice but inside document library i cannot see document thumbnails or preview of microsoft word documents (and i need this more than thumbnails). also i can't see pdf documents which are generated from microsoft office (get message that preview could not be loaded from server), but i can see preview of some other pdf files. alfresco logs don't show any informations. any hint?

thanx.
14 REPLIES 14

zaizi
Champ in-the-making
Champ in-the-making
Go to document preview page. View the page source (or use firebug) to find the flash component in the page that does the image preview. It is passed a URL for the flash document to load. Copy and paste this URL directly in your browser. It should display the preview document if working correctly or display a stack trace with the exact reason why it it isn't.

juilee
Champ in-the-making
Champ in-the-making
Hi Zaizi,

I have a problem with Office documents preview. The preview of document A wrongly shows up document B. I did what you suggested, copy pasted the url in my browser. It shows the wrong document.
Is it some caching issue? Is somehow the wrong cached image getting attached.
How can i turn off caching or resolve this issue?

Thanks,
Juilee

ivan
Champ in-the-making
Champ in-the-making
hi, zaizi thanx for yout help…well, i did search through firebug and find

http://myipaddress:8080/share/proxy/alfresco/api/node/workspace/SpacesStore/c548889e-0da0-4333-897d-...[0].onWebPreviewerEvent

not sure is that thing i should look for  :s , but if i load pervious link i get

exception

org.alfresco.error.AlfrescoRuntimeException: Error during endpoint proxy processing: Invalid uri 'http://localhost:8080/alfresco/s/api/node/workspace/SpacesStore/c548889e-0da0-4333-897d-db205cf09f7c...[0].onWebPreviewerEvent&alf_ticket=TICKET_c5341a2c28096e945994121468f2a41c1829fe9a': Invalid query
   org.alfresco.web.scripts.servlet.EndPointProxyServlet.service(EndPointProxyServlet.java:265)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

zaizi
Champ in-the-making
Champ in-the-making
Sorry, forgot to mention to remove the javascript call back function. So the URL is: http://localhost:8080/alfresco/s/api/node/workspace/SpacesStore/c548889e-0da0-4333-897d-db205cf09f7c...

ivan
Champ in-the-making
Champ in-the-making
well if i enter

http://myipaddress:8080/alfresco/s/api/node/workspace/SpacesStore/c548889e-0da0-4333-897d-db205cf09f...

i get following message

Message:   Wrapped Exception (with status template): Failed to execute script '/org/alfresco/repository/thumbnail/thumbnail.get.js (in classpath store file:/opt/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts)': Thumbnail could not be created because of a duplicate name
   
Exception:   org.alfresco.service.cmr.thumbnail.ThumbnailException - Thumbnail could not be created because of a duplicate name

and if i enter link below i can see pdf document (but still not inside document library)
http://myipaddress:8080/alfresco/s/api/node/workspace/SpacesStore/c548889e-0da0-4333-897d-db205cf09f...

ivan
Champ in-the-making
Champ in-the-making
and if i, like in pervious examples, point browser on word document i get download option (not preview)

or with

http://myipaddress:8080/alfresco/s/api/node/workspace/SpacesStore/aae9b8e9-f650-458d-943a-42ec875fcb...

Message:   Wrapped Exception (with status template): Failed to execute script '/org/alfresco/repository/thumbnail/thumbnail.get.js (in classpath store file:/opt/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts)': Content conversion failed: reader: ContentAccessor[ contentUrl=store://2009/6/23/23/3/92c74ad2-f612-4c20-bda4-510061985bc5.bin, mimetype=application/msword, size=19968, encoding=UTF-8, locale=en_US] writer: ContentAccessor[ contentUrl=store://2009/7/6/21/55/ba8c192c-2f96-43f2-96dd-50b80bf64c99.bin, mimetype=application/x-shockwave-flash, size=0, encoding=UTF-8, locale=en_US] options: org.alfresco.repo.content.transform.swf.SWFTransformationOptions@b46b06
   
Exception:   net.sf.jooreports.openoffice.connection.OpenOfficeException - conversion failed; com.sun.star.lang.IllegalArgumentException: URL seems to be an unsupported one.

zaizi
Champ in-the-making
Champ in-the-making
The first issue with thumbnail is interesting. It is failing because a file with the same name exists. You can try deleting the document and uploading again. Alternatively you can always browse through the Nodebrowser to see if the thumbnail association exists. If you search for "doclib.png" in Alfresco explorer within the space of the document it should show you all the thumbnail images.

The second issue is odd. It should be converting from MS Word to PDF and then to Flash. Can you check your start up logs to ensure all services  are starting up ok. E.g. Open Office, Pdf2Swf.

ivan
Champ in-the-making
Champ in-the-making
hello zaizi,
i upgraded to 3.2 version, and updated ImageMagick and swftools. as i can see from console ImageMagick, swf tools and openoffice are working ok. i still manage to see some of pdf files, and paths to img.exe and swf. in alfresco-global.properties are correct

if i point directly to thumbnail preview i get

500 Description:    An error inside the HTTP server which prevented it from fulfilling the request.

Message:   06080023 Wrapped Exception (with status template): 06080022 Failed to execute script '/org/alfresco/repository/thumbnail/thumbnail.get.js (in classpath store file:/opt/alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts)': 06080021 Thumbnail could not be created as required transformation is not supported from application/pdf to application/x-shockwave-flash
   
Exception:   org.alfresco.service.cmr.thumbnail.ThumbnailException - 06080021 Thumbnail could not be created as required transformation is not supported from application/pdf to application/x-shockwave-flash

and in alfresco.log i found

Caused by: com.sun.pdfview.PDFParseException: Expected 'xref' at start of table
        at com.sun.pdfview.PDFFile.readTrailer(PDFFile.java:974)
        at com.sun.pdfview.PDFFile.parseFile(PDFFile.java:1175)
        at com.sun.pdfview.PDFFile.<init>(PDFFile.java:126)
        at com.sun.pdfview.PDFFile.<init>(PDFFile.java:102)

Caused by: org.alfresco.error.AlfrescoRuntimeException: 06080030 Unable to create image from pdf file.

Caused by: org.alfresco.service.cmr.repository.ContentIOException: 06080202 Content conversion failed:
   reader: ContentAccessor[ contentUrl=store://2009/6/23/23/3/92c74ad2-f612-4c20-bda4-510061985bc5.bin, mimetype=application/
msword, size=19968, encoding=UTF-8, locale=en_US]
   writer: ContentAccessor[ contentUrl=store:///opt/alfresco/tomcat/temp/Alfresco/ComplextTransformer_intermediate_doc_50614.
pdf, mimetype=application/pdf, size=0, encoding=UTF-8, locale=en_GB]

Caused by: org.alfresco.service.cmr.repository.ContentIOException: 06080118 OpenOffice server conversion failed:
   reader: ContentAccessor[ contentUrl=store://2009/6/23/23/3/92c74ad2-f612-4c20-bda4-510061985bc5.bin, mimetype=application/
msword, size=19968, encoding=UTF-8, locale=en_US]
   writer: ContentAccessor[ contentUrl=store:///opt/alfresco/tomcat/temp/Alfresco/ComplextTransformer_intermediate_doc_50537.
pdf, mimetype=application/pdf, size=0, encoding=UTF-8, locale=en_GB]
   from file: /opt/alfresco/tomcat/temp/Alfresco/OpenOfficeContentTransformer-source-50538.doc
   to file: /opt/alfresco/tomcat/temp/Alfresco/OpenOfficeContentTransformer-target-50539.pdf

Caused by: org.alfresco.scripts.ScriptException: 06080121 Failed to execute script '/org/alfresco/repository/thumbnail/thumbn
ail.get.js (in classpath store file:/opt/alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts)': 06
080120 Content conversion failed:
   reader: ContentAccessor[ contentUrl=store://2009/6/23/23/3/92c74ad2-f612-4c20-bda4-510061985bc5.bin, mimetype=application/
msword, size=19968, encoding=UTF-8, locale=en_US]
   writer: ContentAccessor[ contentUrl=store://2009/7/8/2/34/3addb28b-85a7-4f51-a950-2dd1ccf76d0d.bin, mimetype=application/x
-shockwave-flash, size=0, encoding=UTF-8, locale=en_GB]
   options: org.alfresco.repo.content.transform.swf.SWFTransformationOptions@17297df

++++
Caused by: org.alfresco.service.cmr.repository.ContentIOException: 06080031 Content conversion failed:
   reader: ContentAccessor[ contentUrl=store://2009/7/1/22/39/2fbdd724-56e3-408f-b2b4-10f4067acc33.bin, mimetype=application/
pdf, size=7075579, encoding=utf-8, locale=en_US]
   writer: ContentAccessor[ contentUrl=store://2009/7/8/5/1/a9c003fd-a213-4cf2-9560-5e17c0d1e5b6.bin, mimetype=image/png, siz
e=0, encoding=utf-8, locale=en_GB]
   options: org.alfresco.repo.content.transform.magick.ImageTransformationOptions@ce9af7

jayjayecl
Confirmed Champ
Confirmed Champ
Do you run on an UNIX server ?
Can you check that OpenOffice user has sufficient priviledges on the following folder : tomcat/temp (and recursively on its children) ?