Bug 67465

Summary: EPS rendering: locating pstoedit on Mac a problem
Product: LibreOffice Reporter: Michael Meeks <michael.meeks>
Component: LibreofficeAssignee: Not Assigned <libreoffice-bugs>
Status: NEW --- QA Contact:
Severity: normal    
Priority: medium CC: etiffany, libreoffice, qubit, vstuart.foote
Version: 4.1.0.3 rc   
Hardware: Other   
OS: All   
See Also: https://bugs.freedesktop.org/show_bug.cgi?id=34836
https://bugs.freedesktop.org/show_bug.cgi?id=67464
https://issues.apache.org/ooo/show_bug.cgi?id=72096
Whiteboard: EasyHack DifficultyInteresting SkillCpp TopicCleanup
i915 platform: i915 features:

Description Michael Meeks 2013-07-29 09:53:09 UTC
bug#34836 is an unreadable mess - but one of its problems is that of not being able to find pstoedit in it's path.

Rendering EPS requires pstoedit thus:

static bool RenderAsEMF(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &rGraphic)
{
    TempFile aTemp;
    aTemp.EnableKillingFile();
    OUString fileName("pstoedit" EXESUFFIX);
    OUString arg1("-f");
    OUString arg2("emf:-OO");
    OUString arg3("-");
    OUString output;
    osl::FileBase::getSystemPathFromFileURL(aTemp.GetName(), output);
    rtl_uString *args[] =
    {
        arg1.pData, arg2.pData, arg3.pData, output.pData
    };


If the program is not in your path - it will not be found. We could of course try to add a series of paths to try in this eventuality.
Comment 1 Michael Meeks 2013-07-29 09:59:07 UTC
Making this an easy-hack. The code is in:

filter/source/graphicfilter/ieps/ieps.cxx

If the initial spawning of that filter fails, we should probably hard-code a set of other paths particularly: /opt/local/bin - which seems to be where Mac people like to hide this out of their path these days ;-)

Thanks !
Comment 2 Björn Michaelsen 2013-10-04 18:47:02 UTC
adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility.

see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details
Comment 3 Robinson Tryon (qubit) 2013-10-23 17:24:44 UTC
Removing comma from whiteboard (please use a space to delimit values in this field)
https://wiki.documentfoundation.org/QA/Bugzilla/Fields/Whiteboard#Getting_Started
Comment 4 V Stuart Foote 2014-04-27 19:36:09 UTC
There was a similar issue with ieps.cxx for Windows builds to find correct path to ImageMagick convert.exe (see AOO issue 72096) Caolan M. fixed that back in Nov 2009, perhaps a similar approach for OSX and pstoedit?

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.