Dear all,

in fact I found a solution. The output filter has already implemented the
feature to output the text as "text" and not as curves or hex encoded things
:)


Just look for
"C:\Documents and Settings\USER
NAME\Applicationdata\OpenOffice.org2\user\registry\data\org\openoffice\Office\Common.xcu"
and change the following lines

<node oor:name="Filter">
 <node oor:name="Graphic">
  <node oor:name="Export">
   <node oor:name="EPS">
    <prop oor:name="ColorFormat" oor:type="xs:int">
     <value>1</value>
    </prop>
    <prop oor:name="Version" oor:type="xs:int">
     <value>2</value>
   </node>
  </node>
 </node>
</node>

to make it look like this

<node oor:name="Filter">
 <node oor:name="Graphic">
  <node oor:name="Export">
   <node oor:name="EPS">
    <prop oor:name="ColorFormat" oor:type="xs:int">
     <value>1</value>
    </prop>
    <prop oor:name="Version" oor:type="xs:int">
     <value>2</value>
    </prop>
    <prop oor:name="TextMode" oor:type="xs:int">
     <value>2</value>
    </prop>
   </node>
  </node>
 </node>
</node>

After a restart of the whole open office (including the Quickstarter)
everytime you export an eps you will have real text inside your eps file and
psfrag will not have any problems to replace the text with latex text :)

Hope this is useful for someone out there.

Thanks anyway for your help. Maybe the next time I really need it :)

Joachim


2007/5/31, Joe Smith <[EMAIL PROTECTED]>:

Joachim Zettler wrote:
> ... Now when I try to export the file from draw to an eps file it
> seems that the text is not exported as text but just as curves and
> therefore I am not able to replace my text with psfrag :(

Interesting. Yes, I think you are right. Perhaps they do this to avoid
the need for embedding fonts in the EPS. I don't know; it's very odd.

> Could you help me how I can change the export filter of draw to
> export the text as real text inside the eps file?

To generate EPS files from Draw, I typically use the "Print to file"
option to get a Postscript file, then use ps2epsi to convert it to EPS.
That works well; in fact I never knew there was an EPS export until now.

But, it still may not help you. Text objects are represented in the file
as characters from an embedded font, but the text is not plain.

I created a single text box with the content

   Text
   object:
   Hello EPS

and output to Postscript, then converted to EPS.

In the EPS file (and in the PS output), the strings look like this:
> <5465787420>
> [94 89 99 67 0]
> xshow
> 1019 1527 moveto
> <6F626A6563743A>
> [98 99 58 89 76 67 0]
> xshow
> 1019 1700 moveto
> <48656C6C6F20455053>
> [125 89 50 50 98 51 102 97 0]
> xshow

$ echo -e "Text object:Hello EPS" | od -tx1
0000000 54 65 78 74 20 6f 62 6a 65 63 74 3a 48 65 6c 6c
0000020 6f 20 45 50 53 0a

So the text is hex-encoded and broken into lines. You will have to take
that into account to do your replacement.

<Joe

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to