images (eps, tif) not appearing in PDF

Having trouble installing Oxygen? Got a bug to report? Post it all here.
cjf
Posts: 3
Joined: Fri Apr 23, 2004 3:52 am

images (eps, tif) not appearing in PDF

Post by cjf »

Somewhere between my docbook document its transformation to a PDF, my images keep getting lost. The only way I can make anything appear is to put it in as a jpg. However, jpgs generally look bad in print and I would really, really prefer to use EPS and tif as a second choice. The PDF will both be viewed on screen and printed out. Here's how I'm going about it now in my document and the transformation's being done with XSLT->FOP:

<mediaobject id="Logo">
<imageobject role="fo">
<imagedata fileref="logo.eps" format="eps"/>
</imageobject>
</mediaobject>

It is a matter of getting the tags right? Of saving the file as binary vs ascii or is it a FOP issue? And if it is a FOP thing, what is the best way to work around it?

Thanks!
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

The EPS images are not lost. You think they are probably because you are viewing the PDF with Acrobat Reader. PostScript devices (for example a PostScript printer, a viewer application using GhostScript) will render the EPS images correctly.

Best regards,
Sorin
Radu
Posts: 9434
Joined: Fri Jul 09, 2004 5:18 pm

Re: images (eps, tif) not appearing in PDF

Post by Radu »

Updating this post with more details:

By default Oxygen generates PDF output using the open-source Apache XSL-FO processor:
http://xmlgraphics.apache.org/fop/1.0/graphics.html

They state:
Not all image formats are supported for all output formats! For example, while you can use EPS (Encapsulated PostScript) files when you generate PostScript output, this format will not be supported by any other output format.
So you can generate PostScript output with EPS in it but not PDF.

The commercial RenderX XEP states the same:

http://www.renderx.com/reference.html#EPS
EPS images are supported in PostScript generator only. In the PDF generation module, they are replaced by a bitmap preview image (EPSI or TIFF) if available; otherwise, the corresponding area is left blank.
This means that in the PDF output it will use the preview image which is inside the EPS document (and which is usually low quality and sometimes grayscale).

Another commercial PDF processor which can be integrated with Oxygen is Antenna House which states:

http://ditadocs.content-lifecycle.com/w ... hostscript

A possible solution is to convert the EPS images to PDF with Ghostscript:

http://stackoverflow.com/questions/7854 ... eps-to-pdf

then to install a plugin in Apache FOP which can be used to render PDF images in a larger PDF:

http://www.oxygenxml.com/forum/post2739 ... gin#p27390

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply