Graphics, Figures & TablesSome images invisible in DVI, PS, but visible in PDF. Why?

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
bb700092
Posts: 2
Joined: Thu Sep 23, 2010 3:26 pm

Some images invisible in DVI, PS, but visible in PDF. Why?

Post by bb700092 »

I need to generate PS and PDF files from Tex. I am having a hard time getting all the figures to show up in PS. While all of them show up fine in the PDF, only a few show up in the PS (and DVI). I am not sure why since all the figures were created in the same way -- printed to a PDF file using Adobe PDF printer, saved as a PS file, did a "PS to EPS" with "Automatically calculate Bounding Box" using GSview -- all in Windows XP. I have used WinEdt and TeXnicCenter, and see the same phenomenon in both.

A minimal working example is provided below. Two images in EPS format are attached -- Fig1.eps, Fig2.eps (http://www.mediafire.com/file/nit63q5f33ms6xh/Fig2.eps). Fig1 cannot be displayed in PS (and DVI) while Fig2 can be. Why?

Any suggestion will be highly appreciated.

Code: Select all

\documentstyle[graphicx]{article}

\begin{document}

\title{Title Goes Here}

\maketitle

\section{Introduction}

Let us consider this example.

\begin{figure}[htbp]
    \centering
        \includegraphics[width=0.25\textwidth]{Fig1.eps}
    \caption{Caption for the figure.}
\end{figure}

Thats it.

\end{document}
Attachments
Fig1.eps
(145.02 KiB) Downloaded 264 times
Last edited by bb700092 on Tue Sep 28, 2010 6:06 pm, edited 1 time in total.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

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

Some images invisible in DVI, PS, but visible in PDF. Why?

Post by localghost »

At first you should not use the LaTeX2.09 compatibility mode. We are using LaTeX2e and a document class is specified in a different way (see below). I have no problem with the below code.

Code: Select all

\documentclass[11pt,a4paper]{article}
\usepackage{graphicx}

\begin{document}
  \begin{figure}[!ht]
    \centering
    \includegraphics[width=0.25\textwidth]{Fig1.eps}
    \caption{Caption for \texttt{Fig1.eps}}
  \end{figure}
\end{document}

Bes regards and welcome to the board
Thorsten
bb700092
Posts: 2
Joined: Thu Sep 23, 2010 3:26 pm

Re: Some images invisible in DVI, PS, but visible in PDF. Wh

Post by bb700092 »

Thanks Thorsten, for your response. I am using your code and the attached Fig1.eps, and the figure still does not show up in PS (and DVI) but shows up in PDF. There is something else going on other than LaTeX 2.09 compatibility.
User avatar
shadgrind
Posts: 140
Joined: Thu Jul 16, 2009 12:39 am

Re: Some images invisible in DVI, PS, but visible in PDF. Wh

Post by shadgrind »

It works fine for me too. Maybe it's a problem with the DVI and PS viewer in TeXnicCenter. I use TeX Live 2009 in Linux, and using your LaTeX code I can see the image in the generated DVI file by using xdvi, and I can see the image in the generated PS file by using gv.
System: TeX Live 2012, Fedora 18 x86_64, GNU Emacs 24.2
centguy
Posts: 18
Joined: Tue Jan 06, 2009 5:42 am

Some images invisible in DVI, PS, but visible in PDF. Why?

Post by centguy »

I may have exactly the same problem.

This is on the relatively new CentOS 6.0 or CentOS 6.1 (I wish
it is fixed by RHEL people but apparently not)

Some info:
[xx@centos60-fuj ~]$ uname -a
Linux centos60-fuj 2.6.32-71.29.1.el6.x86_64 #1 SMP Mon Jun 27 19:49:27 BST 2011 x86_64 x86_64 x86_64 GNU/Linux
[xx@centos60-fuj ~]$ rpm -qva | grep xdvi
xdvik-22.84.14-9.el6.x86_64
[xx@centos60-fuj ~]$ rpm -qva | grep ghostscript
ghostscript-8.70-11.el6_1.2.x86_64
ghostscript-fonts-5.50-23.1.el6.noarch

Whenever I see a page with eps:
there are typical messages as shown below:
[xx@centos60-fuj tex]$ xdvi mram.dvi
Warning: Missing charsets in String to FontSet conversion
Warning: Unable to load any usable fontset
xdvi-xaw3d: Warning: Raw Postscript commands on page 1 may be rendered incorrectly.
gs: Error: /limitcheck in /findfont
gs: Operand stack:
gs: Times-Roman
gs: Execution stack:
gs: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval--
gs: 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- fals
gs: e 1 %stopped_push 1862 1 3 %oparray_pop 1861 1 3 %oparray_pop
gs: 1845 1 3 %oparray_pop 1739 1 3 %oparray_pop --nostringval--
gs: %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval--
gs: 2 %stopped_push --nostringval-- --nostringval-- %loop_continue --nost
gs: ringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1753
gs: 1 3 %oparray_pop --nostringval-- --nostringval-- false 1 %stopped
gs: _push --nostringval-- 1862 1 5 %oparray_pop 1861 1 5 %oparray_p
gs: op 1845 1 5 %oparray_pop 1739 1 5 %oparray_pop --nostringval--
gs: %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-
gs: - 2 %stopped_push --nostringval-- 1820 1 5 %oparray_pop
gs: Dictionary stack:
gs: --dict:1155/1684(ro)(G)-- --dict:0/20(G)-- --dict:87/200(L)-- --dict:23/
gs: 250(L)-- --dict:125/200(L)--
gs: Current allocation mode is local
gs: Current file position is 143160
gs: Error: /limitcheck in /findfont
gs: Operand stack:
gs: Times-Roman
gs: Execution stack:
gs: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval--
gs: 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- fals
gs: e 1 %stopped_push 1862 1 3 %oparray_pop 1861 1 3 %oparray_pop
gs: 1845 1 3 %oparray_pop 1739 1 3 %oparray_pop --nostringval--
gs: %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval--
gs: 2 %stopped_push --nostringval-- --nostringval-- %loop_continue --nost
gs: ringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1753
gs: 1 3 %oparray_pop --nostringval-- --nostringval-- false 1 %stopped
gs: _push --nostringval-- 1862 1 5 %oparray_pop 1861 1 5 %oparray_p
gs: op 1845 1 5 %oparray_pop 1739 1 5 %oparray_pop --nostringval--
gs: %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-
gs: - 2 %stopped_push --nostringval-- 1820 1 5 %oparray_pop
gs: Dictionary stack:
gs: --dict:1155/1684(ro)(G)-- --dict:0/20(G)-- --dict:87/200(L)-- --dict:23/
gs: 250(L)-- --dict:125/200(L)--
gs: Current allocation mode is local
gs: Current file position is 143160
gs: Error: /limitcheck in /findfont
gs: Operand stack:
gs: Times-Roman
gs: Execution stack:
gs: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval--
gs: 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- fals
gs: e 1 %stopped_push 1862 1 3 %oparray_pop 1861 1 3 %oparray_pop
gs: 1845 1 3 %oparray_pop 1739 1 3 %oparray_pop --nostringval--
gs: %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval--
gs: 2 %stopped_push --nostringval-- --nostringval-- %loop_continue --nost
gs: ringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1753
gs: 1 3 %oparray_pop --nostringval-- --nostringval-- false 1 %stopped
gs: _push --nostringval-- 1862 1 5 %oparray_pop 1861 1 5 %oparray_p
gs: op 1845 1 5 %oparray_pop 1739 1 5 %oparray_pop --nostringval--
gs: %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-
gs: - 2 %stopped_push --nostringval-- 1820 1 5 %oparray_pop
gs: Dictionary stack:
gs: --dict:1155/1684(ro)(G)-- --dict:0/20(G)-- --dict:87/200(L)-- --dict:23/
gs: 250(L)-- --dict:125/200(L)--
gs: Current allocation mode is local
gs: Current file position is 143160
What's wrong and how to solve it ?
I really wish I have the skill to build xdvi and save all these troubles.

Thanks!
User avatar
Stefan Kottwitz
Site Admin
Posts: 10326
Joined: Mon Mar 10, 2008 9:44 pm

Re: Some images invisible in DVI, PS, but visible in PDF. Wh

Post by Stefan Kottwitz »

DVI doesn't natively support PostScript, so not all DVI viewers are capable of displaying embedded PostScript images.

That's why I recommend using DVI for previewing only, and converting to PostScript (via dvips) for displaying the final result. I guess DVI is not your final format, or is it?

Stefan
LaTeX.org admin
centguy
Posts: 18
Joined: Tue Jan 06, 2009 5:42 am

Re: Some images invisible in DVI, PS, but visible in PDF. Wh

Post by centguy »

I agree with you that DVI does not natively support PS.

I am depending on xdvi to view all my electronic latex notes daily since
it is basic and it is very fast to move around the pages via the hyperlink within the page. So xdvi is a must for me.

Anyway, I think since I do not have such problem on CentOS 5.x but
only the recent new CentOS 6.x, I believe I have a good theory why such
thing happens.

99.9 % of my eps figure are prepared using xmgrace (one specific
version is Grace-5.1.20), and I xmgrace to output an eps with a format
that may be "too old" for the new ghostscript program in newer
Linux distributions.

I don't know how to solve it, it is either through a much newer
xmgrace that confirm to a newer eps format (it means I have to go through all xmgrace project files to output new eps files !) or the new ghostscript
that understand the old eps format adopted by xmgrace.

I believe this problem to be universal, but since most people
do not use xdvi so they are not hit by this.
centguy
Posts: 18
Joined: Tue Jan 06, 2009 5:42 am

Re: Some images invisible in DVI, PS, but visible in PDF. Wh

Post by centguy »

My bad. Apparently I installed packages from different repositories that
caused the problem. The problem is fully resolved in

https://www.centos.org/modules/newbb/vi ... 5&forum=56
Post Reply