How to export PDF with EPS image in writer

Hi I am using MAC version libreoffice writer Version 4.0.4.2
OS: 10.8.4

The document has figures created by inserting pictures from EPS files. The ODT file is opened and viewed fine. but the exported PDF cannot show the figures.

Any suggestions will be appreciated !!

This is a known bug: fdo#34836 The original bug has been resolved (unmanageable) and subsequently split into two more manageable bugs that try to address the issues:

  • fdo#67464, Request for built-in EPS rendering
  • fdo#67465, EPS rendering: locating pstoedit on Mac a problem

It is also worth noting that this bug has huge problems as indicated in comment #44. In order to support EPS in LO a third-party tool (ghostscript or ImageMagick) needs to be installed. EPS will gradually fade away and be replaced by SVG, so it is advisable for users to start trending in this direction where possible.

I did looked this bug and comments it seems to be long time issue and complex.
I just installed ghostscript or ImageMagick for mac (http://pages.uoregon.edu/koch/) . also installed “pstoedit” via macport:

“$ which pstoedit
/opt/local/bin/pstoedit”

It still cannot export the PDF with EPS image (which is the output from Matlab)! how to make writer to find these commandline tools?

There is an example CorelDRAW generated EPS here: http://mirror.math.ku.edu/tex-archive/macros/latex/contrib/auto-pst-pdf/example.eps Can you export that to PDF OK using LO? It works here. It may be the MATLAB generated EPS graphics that are causing the issue, or even something on the Mac platform. I would suggest running a few tests like this to try and narrow down the problem (if possible) to determine if it is LO or something else.

@oweng, Thanks for that, see my latest answer (How to export PDF with EPS image in writer - #9 by leowang) below. It works when I start LO from Mac terminal (command line interface). Any further advices?

The problem is partially solved according to @Björgvin post and bug 34836

  1. Install MacPorts (http://www.macports.org/install.php)

  2. Install ps2edit from Macports

    $ sudo port install pstoedit

  3. you can start libreoffice from the terminal:
    ./Applications/LibreOffice.app/Contents/MacOS/soffice
    The pdf will be exported with EPS image displayed no problem.

However. It only works in terminal mode. I still cannot export PDF with EPS Image when start libreoffice from application folder by double click. I think it is due to from terminal start the libreoffice can find the relevant tools such as “pstoedit” and “convert”. Is there any suggestion that I can start libreoffice with these commands available in the default PATH?

UPDATE
Now I found the solution of launch the GUI app with the user own PATH vars. For example if your “pstoedit” is in “/opt/local/bin” your LO maynot be able to find it, therefore the export PDF with EPS image will be fail. Since Lion, the GUI app environment PATH is only affected by “launchctl” command.

In my case, here is what I did:

p=$(launchctl getenv PATH)
launchctl setenv PATH /opt/local/bin:/opt/local/sbin:$p

And it now finally works for me!!!

From reading the bug comments it sounds to me like the required 3rd party tools need to be on your $PATH, in particular pstoedit. It appears that the easiest way to do this is to edit /etc/paths directly. You can also look at ~/.MacOSX/environment.plist or the usual bash files.

Have you enable the options to print pictures in:

Menu/Tools/Options/LibreOffice writer/Print/Contents.

Yes, this option is enabled. and my problem is not due to that.