summaryrefslogtreecommitdiff
path: root/Master/texmf-doc/doc/english/FAQ-en/html/FAQ-pdftexgraphics.html
blob: 71fd5d72a93576ed452c4bca79d5a48f76fa80bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<head>
<title>UK TeX FAQ -- question label pdftexgraphics</title>
</head><body>
<h3>Imported graphics in PDFLaTeX</h3>
<p>PDFTeX itself has a rather wide range of formats that it can
"natively" incorporate into its output PDF stream:
JPEG (<code>.jpg</code> files) for photographs and similar images,
PNG files for artificial bitmap images, and PDF for
vector drawings.  Old versions of PDFTeX (prior to version 1.10a)
supported TIFF (<code>.tif</code> files) format as an alternative
to PNG files; don't rely on this facility, even if you
<em>are</em> running an old enough version of PDFTeX...
<p>In addition to the 'native' formats, the standard PDFLaTeX
<i>graphics</i> package setup causes Hans Hagen's <i>supp-pdf</i>
macros to be loaded: these macros are capable of translating the
output of MetaPost to PDF "on the fly"; thus MetaPost output
(<code>.mps</code> files) may also be included in PDFLaTeX documents.
<p>The commonest problem users encounter, when switching from TeX, is
that there is no straightforward way to include EPS files:
since PDFTeX is its own "driver", and since it contains no means
of converting PostScript to PDF, there's no direct way the job can
be done.
<p>The simple solution is to convert the EPS to an appropriate
PDF file.  The <i>epstopdf</i> program will do this: it's
available either as a Windows executable or as a <i>Perl</i>
script to run on Unix and other similar systems.  A LaTeX package,
<i>epstopdf</i>, can be used to generate the requisite PDF
files "on the fly"; this is convenient, but requires that you
suppress one of TeX's security checks: don't use it in files from
sources you don't entirely trust.
<p>A similar package, <i>ps4pdf</i>, permits other things than 'mere'
graphics files in its argument.  (Documentation is scarce: see the
<a href="http://www.perce.de/LaTeX/ps4pdf/Examples/">distribution page</a>
for some examples.)
<p>An alternative solution is to use <i>purifyeps</i>, a
<i>Perl</i> script which uses the good offices of
<i>pstoedit</i> and of MetaPost to convert your Encapsulated PostScript to
"Encapsulated PostScript that comes out of MetaPost", and can therefore be
included directly.  Sadly, <i>purifyeps</i> doesn't work for all
<code>.eps</code> files.
<p>Good coverage of the problem is to be found in Herbert Voss'
<a href="http://pstricks.de/pdf/pdfoutput.phtml#pdftricks">PDFtricks support page</a>,
which is, in fact, targeted at the use of <i>pstricks</i> in
PDFLaTeX, and also covers the <i>pstricks</i>-specific package
<i>pdftricks</i>.
<dl>
<dt><tt><i>epstopdf</i></tt><dd>Browse <a href="http://www.tex.ac.uk/tex-archive/support/epstopdf/">support/epstopdf/</a>
<dt><tt><i>epstopdf.sty</i></tt><dd>Distributed with Heiko Oberdiek's packages
  <a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/oberdiek.zip">macros/latex/contrib/oberdiek</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/oberdiek.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/oberdiek/">browse</a>)
<dt><tt><i>pdftricks.sty</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/pdftricks.zip">macros/latex/contrib/pdftricks</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/pdftricks.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/pdftricks/">browse</a>)
<dt><tt><i>ps4pdf.sty</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/ps4pdf.zip">macros/latex/contrib/ps4pdf</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/ps4pdf.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/ps4pdf/">browse</a>)
<dt><tt><i>pstoedit</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/support/pstoedit.zip">support/pstoedit</a> (<a href="ftp://cam.ctan.org/tex-archive/support/pstoedit.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/support/pstoedit/">browse</a>)
<dt><tt><i>purifyeps</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/support/purifyeps.zip">support/purifyeps</a> (<a href="ftp://cam.ctan.org/tex-archive/support/purifyeps.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/support/purifyeps/">browse</a>)
</dl>
<p><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=pdftexgraphics">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=pdftexgraphics</a>
</body>