Discussion:
Newbie problem with \includegraphics and xelatex
Brian Passingham
2009-03-31 13:04:14 UTC
Permalink
Hi there.

I'm sure I'm making an elementary error here somewhere, but I'm having
trouble getting PDF graphics included in a document.
This is a much stripped down version of the original document, but
should allow diagnosis of the problem:

\documentclass[10pt,a4paper]{article}
\usepackage[xetex,final]{graphicx}
\usepackage{fontspec,xunicode,fixltx2e}
\defaultfontfeatures{Mapping=tex-text}
\setmainfont{TeX Gyre Pagella}
\graphicspath{.}
\begin{document}
Testing XeLaTeX --- Predictions for α-nonexistentamine :

\includegraphics[width=5cm]{plotivVEN.pdf}

That's all folks.

\end{document}


This "works" - the text is okay, and there are no error messages -
but produces an output PDF file with no graphic - just a gap.

Versions:
XeTeX 3.141592-0.996 (Web2C 7.5.6)
kpathsea version 3.5.6
xdvipdfmx-0.4

My guess is that I have a version mis-match, but I could do with some
pointers about how to resolve them (packages were installed by someone
else...).

Thanks in advance.
Brian Passingham
刘David
2009-03-31 13:34:58 UTC
Permalink
Mine is ok!
Something must be wrong.
Post by Brian Passingham
Hi there.
I'm sure I'm making an elementary error here somewhere, but I'm having
trouble getting PDF graphics included in a document.
This is a much stripped down version of the original document, but
\documentclass[10pt,a4paper]{article}
\usepackage[xetex,final]{graphicx}
\usepackage{fontspec,xunicode,fixltx2e}
\defaultfontfeatures{Mapping=tex-text}
\setmainfont{TeX Gyre Pagella}
\graphicspath{.}
\begin{document}
\includegraphics[width=5cm]{plotivVEN.pdf}
That's all folks.
\end{document}
This "works" - the text is okay, and there are no error messages -
but produces an output PDF file with no graphic - just a gap.
XeTeX 3.141592-0.996 (Web2C 7.5.6)
kpathsea version 3.5.6
xdvipdfmx-0.4
My guess is that I have a version mis-match, but I could do with some
pointers about how to resolve them (packages were installed by someone
else...).
Thanks in advance.
Brian Passingham
_______________________________________________
XeTeX mailing list
http://tug.org/mailman/listinfo/xetex
--
Regards,

Wei Liu
=====================================
Mr. Wei Liu, Ph.D Candidate
Department of Geodesy and Geomatics
Wuhan Unversity
Wuhan, China. 430079.
e-mail: lwei7905-***@public.gmane.org

Tel :86-27-87650300(home); (086)13554015483(mobile)
=====================================
Ulrike Fischer
2009-03-31 13:40:12 UTC
Permalink
Post by Brian Passingham
Hi there.
I'm sure I'm making an elementary error here somewhere, but I'm having
trouble getting PDF graphics included in a document.
This is a much stripped down version of the original document, but
\documentclass[10pt,a4paper]{article}
\usepackage[xetex,final]{graphicx}
\usepackage{fontspec,xunicode,fixltx2e}
\defaultfontfeatures{Mapping=tex-text}
\setmainfont{TeX Gyre Pagella}
\graphicspath{.}
\begin{document}
\includegraphics[width=5cm]{plotivVEN.pdf}
That's all folks.
\end{document}
This "works" - the text is okay, and there are no error messages -
but produces an output PDF file with no graphic - just a gap.
Where is the graphic relativ to your document? What is the
graphicspath-command supposed to do? And what do you get if you run

xelatex --output-driver="xdvipdfmx -vv" <file>
--
Ulrike Fischer
Brian Passingham
2009-03-31 13:59:08 UTC
Permalink
Hi Ulrike:

1) Graphic was in the same directory, which led me to the
\graphicspath setting at some point yesterday.
2) xelatex --output-driver="xdvipdfmx -vv" cutdown.tex gets me the
relevant confession (thanks!) :

** WARNING ** Version of PDF file (1.4) is newer than version limit
specification.
[UNKNOWN]
** WARNING ** No image converter available for converting file
"./plotivVEN.pdf" to PDF format.
** WARNING ** >> Please check if you have 'D' option in config file.
)
** WARNING ** pdf: image inclusion failed for "./plotivVEN.pdf".
]

So now we know what's wrong... Now : what can I do about it? I think
there was some discussion of this some time ago - is it a .def file
issue of some kind?

