Forums

Home » Liferay Social Office

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Blake Jones
Excel Macro Enabled File causing Document Preview to CRASH
December 18, 2013 8:14 AM
Answer

Blake Jones

Rank: Junior Member

Posts: 39

Join Date: August 17, 2012

Recent Posts

I have a question regarding Excel Macro Enabled Files causing Open Office Headless Mode Daemon to halt and Imagemagick to not work anymore.

Is there a setting in Liferay to disable document preview based on an individual file type?

What I have tried so far simple prevents uploading of a file type that are not listed:

dl.file.extensions=.bmp,.css,.doc,.docx,.dot,.gif,.gz,.htm,.html,.jpg,.js,.lar,.odb,.odf,.odg,.odp,.ods,.odt,.pdf,.png,.ppt,.pptx,.rtf,.swf,.sxc,.sxi,.sxw,.tar,.tiff,.tgz,.txt,.vsd,.xls,.xlsx,.xml,.zip,.jrxml

The above setting did NOT accomplish what I was hoping for.

Open Office Document Converter & Imagemagick are both working correctly on normal files i.e. .doc .docx .xls .xlsx

However when we browse to an Excel Macro Enabled File there is not document preview, and on the backend Linux Ubuntu Server my custom soffice daemon halts.

My hope for gain is to just disable document previewing for EXCEL files, while keeping document previewing for Power Point, Word, PDF, Images....

Is there a way to accomplish this?

Any help would be greatly appreciated.
Mika Koivisto
RE: Excel Macro Enabled File causing Document Preview to CRASH
December 17, 2013 2:39 PM
Answer

Mika Koivisto

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1512

Join Date: August 7, 2006

Recent Posts

Here's the properties you are looking for:

 1##
 2## OpenOffice
 3##
 4
 5    #
 6    # Enabling OpenOffice integration allows the Document Library portlet and
 7    # the Wiki portlet to provide conversion functionality. This is tested with
 8    # OpenOffice 2.3.x through 3.2.x. It is recommended that you have OpenOffice
 9    # on the same machine. Using a remote host for the instance is not fully
10    # supported and could lead to various problems. To start OpenOffice as
11    # service, run the command:
12    #
13    # soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;"
14    #
15    openoffice.server.enabled=false
16    openoffice.server.host=127.0.0.1
17    openoffice.server.port=8100
18    openoffice.cache.enabled=true
19
20    #
21    # Specify the file extensions of files to allow conversions from. Entries
22    # must be limited by what is supported by OpenOffice.
23    #
24    openoffice.conversion.source.extensions[drawing]=odg
25    openoffice.conversion.source.extensions[presentation]=odp,ppt,pptx,sxi
26    openoffice.conversion.source.extensions[spreadsheet]=csv,ods,sxc,tsv,xls,xlsx
27    openoffice.conversion.source.extensions[text]=doc,docx,html,odt,rtf,sxw,txt,wpd
28
29    #
30    # Specify the file extensions of files to allow conversions to. Entries must
31    # be limited by what is supported by OpenOffice.
32    #
33    openoffice.conversion.target.extensions[drawing]=pdf,svg,swf
34    openoffice.conversion.target.extensions[presentation]=odp,pdf,ppt,swf,sxi
35    openoffice.conversion.target.extensions[spreadsheet]=csv,ods,pdf,sxc,tsv,xls
36    openoffice.conversion.target.extensions[text]=doc,odt,pdf,rtf,sxw,txt
Blake Jones
RE: Excel Macro Enabled File causing Document Preview to CRASH
December 18, 2013 8:13 AM
Answer

Blake Jones

Rank: Junior Member

Posts: 39

Join Date: August 17, 2012

Recent Posts

Thank You this fixed the issue and solved the problem.

in portal-ext.properties, I already had the parameters for:

openoffice.server.enabled=true
openoffice.server.host=127.0.0.1
openoffice.server.port=8100

I just added the following parameters to fix the issue:

openoffice.conversion.source.extensions=csv,ods,sxc,tsv
openoffice.conversion.target.extensions=csv,ods,pdf,sxc,tsv

With removing the xls & xlsx extensions, This disabled document preview for Microsoft Excel Files.

I read a forum post on open office's website regarding Microsoft Excel Macro enabled files and they said:

Since Microsoft's software is Proprietary and Closed Source, Microsoft's Macro's are strictly designed for Microsoft Products.

Microsoft's macro's are not intended to open with other software.

Thanks again for the help.

Cheers!