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.




\textheightor\textwidth. But if you don't care about exceeding the margins, why not get rid of the page number with\thispagestyle(empty)rather than messing about with the graphics file? – alephzero Jun 02 '17 at 16:11\fboxjust makes a solid box around the cropped graphics; the page number is still visible behind the text inside the box. I don't understand your question – thetrimtrims the images down to the relevant part, as displayed in the screenshots above. The PDF files being included are scans of written work. – dbmag9 Jun 03 '17 at 11:05\colorbox{white}{ \includegraphics{pdffile} }to flatten pdfs in my talks. – Simd Oct 01 '17 at 09:05