Issue 10882 - EPS export doesn't work properly (Text width is not correct)
Summary: EPS export doesn't work properly (Text width is not correct)
Status: CLOSED FIXED
Alias: None
Product: Draw
Classification: Application
Component: code (show other issues)
Version: OOo 1.1 Beta
Hardware: PC Windows 2000
: P2 Trivial (vote)
Target Milestone: OOo 1.1 RC
Assignee: wolframgarten
QA Contact: issues@graphics
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-23 08:50 UTC by aeropagita
Modified: 2003-09-08 16:52 UTC (History)
1 user (show)

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


Attachments
the result of our latest PostScript export including gradients and TextMode2 (22.17 KB, application/postscript)
2003-02-14 13:06 UTC, sven.jacobi
no flags Details
Gradient filled rectangle, EPS export (12.04 KB, patch)
2003-02-14 15:36 UTC, aeropagita
no flags Details | Diff
example demonstrating text width problem (65.21 KB, application/octet-stream)
2003-05-13 13:52 UTC, sven.jacobi
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description aeropagita 2003-01-23 08:50:30 UTC
When EPS exporting a drawing a few problems occur:
1. gradient filled non-square objects are transformed into black rectangles (see
issue 8131, which's closed in Linux but clearly should be reopened);
2. more important, the transparency effect doesn't turn out in the exported
files. This is a common problems with exporting in EPS (yet in this case it
happens also with GIF and I suppose other formats).
3. Marginally, text isn't recognised as such by LaTeX psfrag and accordingly
replaced. However my inability to operate psfrag could take a big role in this.
Thanks.
Comment 1 wolframgarten 2003-01-23 09:56:42 UTC
Set to new.
Comment 2 wolframgarten 2003-01-23 10:16:01 UTC
1. As I wrote in issue 8131 this will be fixed in version1.1 (beta).
So the fix cannot be found in 1.0.2. and there is no use in my opinion
to reopen the issue.
For the other two points I hand this over to Sven. Fixing this for the
OO 1.1 version will not be possible because there is too much that has
to be changed. Target set to OO 2.0.
Comment 3 sven.jacobi 2003-01-28 16:21:41 UTC
1. The problem with filled non-square objects has been solved.

2. 100% transparency is working via clip region, but there is no good 
solution to store half-transparency or alpha channel. The only 
possibility to export such a alpha-channel is to export the whole 
graphic as single bitmap, but this also lead to eps files having a 
enormous size. So the second point won't fixed

3. To recognise text in eps files, the eps file has to be stored 
using the normal text option. Due to the reason, that each character 
is stored on its own, you will only be able to find single characters.

Your third point is something, which can be improved. I will add a 
text mode allowing the export of full text arrays.

Just for your information:
Up from OOo 1.1 Beta, the text option is removed from the user 
interface. This happened, because not using glyph outlines, is often 
not sensible for normal users. Text including special characters and 
Unicode, are mostly not exported properly to eps. This already let to 
a huge amount of bugs.
But via configuration or api the textmode can be used further on.
I will publish a basic macro on openoffice.graphics.users which will 
demonstrate how to export documents to eps using special filter 
options such as text mode.


I changed the summary to point out the main problem.
Changed target to OO 1.1 Beta.

HTH,
Sven
Comment 4 aeropagita 2003-01-30 08:45:39 UTC
Dear Sven, really sorry but I stick with my point: gradient filled not
square objects are NOT properly exported (I tryed again EPS export
just to be sure) and the bug is NOT fixed.
As for the rest, thanks for the reply and for including that text
export mode in the near future.
Aeropagita
Comment 5 sven.jacobi 2003-02-14 13:05:08 UTC
SJ: The new textmode has been added, so it should now be possible to 
recognize complete strings. Your objection that gradient fills are 
not clipped can't be certified in the latest EPS version
(graphics/goodies/source/filter.vcl/eps/eps.cxx -r1.19.16.2).
Comment 6 sven.jacobi 2003-02-14 13:06:48 UTC
Created attachment 4731 [details]
the result of our latest PostScript export including gradients and TextMode2
Comment 7 aeropagita 2003-02-14 15:36:25 UTC
Created attachment 4738 [details]
Gradient filled rectangle, EPS export
Comment 8 aeropagita 2003-02-14 15:43:14 UTC
Dear Sven,
  your attach works fine, true, but how did you make it?
I enclose my gradient filled rectangle EPS export and it doesn't quite
look how it should. 
I assure I tried different export options: color, gray, gliph outline,
but nothing better than that.
Now, either it's me doing something wrong all the time, or the system
conf. or OS determines the result. I run Win 2K.
I can't offer any precise explanation other than I'm sure my system is
not in such shambles that a simple export operation wouldn't work.

As for the text exporting, good to hear it's fixed ! How do I get the
patch, though ?

Cheers,
Aeropagita
Comment 9 sven.jacobi 2003-02-14 16:50:57 UTC
The fix will be available in the next OOo minor release (OOo 1.1 
Beta). Patching OOo 1.0 is not possible, because many drawing layer 
core changes are required.
If you can't wait until OOo 1.1 is released, you should try out the 
next developer build based upon SRX644 which will be released in some 
days.

HTH,
Sven
Comment 10 sven.jacobi 2003-02-19 10:43:34 UTC
reopened
Comment 11 sven.jacobi 2003-02-19 11:15:14 UTC
SJ->WG: I tested the new textmode in cws[apps01], it is working.
Comment 12 wolframgarten 2003-02-19 11:37:58 UTC
Fixed.
Comment 13 wolframgarten 2003-02-19 11:38:16 UTC
Verified.
Comment 14 wolframgarten 2003-02-22 14:01:58 UTC
Closed.
Comment 15 aeropagita 2003-05-08 09:22:48 UTC
Hi Sven,
  I checked the gradient export and now it does work: well done on that !
On the other hand, I feel bound to point out that psfrag doesn't seem
to recognize and substitute text strings in my EPS exports, so I take
it your improved text mode, which takes care of text array, isn't much
help on that respect.

Would you please give it a try or tell me how to work around
Cheers,
Aeropagita

P.S: The problem is that I need a tilde on a symbol in the draw, yet,
as I pointed out in bug nr.goodness knows, formulae are not exported
at all and just desappear. So I had to resort to good old psfrag
which, as it happens, doesn't work either. Too bad.
Comment 16 wolframgarten 2003-05-09 08:34:07 UTC
Reassigned to Sven.
Comment 17 michael.bemmer 2003-05-09 09:08:39 UTC
Re-targeted to 1.1 RC, beta is out.
Comment 18 sven.jacobi 2003-05-13 13:50:52 UTC
I can't reproduce the problem you have with substituting text. And
also formulas are not disappearing if exporting to eps, there is just
a little problem with the text width, therefore I added a attachment
(formula.zip) which shows the failure, this will be fixed.

I changed the title from (Text is not recognised) to (text width not
correct) to have a better overview.
Comment 19 sven.jacobi 2003-05-13 13:52:44 UTC
Created attachment 6181 [details]
example demonstrating text width problem
Comment 20 aeropagita 2003-05-13 15:02:35 UTC
Dear Sven,
  your attach works fine with me as well.
However, I suggest you take a look at issue 13131, which brings along
an attach where the formula completely disappears.
It might be due to the way you produce it.
I just created a text box and there I put a formula through
insert/object/formula. Please note that I can't manage much of formula
writing in OO, yet I'm sure it is there in the .sxd file.
I think there's a serious mistake in here.

Regarding psfrag, I stick to my point and cannot have psfrag
substitute text strings in the eps file. Whether it's a matter of a
faulty psfrag, viewer, postscript driver or text array handling, I
unfortunately don't know. I usepackage psfrag and then, right before
the includegraphics, issue a psfrag. The viewer correctly shows a list
of substitutions, yet they are not printed accordingly. I fear psfrag
doesn't recognize the text string to be dealt with. Please note it
doesn't work with single character tags as well.

All the rest is in your hands....
Aeropagita
Comment 21 sven.jacobi 2003-05-13 15:24:07 UTC
You are right, in Issue 13131 the formula is disappearing, it seems
that there is a wrong clip region used. If I know summarise this,
there is Issue 13131 which is adressing missing graphics, this Issue
is for wrong font width, and of course there is your font substitution
problem left. I will check if the substitution problem can be reproduced.
Comment 22 aeropagita 2003-05-13 18:27:25 UTC
Dear Sven,
  glad to hear I'm right now and again: the last thing I want is to
bother people with made up problems.

The text substitution issue is quite a drag, please let me know why
it's not working, it might be my fault and I should like to know.

Have a nice day,
Aeropagita
Comment 23 clippka 2003-06-05 09:36:16 UTC
code review done
Comment 24 sven.jacobi 2003-06-05 09:43:25 UTC
At least the problem with the wrong font width has been fixed now. The
fix takes place in cws[sj01]

vcl/source/gdi/outdev3.cxx
vcl/source/gdi/outdev.hxx
goodies/source/filter.vcl/eps/eps.cxx
Comment 25 sven.jacobi 2003-06-05 09:44:04 UTC
SJ->WG: This bug is now ready to be tested in cws[sj01].
Comment 26 wolframgarten 2003-06-11 14:02:31 UTC
Set to fixed.
Comment 27 wolframgarten 2003-06-11 14:02:47 UTC
Verified.
Comment 28 wolframgarten 2003-06-12 08:33:35 UTC
Tested and closed.