[Tex/LaTex] How to suppress transparency of PDF using \includegraphics

graphicspdftikz-pgftransparency

I have multiple PDF floats in my document using \includegraphics. It turns out the PDFs have transparent background, and one overlaps the page number which looks bad.

(I was initially hoping to suppress the page number, but that turned out to be surprisingly difficult and the solutions here did not help.)

Instead, is there an option to suppress the PDF transparency (so that it blocks the page number from view)? Equivalently, is there an option to add a white background colour to the image?

MWE:

\documentclass[11pt]{article}
\usepackage[a4paper]{geometry}
\usepackage[]{garamondx}
\usepackage[scaled=.84]{beramono}
\usepackage{amsmath,amsthm,amssymb}
\usepackage[garamondx,cmbraces]{newtxmath}
\useosfI
\usepackage[utf8x]{inputenx}
\usepackage{microtype}
\usepackage{subfig}
\usepackage{graphicx}

\begin{document}

Lorem ipsum dolor sit amet.

\begin{figure}
\centering
\subfloat[\label{fig:disttime1}A specific solution with no attempt at generality.]{\includegraphics[scale=0.7, trim={4cm 7cm 1cm 0}, clip]{disttime1.pdf}}\\
\caption{Students' responses to a challenging proof problem.}
\label{fig:disttime}
\end{figure}

\begin{figure}
\ContinuedFloat%
\centering%
\vspace{-1.5cm}%
\subfloat[\label{fig:disttime2}This student has hit on the idea of the lines crossing, but strictly speaking at the point he has identified the person would be $6\ \mathrm{km}$ \emph{up} the hill one day and $6\ \mathrm{km}$ \emph{down} the hill the other.]{\includegraphics[scale=0.7, trim={5.5cm 16cm 0cm 2cm}, clip]{disttime2.pdf}}\\
\subfloat[\label{fig:disttime3}This student has understood the generality required, but has not attempted to justify the universal claim.]{\includegraphics[scale=0.7, trim={3cm 7.5cm 0.5cm 3cm}, clip]{disttime3.pdf}}
\caption{(con't) Students' responses to a challenging proof problem.}
\end{figure}

\end{document}

On the below screenshots, there is no issue with pages 1 and 2, but on page 3 the figure is taller than the text height and overlaps the page number.

Note: I am aware that having such a large float is probably bad style; I am not interested in splitting these figures across to a third page, or making them smaller (as they would become unreadable).

I have also added a screenshot of page 3 with \fbox added around each \includeimage, as requested by @daleif.

Page 1
Page 2
Page 3
Page 3 with \fbox

Best Answer

For you first question: No, there is no option to suppress the transparency of PDFs which use that feature when including these PDFs whith pdftex/xetex/luatex.

What you are asking for is called PDF transparency flattening and that can be done by other tools.