XeTeXImage width using \includegraphics with XeLaTeX

Information and discussion about XeTeX, an alternative for pdfTeX based on e-Tex
Post Reply
wegelin
Posts: 15
Joined: Sun Oct 13, 2013 2:25 am

Image width using \includegraphics with XeLaTeX

Post by wegelin »

I ran the following code first with pdflatex, then with xelatex. In pdflatex, the width option is obeyed for both included pdfs. In xelatex, the width option is obeyed only for hey.pdf, which is a vector image. The image ike-1957-06-16.pdf, which is a scanned newspaper clipping, comes in huge.

All pertinent files, including the two included PDFs, can be found at http://jacobwegelin.net/tmp/xelatex/.

How can I control the width and height of a scanned, rasterized image when I import it in xelatex?

Code: Select all

\documentclass[12pt]{article}
\usepackage{graphicx}
\begin{document}

	\includegraphics[width=0.8\textwidth]
	{hey.pdf}


	\includegraphics[width=0.8\textwidth]
	{ike-1957-06-16.pdf}

\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics
User avatar
Stefan Kottwitz
Site Admin
Posts: 10270
Joined: Mon Mar 10, 2008 9:44 pm

Image width using \includegraphics with XeLaTeX

Post by Stefan Kottwitz »

Hi Jacob,

I just tested your code and your original images. It works when I use natwidth instead of width, then the scanned bitmap picture is downsized also with XeTeX.

Such as:

Code: Select all

\includegraphics[natwidth=0.8\textwidth]{ike-1957-06-16.pdf}
Stefan
LaTeX.org admin
Post Reply