7/19/2012

What to do when Liferay´s PDF function doesn´t render the images

When you´ve successfully installed Open office on your machine and you activated the Liferay - OpenOffice integration you are able to let users convert your Web Contents to PDF.


This works more or less, the PDFs you get won´t win a price. But at least they contain the pictures you´ve included. They don´t ? Well ... read on.


If your PDF files don´t contain any pictures then the reason might be that your OpenOffice is installed on a machine behind a proxy. To solve this, simply add the following snippet to the file


/usr/lib/openoffice/basis3.2/share/registry/data/org/openoffice/Inet.xcu

<prop oor:name="ooInetProxyType" oor:type="xs:int">
   <value>2</value>
  </prop>
  <prop oor:name="ooInetHTTPProxyName" oor:type="xs:string">
   <value>YOUR_PROXY</value>
  </prop>
  <prop oor:name="ooInetHTTPProxyPort" oor:type="xs:int">
   <value>80</value>
  </prop>
  <prop oor:name="ooInetNoProxy" oor:type="xs:string">
   <value>localhost;127.0.0.1;YOUR_PROXY;YOUR_MACHINES</value>
  </prop>
If you do this then liferay should be able to render its PDFs with pictures included :)


If you like this tutorial it would be very nice, if you could click on some of the google ads you see on the right side. It helps me run this block and motivates me ;)

If you have any questions, feel free to leave a comment.