Apache OpenOffice (AOO) Bugzilla – Issue 124686
EPS contents only shown with additional tools or if preview in EPS available
Last modified: 2017-05-20 10:35:44 UTC
Steps how to reproduce Attachment 57833 [details] for Issue 96046 with "AOO 4.1.0 RC3 – English UI / German locale [AOO410m17(Build:9763)) - Rev. 1586584 2014-04-11 08:56:50]" on German WIN7 Home Premium (64bit)", “historic” 4. User Profile used for all predecessor versions: 1. Open document from AOO Start Center Expected: Picture as per Attachment 83193 [details] for Issue 124684 Actual: Empty rectangle, may be with placeholder text "Creator:inkscape 0.45.1" (With OOo 2.0.2) :-)
Created attachment 83195 [details] Extracted EPS This one might have a more general root, attachment will not show contents in DRAW
Picture visible OK AOO410m17(Build:9763) - Rev. 1586584 2014-04-11 09:13 - Linux x86_64 Debian
Confirmed with AOO420m1(Build:9800) - Rev. 1586681 Rev.1586681 Win 7
Tried with AOO401, AOO34, OOo3.3, OOo3.2, all do the same. Checked for eps import, what we have is a filter (ieps.cxx) which: - tries to find an embedded preview (wmf or tiff) - tries "%%BeginPreview:" in eps prolog format - tries convert to emf using external tool 'pstoedit' - tries convert to png using external tool 'convert' - tries convert to png using external tool 'gs' ('gswin32c' on win) -> if all that goes wrong, creates the red rectangle and tries to add info from the eps (looking for "%%Title:", "%%Creator:", "%%CreationDate:" and "%%LanguageLevel:"). Thus the success depends heavily on what external tools are available on the machine in the path AOO is using. On my machine 'convert' is found (it's ImageMagick 6.7.2-7), but conversion wents wrong somehow...
Is it possible to notify user what external tool to install?
Looks as if convert (ImageMagick) itself uses gswin32c.exe which is not available (Postscript delegate failed). After installing GhostScript and making available to AOO in the path the image is shown. Thus this error depends on local configurations of the machine AOO is executed on (if tools like GhostScript are installed), it's not an AOO internal error. AOO itself has no own PS interpreter, that would be possible but too much work.
@Edwin: I think it makes not too much sense; all this is only about a *preview* of the eps content; it is still not exported to pdf or printed, except on PS printers (hopefully). Normally the eps should already contain a preview image, then all this is not needed. To use this conversion path that is intended for a preview image to create content for the exports and printing is probably not a good idea; the quality is a png bitmap in a given resolution, not sufficient for people who use eps probably by purpose. Maybe something for the readme file or help (if not already there?)
wont fix per comment 6 see issue 124733
I should have read Help, what tells about several limitations concerning EPS. And indeed, Printing of the rectangle preview with a "PS printer -> PDF" (FreePDF) shows a nice document from attachment 83195 [details] (a) It's a little worrying to find EPS quite normally listed in the allowed file types list. May be there should be a hint like "for limitations see Help"? (b) I have installed Ghostscript, helps nothing. (c) I Installed pstoedit 3.62 from sourceforge, does not work, but may be I need to reboot PC or something else? I will try later (d) IF pstoedit / GS will work we should leave a hint somewhere in Documentation or a minimum Extension only providing a little help and a link to source forge ("... on your own risk ...") I adapt Summary to current state of research
@Rainer: (a) yes in the sense that it is only *transported* and will be visible only when the target is a PS printer/export (b) helps here, but it needs to be in the path for office (I added to user path in Win7 control panel, search for path) (c) could not get running, it potentially can produce wmf, thus would stay on vector graphic (for quality) On win this may be not standard, but gs and pstoedit may work on linux out of the box (do not know mac)
Still found an error; the fallback EPS preview creation adds the author/creator/etc fields from the EPS file, but these are no longer shown in the graphic object. This is because the metafile to primitive decomposition for the META_TEXTRECT_ACTION is a little tricky. It needs to reuse the Font set so far for the subcontent. Also stumbled about vcl creating a default font with the empty constructor Font::Font() that uses a local static instance of Impl_Font called aStaticImplFont. Impl_Font::Impl_Font() itself sets no size for the Size-type member, thus the empty constructed default font has no size at all (and thus no height). This was used before I reused the font (see above) and is not a useful default. I changed the Impl_Font::Impl_Font() to init the FontSize to Size(0, 16) as default. Preparing commit...
"alg" committed SVN revision 1589449 into trunk: i124686 give empty constructed default font a default height
"alg" committed SVN revision 1589450 into trunk: i124686 reuse already set font for interpreting the MetaFile action META_TEXT...
Okay, corrected that, done.
fixed per comment 14
adapted target milestone