Issue 9357 - Cannot include EPS files generated from Grace (xmgr)
Summary: Cannot include EPS files generated from Grace (xmgr)
Status: CLOSED FIXED
Alias: None
Product: Draw
Classification: Application
Component: code (show other issues)
Version: OOo 1.1 Beta2
Hardware: PC All
: P4 Trivial (vote)
Target Milestone: OOo 2.0
Assignee: thb
QA Contact: issues@graphics
URL:
Keywords:
: 19122 (view as issue list)
Depends on:
Blocks:
 
Reported: 2002-11-19 07:17 UTC by Unknown
Modified: 2004-04-23 11:08 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
eps file generated with grace 5.1.12 (35.44 KB, application/octet-stream)
2003-06-12 08:40 UTC, quetschke
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Unknown 2002-11-19 07:17:29 UTC
When I try to include any EPS file generated from Grace
(a.k.a. xmgr) as a Graphic Object from any OpenOffice application
I get an error message saying that the file format is not
recognized. The problem is that it doesn't recognize the EPS file
when it has a header of the form

--
%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: (atend)
--

Usually Grace appends the BoundingBox info at the end of
the file, as in

--
%%Trailer
%%BoundingBox: 0 29 632 584
%%DocumentNeededResources: font Times-Roman
%%EOF
--

The 'usual' EPS file has this info at the header, like

-- 
%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 0 0 650 600
--

and when I manually change to this format it reads
okay. I can fix this also by disabling the option "Tight 
BoundingBox" from Grace, but I believe both forms 
should be accepted as a valid EPS file.

-Artur
Comment 1 matthias.huetsch 2002-11-19 20:52:59 UTC
Hi Sven,

I guess this is yours (at least 'ieps.cxx' makes me believe that)

Matthias
Comment 2 sven.jacobi 2002-11-20 14:54:08 UTC
I will change this. Currently the bounding box is being searched 
within the first 4kb of an eps file.
Comment 3 Joost Andrae 2003-02-17 11:07:54 UTC
JA: re-prioritized according to new priority guide lines
Comment 4 sven.jacobi 2003-03-24 10:52:19 UTC
This bug has been fixed now for OOo 1.1 Beta2.

The fix will be available in CWS[draw9] and takes place in:
vcl/win/source/gdi/salgdi.cxx
goodies/source/filter.vcl/ieps.cxx
Comment 5 sven.jacobi 2003-04-17 16:20:55 UTC
SJ->WG: This bug can now be verified on cws[draw9].
Comment 6 wolframgarten 2003-04-23 11:52:15 UTC
Fixed.
Comment 7 wolframgarten 2003-04-23 11:52:30 UTC
Verified.
Comment 8 wolframgarten 2003-04-29 10:28:04 UTC
Tested and closed.
Comment 9 quetschke 2003-06-12 08:39:37 UTC
Sorry to reopen the issue, but I just ran into the same problem
with beta2.

I have an *.eps generated with grace 5.1.12, with

%%BoundingBox: (atend)

and it cannot be imported by OOo 1.1 beta2. If I manually move
the BoundingBox from the end to the top it works.

Setting target.
Comment 10 quetschke 2003-06-12 08:40:41 UTC
Created attachment 6817 [details]
eps file generated with grace 5.1.12
Comment 11 wolframgarten 2003-06-12 11:55:16 UTC
Changed target to 1.1.1. Reassigned to Sven, please have a look.
Comment 12 sven.jacobi 2003-06-16 09:28:47 UTC
Yes I see, the bug can be reproduced with your attachment. 
Comment 13 sven.jacobi 2003-07-16 10:14:58 UTC
I fixed the problem that our eps import was only detecting eps files
having a BoundingBox statement within the first 4096 bytes.

The reason that the attachment can't be loaded anyway is that our
BoundingBox parsing is not evaluating the "(atend)" statement, with
the result that is does not search for a second BoundingBox.

Comment 14 quetschke 2003-10-29 13:35:11 UTC
*** Issue 19122 has been marked as a duplicate of this issue. ***
Comment 15 sven.jacobi 2004-01-23 11:05:38 UTC
SJ->THB: At the moment I have too many bugs and too less time to fix them, so
would you please so nice and takeover this issue, thanks.
Comment 16 thb 2004-01-26 12:49:53 UTC
Along the way, reduced prio to 4, regarding the comments above.
Comment 17 rk 2004-03-04 08:29:09 UTC
I used xmgrace extensively to create plots for my dissertation, and ran into the
same problem.  One work around (other than manually editing the eps file) is to
uncheck "Tight BBox" option for eps device options. Here is an example:

1.) Default: Tight BBox on:
%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: (atend)
%%LanguageLevel: 2
%%Creator: Grace-5.1.12
....
....
%%Trailer
%%BoundingBox: 1 16 395 330
%%DocumentNeededResources: font Helvetica
%%EOF

2.) TightBBox off:
%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 0 0 414 342
%%LanguageLevel: 2
%%Creator: Grace-5.1.12
....
....
%%Trailer
%%DocumentNeededResources: font Helvetica
%%EOF

It is a work-around, not a solution though.


Comment 18 thb 2004-04-23 11:07:25 UTC
I'm closing this issue, the remaining feature request is handled with i28260.
Comment 19 thb 2004-04-23 11:08:00 UTC
.