Does not view .doc files

cancel
Showing results for 
Search instead for 
Did you mean: 
jbrasil
Active Member II

Does not view .doc files

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
kaynezhang
Advanced

Re: Does not view .doc files


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.

nokinha1
Active Member II
jbrasil
Active Member II

Re: Does not view .doc files

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

kaynezhang
Advanced

Re: Does not view .doc files

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

sanjaybandhniya
Intermediate

Re: Does not view .doc files

Make sure libraoffice is running.

 

jbrasil
Active Member II

Re: Does not view .doc files

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

 

kaynezhang
Advanced

Re: Does not view .doc files

Try the following command line

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

Re: Does not view .doc files

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.

nokinha1
Active Member II

Re: Does not view .doc files

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