Graphics, Figures & TablesProblem: Invisible EPS (in .divps and .ps; not in.pdf)

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
99sono
Posts: 5
Joined: Wed Jun 03, 2009 5:27 pm

Problem: Invisible EPS (in .divps and .ps; not in.pdf)

Post by 99sono »

Hi,
I am having some trouble displaying a .eps image in latex.

Problem:
I have managed to produce an .eps file by unconventional means, and some things are not working as they should.

1) When i compile my .tex srcs to .dvips and to .ps, the page that should contain the .eps figure is completely bugged: none of the text that should appear on top of the figure is displayed (e.x: section text); however, bellow the image (the Caption text and some footer text) appears swell.

1.1) Compiling to .dvi

Code: Select all

latex  -halt-on-error -aux-directory=./dump  -include-directory=./ -output-format=dvi src_file.tex
1.2) Compiling to .ps

Code: Select all

dvips src_file.dvi
2) When my file is compiled into .pdf there are no issues to complain about (well, not anymore anyway).

2.1) Compilation to .pdf

Code: Select all

ps2pdf src_file.ps

Background story.
1) To begin, I am using miktex to compile my tex files on windows. The src file already includes a .eps file, which wasn't generated by me, and which is displayed just fine. So, I can tell you that some .eps files are displayed correctly (independently of the output format of the compilation). BTW, the .eps file that displays correctly was provided to me by my University (its the univ trademark symbol).

2) Now there are some charts generated by Excel that i need to post into my latex. Microsoft Excel does not appear to offer any convenient mechanism to export images into .eps file.

So what did i do:

2.1) After some googling, i found out a way to cheat excel to print post script files: install a pinter that generates printing data in post script format; the Apple Color Printer does that; and configure the desired printer it to use the local file port. Reference url bellow:
http://www.sketchpad.net/postscript-printer-winxp-3.htm

2.2) Now, I can double click the .ps file and, using ghost view, I can see my excel chart shiny and pretty. But Still, the format is .ps not .eps.

2.3) Somewhere else, I read that ghostview, by means of ghostscript, offered the facility of converting .ps->.eps. So that is what I did

2.4) And Here started the problems:

2.4.1) I could open the .eps generated file fine on ghostview;

2.4.2) But if asked ghost view to show me the bounding box of the file, it seemed to be something completely senseless, part of it was not even displayed it went out of the screen;

2.4.3) The .pdf files that i generated did display the image, but the image was rendered (parts of it) on top of the caption text, and there were a number of rendering placement issues;

2.4.4) Taking a closer look into the .eps file i noticed that it appeared to have to interesting variables, one of which I had never seen in other .eps files. The page bounding box. Hence, since the bounding box variable seemed rigged. I tried feeding the includegraphics the option bb = (and here i put the page bounding box values). After doing this, the .pdf generated files no longer had any picture placement problems.


So right now, the situation is. In terms of bounding box problems, i seem to have solved the issued. In terms of making my .eps picture visible, the problems still remain. I would gladly post both .ps and .eps pictures. But I don't think the forum allows one to attach data.

By the way, something that I have also noticed is that when i go to the page containing the .eps picture in the compiled .ps. Ghostview displays the .eps image for a fraction of a section, before turning all that into white.


Finally, the code used to include the graphics is:

Code: Select all

\begin{figure}[h]
\centering

\scalebox{0.25}{
\includegraphics[angle=-90]{figs/ch5_experiences/experience_1/ora_delta_ntups_exp2_throughput_chart.eps}
}
\caption{Throughput chart. }
\label{fig:ora_exp2_delta_ntups_throughput}
\end{figure}
You will notice that the includegraphics command is no longer using any bb= parameter. That is simply because I made the bounding box correction directly on the .eps file: i replaced the "page bounding box" values by the "bounding box" values. And as for the angle parameter, it seems that the .ps has the chart standing up (+ 90 degree) instead of laying down. So that is just a correction to the display orientation.

Does anyone have any ideas on why this page is having trouble being rendered?

Recommended reading 2024:

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

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

99sono
Posts: 5
Joined: Wed Jun 03, 2009 5:27 pm

Re: Problem: Invisible EPS (in .divps and .ps; not in.pdf)

Post by 99sono »

Well,
i solved the problem.

1) Tune the printer do dump the post script file in .eps format. THis one is essential to get the image to be rendered in the fricking .dvi and .ps viewers.

2) Doing this creates the problem that exporting in landscape format screws it all up

3) Export in landscape format anyway

4) Open ghost view

5) The bounding box is all fracked up, as well as half the picture is sliced of

5) Tell ghostview that you want an A3 page or as big as it gets

6) Now the picture should all fit into the page, even being in landscape mode

7) Export (ps->eps) - yest the file is already an eps file, do it anyway - and don't let ghostview detect automaticlly a bounding box

8) Put the proper limits for your image

9) FINALLY, you get a damn .eps figure, in landscape mode that can actually be imported into the damn latex project.


This is fracking shame, that after all these years of unproper mirocsoft office, as well asd open office, suport of exporting their charts and vectorial graphics, no one has come up with a single decent copy past solution to target this problem. What a waste of time.
And as for the microsoft developer, it would takem them 5 minutes to find the libraries to export their graphics into whichever output format the user wants.

This should be a 5 minutes issue, not a two days problem.
Post Reply