Brian
Ulrike Fischer
2009-03-31 14:13:17 UTC
Permalink
Post by Brian Passingham
1) Graphic was in the same directory, which led me to the
\graphicspath setting at some point yesterday.
graphics in the current directory are always found so you don't need
a \graphicspath -- and even if you would need it: you need an extra
pair of braces.
Post by Brian Passingham
2) xelatex --output-driver="xdvipdfmx -vv" cutdown.tex gets me the
** WARNING ** Version of PDF file (1.4) is newer than version limit
specification.
[UNKNOWN]
** WARNING ** No image converter available for converting file
"./plotivVEN.pdf" to PDF format.
** WARNING ** >> Please check if you have 'D' option in config file.
)
** WARNING ** pdf: image inclusion failed for "./plotivVEN.pdf".
]
So now we know what's wrong... Now : what can I do about it? I think
there was some discussion of this some time ago - is it a .def file
issue of some kind?
Try

xelatex --output-driver="xdvipdfmx -vv -V 4"

or other numbers.

If it works: search for dvipdfmx.cfg and set there
V <your number>
--
Ulrike Fischer
Brian Passingham
2009-03-31 14:19:59 UTC
Permalink
Thanks again for the swift help. Using the -V 4 on the command line worked.
But I am slightly confused now.

In /usr/share/texmf/dvipdfmx I have
-rw-r--r-- 1 root root 7043 2008-05-15 13:18 dvipdfmx.cfg

Which defines :

%% PDF Version Setting
%%
%% PDF (minor) version stamp to use in output file.
%% This also implies maximal version of PDF file allowed to be included.
%% Dvipdfmx does not support 1.0, 1.1, 1.2 since TrueType font embedded
%% as CIDFontType2 requires at least version 1.3. Transparent imaging
%% model requires version 1.4. So if you want soft-masking support for
%% PNG image with alpha channels, you should set version to 4 or higher.

% V 4

So why wasn't it working already ...?
Post by Ulrike Fischer
Post by Brian Passingham
1) Graphic was in the same directory, which led me to the
\graphicspath setting at some point yesterday.
graphics in the current directory are always found so you don't need
a \graphicspath -- and even if you would need it: you need an extra
pair of braces.
Post by Brian Passingham
2) xelatex --output-driver="xdvipdfmx -vv" cutdown.tex gets me the
** WARNING ** Version of PDF file (1.4) is newer than version limit
specification.
[UNKNOWN]
** WARNING ** No image converter available for converting file
"./plotivVEN.pdf" to PDF format.
** WARNING ** >> Please check if you have 'D' option in config file.
)
** WARNING ** pdf: image inclusion failed for "./plotivVEN.pdf".
]
So now we know what's wrong... Now : what can I  do about it?  I think
there was some discussion of this some time ago - is it a .def file
issue of some kind?
Try
 xelatex --output-driver="xdvipdfmx -vv -V 4"
or other numbers.
If it works: search for dvipdfmx.cfg and set there
V  <your number>
--
Ulrike Fischer
_______________________________________________
XeTeX mailing list
http://tug.org/mailman/listinfo/xetex
Ulrike Fischer
2009-03-31 14:22:32 UTC
Permalink
Post by Brian Passingham
Thanks again for the swift help. Using the -V 4 on the command line worked.
But I am slightly confused now.
In /usr/share/texmf/dvipdfmx I have
-rw-r--r-- 1 root root 7043 2008-05-15 13:18 dvipdfmx.cfg
% V 4
So why wasn't it working already ...?
You have a comment sign before the V 4
--
Ulrike Fischer
Brian Passingham
2009-03-31 14:32:30 UTC
Permalink
You beat me to it. I'd just noticed that %. (I really must read what
I'm reading.)

I fear there may be another couple of questions later - I'm just
upgrading a not very idiomatic LaTex reporting template to use XeTeX.
Lack of image inclusion threatened to be a show-stopper, but I did
also notice a lot of warning messages...
Post by Ulrike Fischer
Thanks again for the swift help.  Using the -V 4 on the command line worked.
But I am slightly confused now.
In /usr/share/texmf/dvipdfmx I have
-rw-r--r-- 1 root root 7043 2008-05-15 13:18 dvipdfmx.cfg
% V  4
So why wasn't it working already ...?
You have a comment sign before the V 4
--
Ulrike Fischer
_______________________________________________
XeTeX mailing list
http://tug.org/mailman/listinfo/xetex
Peter Dyballa
2009-03-31 13:44:22 UTC
Permalink
Post by Brian Passingham
XeTeX 3.141592-0.996 (Web2C 7.5.6)
kpathsea version 3.5.6
xdvipdfmx-0.4
You're using TeX Live 2007?

You can try 'xelatex -no-pdf <file name>' followed by 'xdvipdfmx -vv
<file name>' which hopefully will give more information why xdvipdfmx
fails to insert the PDF picture.

--
Greetings

Pete

War springs from unseen and generally insignificant causes.
– Anonymous
Loading...