LaTeX forum ⇒ XeTeXImage width using \includegraphics with XeLaTeX Topic is solved

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

Image width using \includegraphics with XeLaTeX

Postby wegelin » Fri Jan 23, 2015 10:06 pm

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

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

  1. \documentclass[12pt]{article}
  2. \usepackage{graphicx}
  3. \begin{document}
  5. \includegraphics[width=0.8\textwidth]
  6. {hey.pdf}
  9. \includegraphics[width=0.8\textwidth]
  10. {ike-1957-06-16.pdf}
  12. \end{document}

User avatar
Stefan Kottwitz
Site Admin
Posts: 8596
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany

Postby Stefan Kottwitz » Sat Jan 09, 2016 7:15 pm

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:

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

Site admin

Return to “XeTeX”

Who is online

Users browsing this forum: No registered users and 1 guest