cancel
Showing results for 
Search instead for 
Did you mean: 

Does not view .doc files

jbrasil
Confirmed Champ
Confirmed Champ

Hi guys,
I am not able to view files with extension .doc in Alfresco.
The following message occurs:

This document cannot be previewed.
Click here to download it.

Alfresco version: 6.1.1
Operating system version: Ubuntu linux 18.04.3 LTS
Can you help us?
With best regards,

9 REPLIES 9

kaynezhang
World-Class Innovator
World-Class Innovator


Your doc file cann't not be converted to pdf successfully.Maybe it is too large that exceeds max size limit of libreoffice transformer or libreoffice just can't convert it.

Hi kaynezhang,
The file is only 11kb
I want to view the file with the .docx extension
What can it be?
image

kaynezhang
World-Class Innovator
World-Class Innovator

Have you installed LibreOffice? If you have ,you can try to open your doc file wich it,and see what happens

Hi kaynezhang,
Libreoffice is installed.
Version: 6.2.8
What is the command to open the file?
With best regards

kaynezhang
World-Class Innovator
World-Class Innovator
Try the following command line

libreoffice --convert-to pdf:writer_pdf_Export   ${doc file path } --outdir ${output dir}

Hi kaynezhang,
Alfresco was installed via Loftux script.
alfinstall.sh

It automatically installs the moment you run the script.

pwd
/opt/libreoffice6.2/program

./soffice --convert-to pdf /home/jbrasil/teste-jbrasil.docx --outdir /home/jbrasil/pdf/

l /home/ brasil/pdf/
total 8.0K
-rw-r - r-- 1 root 7.1K Sep 23 14:29 teste-jbrasil.pdf

I ran the soffice command. And generated the .pdf file

By libreoffice he doesn't find the executable
libreoffice --convert-to pdf /home/jbrasil/teste-jbrasil.docx --outdir / home / jbrasil / pdf /

Command 'libreoffice' not found, but can be installed with:

snap install libreoffice # version 6.4.5.2, or
apt install libreoffice-common

See 'snap info libreoffice' for additional versions.

Anything else to be done?
With best regards.

i resolved it in my client with this form....

### 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

in alfresco-global.properties

Make sure libraoffice is running.