[Tex/LaTex] Problem of \includegraphics with Beamer

beamerbeamer-metropolis

The following commands

\documentclass[10pt]{beamer}
\usetheme{metropolis}
\begin{document}
\begin{frame}{Test}
\centering
\includegraphics{xxx.pdf}   
\end{frame}
\end{document}

yields a result

enter image description here

by using pdflatex, which is not what I expect.

Basically, 'xxx.pdf' contains white background, and it looks fine (correctly displaying white background) with \documentclass{article}.

Is it possible to include xxx.pdf in this document without any changes on xxx.pdf?

Any comments and suggestions are very welcome. Thank you.


Updated:
xxx.pdf can be downloaded here

Best Answer

The "problem" is, that your image has a transparent background. Principally this is easy to remove with imagemagick:

 convert xxx.pdf xxxx.pdf

However as metropolis uses a very light background colour, this would look rather ugly, look at the slight boarder between the image and the background:

enter image description here

So I would use the background colour of the surrounding page:

\documentclass[10pt]{beamer}
\usetheme{metropolis}

\definecolor{myback}{RGB}{250, 250, 250}

\begin{document}

\begin{frame}{Test}
\centering
{\color{myback}\includegraphics{xxx.pdf}}   
\end{frame}
\end{document}

enter image description here