[Tex/LaTex] Exclude everything from pdf document except images

graphicspdf

is there any way to ONLY print out a pdf with all the image with the correct sizes as they appear in the single chapters/sections etc…? The reason is I want to only print out some pages (not the full article / thesis) containing only the images so that I can easily and cheap check wether the image quality is okay or not. Therefor, I don't need any tables, listings, TOC, the text etc…
Thanks!

Edit:
Embed code #1:

\begin{figure}[htb]
\includegraphics[width=\textwidth]{flow1.pdf}
\caption{blaaaa}
\label{fig:blaaa}
\end{figure}

Embed code #2:

\begin{figure}[htb]
\centering
\hfill
\subfloat[htb][asd]{\fcolorbox{plotBord}{plotPadd}{\includegraphics[scale=\scalefaktorDbl]{figs/asdasd.png}}\label{fig:LZKf1}}
\hfill
\subfloat[htb][asd234asd]{\fcolorbox{plotBord}{plotPadd}{\includegraphics[scale=\scalefaktorDbl]{figs/asdasd}}\label{fig:asd}}
\hfill\null
\caption{aasd}\label{fig:asd}
\end{figure}

Best Answer

You may try putting the following code, extracted from the package syntonly, just before \begin{document}

\usepackage{array}
\makeatletter
\font\dummyft@=dummy \relax
\dummyft@
\tracinglostchars=\z@
\count@\sixt@@n
\loop
\ifnum\count@ >\z@
\advance\count@\m@ne
\textfont\count@\dummyft@
\scriptfont\count@\dummyft@
\scriptscriptfont\count@\dummyft@
\repeat
\let\selectfont\relax
\let\mathversion\@gobble
\let\getanddefine@fonts\@gobbletwo
\pagestyle{empty}
\let\ps@fancy\ps@empty
\let\hline\relax
\newcolumntype{|}{}
\let\cleardoublepage\relax
\makeatother

This should ignore all text, but include images, printing as many as possible on each page.

I've added some of the more frequent commands that need to be "neutralized".

Alternative approach

Add the following to the preamble:

\newwrite\figurewrite
\immediate\openout\figurewrite=\jobname-figures.tex
\let\includegraphicsORI\includegraphics
\renewcommand{\includegraphics}[2][]{%
  \immediate\write\figurewrite{\unexpanded{\includegraphics[#1]{#2}}^^J}%
  \includegraphicsORI[#1]{#2}}

Compiling your document (say thesis.tex ) will write a file thesis-figures.tex containing the relevant \includegraphics commands and it's just a matter of adding a suitable preamble in order to compile this file.

Related Question