Graphics, Figures & TablesInclusion of EPS Figures produced with PS Printer Driver

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
hh137
Posts: 4
Joined: Wed Sep 18, 2013 7:40 pm

Inclusion of EPS Figures produced with PS Printer Driver

Post by hh137 »

I'm new to this forum. I searched the forum but couldn't find an answer to the following problem.

Under Windows XP, I used to be able to create eps figures for inclusion in LaTeX documents by printing to a postscript printer and capturing the output in an EPS file, configuring the printer to produce an EPS rather than PS file. This no longer works under Windows 7. To be specific, I can create an eps figure that I can view fine in a postscript viewer like GSview, but when I include this figure into a LaTeX document (using graphicx), I see a blank space where the figure is supposed to be. I usually go LaTeX -> DVI -> PS and the problem shows up already in the DVI file. I seems that somehow the Windows 7 printer drivers include/omit some information in the EPS file that is misinterpreted by the latex interpreter, but can be handled fine by GSview.

If somebody has a solution to this problem, I'd be most grateful.

Thanks -- hh

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: Inclusion of EPS Figures produced with PS Printer Driver

Post by localghost »

Attach one of the problematic files to your next post for examination by upload to the forum server.


Best regards and welcome to the board
Thorsten
hh137
Posts: 4
Joined: Wed Sep 18, 2013 7:40 pm

Inclusion of EPS Figures produced with PS Printer Driver

Post by hh137 »

localghost wrote:Attach one of the problematic files to your next post for examination by upload to the forum server.

Best regards and welcome to the board
Thorsten
Thanks for the quick answer. Attached please find an example. This was created with the driver for the HP Color LaserJet 2500 PS printer, but the problem is not printer-specific. So far, I have not found any printer that works.

Thanks,
--hh
Attachments
test1.eps
(12.73 KiB) Downloaded 403 times
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: Inclusion of EPS Figures produced with PS Printer Driver

Post by localghost »

I don't know what went wrong during the production of the EPS file. Perhaps an outdated version of the printer driver. It only seems to produce Postscript Level 1. Check if the software with which you are drawing your figures offers direct export to EPS or PDF.

I was able to repair the file by "eps2eps", which is part of Ghostscript. And the repaired EPS can be converted to PDF. Both files are attached.
Attachments
test2.eps
(3.27 KiB) Downloaded 412 times
test2.pdf
(2.49 KiB) Downloaded 358 times
hh137
Posts: 4
Joined: Wed Sep 18, 2013 7:40 pm

Re: Inclusion of EPS Figures produced with PS Printer Driver

Post by hh137 »

Wonderful! You have made my day! Thank you very much! I did not know about eps2eps. This works fine now. I can easily write a macro for my WinEdt editor to do the eps2eps conversions on the fly.

I have used the latest drivers for the printers I tried this on, so an outdated drivers doesn't seem to be a likely source of the problem. It must be some Win7-specific thing that produces the buggy(?) eps file. Anyway, I'm happy that you've found a workaround, whatever the source of the problem is, and I will not need to waste any more time on this.

Thanks again.
--hh
hh137
Posts: 4
Joined: Wed Sep 18, 2013 7:40 pm

Re: Inclusion of EPS Figures produced with PS Printer Driver

Post by hh137 »

Small addition here for completeness in case somebody else stumbles across this thread with a similar problem: If the original EPS file contains text, depending on how the fonts are embedded in the file, "eps2eps" may render them as bitmapped fonts, which is rather ugly. Using "ps2epsi" instead to create an EPSI file does not suffer from this shortcoming. To use them in LaTeX, they need to have the extension .eps (not .epsi). (EPSI files are quite a bit larger than EPS files, but, I guess, one cannot have everything.)
Post Reply