Site icon Pro Liferay

Open Office Integration

Objective of this article: Integrate open Office in Liferay.

Use of Open Office integration : It will allow you to covert web content as document  into different formats.  

Liferay has a capability to convert document in different formats like pdf, doc…etc. We can convert web content as well as document media content in different formats. But this feature is not enabled by default. To enable this feature we need to perform some extra steps.Consider the below web content and you want  a link on the content to export it as PDF, Doc and so on.

To achieve this we can integrate open office in our portal. Once open office is configured we can easily convert any document as well as liferay web content into different formats. Below are the few steps to integrate open office in Liferay.

Step 1: Download open office from the site  https://www.openoffice.org

Step 2: Install open office.

Step 3: Run the open office service.

Step 4: Configure Liferay to use open office service.

Step 5: Enable export option for web content.

I have downloaded Apache_OpenOffice_4.1.1_Win_x86_install_en-US.exe. You can download open office according to your environment. (Step 1 is completed)

Install open office in your machine in any drive. I have installed in C:\Program Files (x86)\OpenOffice 4. You can install according to your interest. (Step 2 is completed)

In the Step 3 you have to start the open office service. Navigate to C:\Program Files (x86)\OpenOffice 4\program (In your case it may be different). Run the below command (its a windows command)

soffice -headless -accept=”socket,host=127.0.0.1,port=8100;urp;” -nofirststartwizard

(Step 3 is completed)

In step 4 configure Liferay to use this service. Go to your control panel and navigate as shown in below screen shot.

Then enable open office as below

(Step 4 is completed)
 
In Step 5 go to your web content. Click the setting icon or Configuration icon.

Check the PDF and Save. You can check other check boxes also if you need different conversions.

Refresh your page. PDF icon will appear in your web content as in the below image. (Step 5 is completed)

Similarly you can convert your document media content also. Just open any document from your document and media portlet through your control panel. You will see different formats to convert a document.   

Exit mobile version