Patrick Ben Koetter wrote:
> I'm using XXE 2.11 with the xep- and jimi-plugin (TIF support) on Windows XP.
> 
> I want to include EPS graphics in my document. There are two problems I have:
> 
> a) EPS graphics are not displayed in the editor, while other file formats
>    usually are. I remember reading something about this limitation and IIRC it
>    had something to do with the Jimi plugin, but I am not really sure if this
>    points towards the solution or is just something I am mixing up at the
>    moment.
>    The EPS graphics I am using have been built with TIF preview included.
> 
> b) XEP won't print EPS to PDF. It states that it can't find the file. I've
>    verified the path. This is my document:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
> "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd";>
> <article>
>   <title>foo</title>
> 
>   <section>
>     <title>bar</title>
> 
>     <para>baz</para>
> 
>     <figure>
>       <title>foo</title>
> 
>       <mediaobject>
>         <imageobject>
>           <imagedata fileref="abbildungen/abb-01-01.eps" format="EPS" />
>         </imageobject>
>       </mediaobject>
>     </figure>
>   </section>
> </article>
> 
> 
> This is the first time I am trying to use EPS and I might simply totally miss
> something. Any ideas where I could go on trying to fix this?

--> If you want to keep things as simple as possible:

> a) EPS graphics are not displayed in the editor

Not a problem. Just ignore this limitation.

> had something to do with the Jimi plugin

Jimi has nothing to do with TIFF previews inside EPS.

> b) XEP won't print EPS to PDF.

This is documented by RenderX. The workaround is to add a PDF
<imageobject> just after the EPS one (or simply to convert your EPS to PDF):

---
       <mediaobject>
         <imageobject>
           <imagedata fileref="abbildungen/abb-01-01.eps" format="EPS"/>
         </imageobject>

         <imageobject>
           <imagedata fileref="abbildungen/abb-01-01.pdf" format="PDF"/>
         </imageobject>
       </mediaobject>
---




--> If you want the best and are not affraid to do a little work
configuring XXE:

[1] Install the latest ghostscript on your PC.

[2] Add this snippet to your <XXE_user_preferences_dir>/addon/customize.xxe:

---
  <!-- =================================================================
    Requires Ghostscript 8+ to be installed. Will not work properly
    with Ghostscript 7 which does not support the -dEPSCrop switch.

    If the gs (gswin32c.exe on Windows) program is not
    in your PATH, you'll
    need to slightly edit the shell child elements below.

    Tested on Windows using:
    * Ghostscript 8.14, an interpreter for the PostScript
      language and for PDF.
      See http://www.cs.wisc.edu/~ghost/.
  ================================================================== -->

  <imageToolkit name="Ghostscript">
    <description>Converts EPS and PDF graphics to PNG.
Important: requires Ghostscript 8+.</description>

    <converter>
      <input extensions="eps epsf ps pdf" magicStrings="%!PS %PDF"/>
      <output extensions="png"/>

      <shell command='gs -q -dBATCH -dNOPAUSE -sDEVICE=png16m
                 -r96 -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dEPSCrop
                 %A "-sOutputFile=%O" "%I"'
             platform="Unix"/>

      <shell command='gswin32c -q -dBATCH -dNOPAUSE -sDEVICE=png16m
                 -r96 -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dEPSCrop
                 %A "-sOutputFile=%O" "%I"'
             platform="Windows"/>
    </converter>
  </imageToolkit>
---

[3] Restart XXE and the EPS images will be displayed on screen and
RenderX XEP will get them automatically converted to PNG.



--> If you really want the absolute best (no PNG rasters when converting
your documents to PDF) and are not afraid by reading this documentation:
http://www.xmlmind.com/xmleditor/_distrib/doc/configure/ch06s11.html

* You'll adapt the above Ghostscript-based <imageToolkit> in order to
automatically convert EPS to PNG (for screen rendering) *or* to PDF (for
XEP).

Reply via email to