cancel
Showing results for 
Search instead for 
Did you mean: 

Document previews not working

ChrisAlker
Confirmed Champ
Confirmed Champ

Hi guys, we have a problem in our live system and I built a test system to see if the issue replicates, which it has. The problem I am experiencing, is that when a document is uploaded to the repository, I am getting a message when trying to preview it:  'This document can't be previewed. Click here to download it.'

I can see others have had this issue on the forum, but in the cases I have seen they have made changes from the install configuration, whereas I am working with a new install. I have checked and I can see that soffice.bin is running as a local service.

The file type is a .docx and is around 1.3Mb in size, when it is uploaded Alfresco regognises the mimetype as Microsoft Word 2007.

Interestingly, I did some basic testing and found that the software does not behave the same 100% of the time. I uploaded the document, tried to preview and got the 'document can't be previewed' message, I then deleted the document and uploaded again, this time the preview was available. I deleted and uploaded the document again to see if it would always now show a preview, only this time it did not preview the document. I repeated this around 4-5 times and in all of those cases I got the 'document can't be previewed' message, so out of around 6-7 uploads, only one showed a preview.

Could it be that whatever generates the preview has a very short timeout (as the document takes seconds to upload in all cases)?

1 ACCEPTED ANSWER

EddieMay
World-Class Innovator
World-Class Innovator

Hi @ChrisAlker,

I can replicate your issue but only on larger documents ie, > 4MB. As you can see from the screenshot, thumbnails and previews work for the 'Test Large Word Doc 1.doc' file, but fails for the 'Test Large Word 2.docx' file which is 14MB.

Have you had a look at increasing the timeouts - see this document.  It's worth noting the consideration re: allowing one document too many resources as the expense of other users.  This is what I would try next.

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!

View answer in original post

18 REPLIES 18

EddieMay
World-Class Innovator
World-Class Innovator

Hi @ChrisAlker,

Pleased you managed to get it working! Thanks for outlining how you resolved the issue - super useful to other users.

Take care, 

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!

Hi @EddieMay , I think I may have spoken too soon about the issue being fully resolved... I have it working fine in my test system, which is a bitnami build running community 6.2 on my windows 10 laptop, however, our live Alfresco build is community 5.2 built on a Linux box, where someone previously looked after this before me (and has left). I've added this setting to our live system and it did not fix the preview issue. The difference between the global properties of the two files differs slightly though.

These are the standard settings that were on my bitnami 6.2 install:

### External executable locations ###
ooo.exe=C:/ALFRES~1/LIBREO~1/App/libreoffice/program/soffice.exe
ooo.enabled=true
ooo.port=8100
img.root=C:\\Alfresco-201911-4\\imagemagick
img.coders=${img.root}/modules/coders
img.config=${img.root}/config
img.gslib=${img.root}\\lib
img.exe=${img.root}\\convert.exe
swf.exe=C:/ALFRES~1/swftools/pdf2swf.exe
swf.languagedir=C:/ALFRES~1/swftools/japanese
jodconverter.enabled=false
# JOD only for Alfresco Enterprise
jodconverter.officeHome=C:/ALFRES~1/LIBREO~1/App/libreoffice
jodconverter.portNumbers=8100

### Jod converter file size settings ###
content.transformer.JodConverter.extensions.docx.pdf.maxSourceSizeKBytes=10000

These are the settings that are in our live 5.2 properties file:

### External executable locations ###
ooo.exe=/var/www/html/alfresco-community/libreoffice/program/soffice.bin
ooo.enabled=true
ooo.port=8100
img.root=/var/www/html/alfresco-community/common
img.dyn=${img.root}/lib
img.exe=${img.root}/bin/convert

jodconverter.enabled=false
jodconverter.officeHome=/var/www/html/alfresco-community/libreoffice
jodconverter.portNumbers=8100

### Jod converter file size settings ###
content.transformer.JodConverter.extensions.docx.pdf.maxSourceSizeKBytes=10000

Do you know if the extra settings from my 6.2 build were not present in the standard 5.2 build? I have no way of knowing if the original 5.2 properties file actually had the additional settings but were removed (I suspect they haven't been though).

Is there anything that sticks out immediately, other than jodconverter.enabled=false, as I've changed this setting between true/false and it hasn't affected this particular issue, in fact my test system allows the previews with this set to false.

Not applicable

I had exactly this issue, and found the line I needed to add to alfresco-global.properties was

content.transformer.OpenOffice.extensions.docx.pdf.maxSourceSizeKBytes=10000

(whereas content.transformer.JodConverter.extensions.docx.pdf.maxSourceSizeKBytes=10000 made no difference).

As I understand it, it's because libreoffice/OpenOffice is carrying out the transformation and not the JodConverter.

ChrisAlker
Confirmed Champ
Confirmed Champ

Hi thanks for that, I found that it now shows the document preview, but only the first page of 16 and the text on the page is a little bit distorted/overlapping too

Hi dude.

I add all content for MSOffice and set this options... This work fine and fast! 

### External executable locations ###
ooo.exe=/opt/alfresco-community/libreoffice/program/soffice.bin
ooo.enabled=true
ooo.port=8100
img.root=/opt/alfresco-community/common
img.dyn=${img.root}/lib
img.exe=${img.root}/bin/convert
alfresco-pdf-renderer.root=/opt/alfresco-community/common/alfresco-pdf-renderer
alfresco-pdf-renderer.exe=${alfresco-pdf-renderer.root}/alfresco-pdf-renderer
content.transformer.OpenOffice.extensions.docx.pdf.maxSourceSizeKBytes=-1
content.transformer.OpenOffice.extensions.doc.pdf.maxSourceSizeKBytes=-1
content.transformer.OpenOffice.extensions.xlsx.pdf.maxSourceSizeKBytes=-1
content.transformer.OpenOffice.extensions.xlsm.pdf.maxSourceSizeKBytes=-1
content.transformer.OpenOffice.extensions.xls.pdf.maxSourceSizeKBytes=-1
content.transformer.OpenOffice.extensions.pptx.pdf.maxSourceSizeKBytes=-1
content.transformer.OpenOffice.extensions.ppt.pdf.maxSourceSizeKBytes=-1
content.transformer.OpenOffice.extensions.ppsx.pdf.maxSourceSizeKBytes=-1
content.transformer.default.timeoutMs=120000
content.transformer.default.readLimitTimeMs=120000
content.transformer.default.maxSourceSizeKBytes=-1
content.transformer.default.readLimitKBytes=-1   
content.transformer.default.pageLimit=-1
content.transformer.default.maxPages=-1

Not applicable

@ChrisAlker wrote:

Hi thanks for that, I found that it now shows the document preview, but only the first page of 16 and the text on the page is a little bit distorted/overlapping too


I see something similar from time to time - it seems to happen if there is an attempt to access share in the browser while alfresco is still starting up.  A restart of tomcat usually sorts it for me.  However I've no idea if this would be the same problem that you are experiencing.

ChrisAlker
Confirmed Champ
Confirmed Champ

Hi thanks for the response.

Unfortunately after a couple of restarts of Tomcat it is still the same

OnmoviesApk
Champ in-the-making
Champ in-the-making

Make sure the following things: In the Windows File Manager, open the Folder Options, make sure the option Always show icons, never thumbnails option is off , and the option Show preview handlers in preview pane is on 

https://onmoviesapp.fun/download-onmovies-apk/

I have both those options set like that, but this is not the issue. The issue is the preview in the alfresco web page is not rendering properly, which will be relating back to a configuration issue in the Linux box the software is installed on