Saturday, April 25, 2015

Integrate openOffice with liferay for document/content format conversion



Test Environment :(You can test in other environment also)
  OpenOffice 4.0.0.1
  Liferay 6.2 CE
  Tomcat 7
  Window 7

Assume we have uploaded one word document into document & Library portlet or we have created one web content and written some contents in
html format. But we want to download the document or web content as pdf.
 
Liferay has given this fetaure to convert document in different formats like pdf, doc…etc. We can convert web contents and document & media
contents in different formats. But this feature is not enabled by default. To enable this feature we need to integrate openOffice with liferay.
Here in this scenerio openoffice integration comes into the
picture.


Step 1: Download openOffice from mention link or any other link  http://www.openoffice.us.com/download-openoffice-free.php

Step 2: Install openOffice
In between installation of open office one pop up of super optimizer can come, just close that pop up.
and let open office installation completing properly.
Below screenshot of super optimizer.



Step 3: Start OpenOffice service
    I> navigate to the C:\Program Files\OpenOffice.org 3\program (Note:C:\Program Files\OpenOffice.org 3 , installed openoffice location in my
    case)



    II> execute the following command in command prompt
        soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard

       
Step 4: After installing openOffice and starting openOffice service , enable openOffice from liferay control panel side. follow below
screenshot to enable openOffice.



Integration is done.


Now for testing,
I . will create one web content and will convert web content to pdf.
--------------------------------------------------------------------------------
Below are the steps shown in screenshot to create web content and pdf conversion.





II. Will upload one doc file with extension .doc and will convert that to pdf, below are the screenshot of uploading and conversion.

Login with admin account and proceed further.





0 comments:

Post a Comment