The following code will extract all graphics and floats. To prove it, I load the extracted objects again with \includepdf (see the animation).
% this file name is extractor.tex
% compile it with pdflatex -shell-escape extractor
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{template.tex}
\documentclass{article}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{mwe}
\usepackage[active,tightpage,\placeholder]{preview}
%\PreviewEnvironment{\placeholder}
\PreviewBorder=12pt\relax
\begin{document}
\lipsum[1]
\begin{table}[htb]
\centering
\begin{tabular}{|lll|}
\hline
11 & 12 & 13\\
21 & 22 & 23\\
31 & 32 & 33\\
41 & 42 & 43\\
51 & 52 & 53\\
\hline
\end{tabular}
\caption{A table}
\end{table}
\begin{figure}[htp]
\includegraphics{example-image-a}
\caption{A}\label{a}
\end{figure}
\lipsum[6-10]
\begin{figure}[htp]
\includegraphics{example-image-b}
\caption{A}\label{a}
\end{figure}
\begin{figure}[htp]
\includegraphics{example-image-c}
\caption{A}\label{a}
\end{figure}
\lipsum[16-20]
\end{document}
\end{filecontents*}
\usepackage{pgffor,pdfpages}
\begin{document}
\foreach \x in{graphics,floats}{%
\immediate\write18{pdflatex -jobname=template-\x\space "\def\noexpand\placeholder{\x} \noexpand\input{template}"}%
\includepdf[pages=-]{template-\x}%
}
\end{document}

The code above just simulates your scenario. To apply it in your real scenario, do the following.
Step 1
Assume that your input file is as follows.
\documentclass{article}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{mwe}
\begin{document}
\lipsum[1]
\begin{table}[htb]
\centering
\begin{tabular}{|lll|}
\hline
11 & 12 & 13\\
21 & 22 & 23\\
31 & 32 & 33\\
41 & 42 & 43\\
51 & 52 & 53\\
\hline
\end{tabular}
\caption{A table}
\end{table}
\begin{figure}[htp]
\includegraphics{example-image-a}
\caption{A}\label{a}
\end{figure}
\lipsum[6-10]
\begin{figure}[htp]
\includegraphics{example-image-b}
\caption{A}\label{a}
\end{figure}
\begin{figure}[htp]
\includegraphics{example-image-c}
\caption{A}\label{a}
\end{figure}
\lipsum[16-20]
\end{document}
Step 2
Insert
\usepackage[active,tightpage,graphics]{preview}
\PreviewBorder=12pt\relax
in your input file. So your input file becomes as follows.
\documentclass{article}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{mwe}
\usepackage[active,tightpage,graphics]{preview}
\PreviewBorder=12pt\relax
\begin{document}
\lipsum[1]
\begin{table}[htb]
\centering
\begin{tabular}{|lll|}
\hline
11 & 12 & 13\\
21 & 22 & 23\\
31 & 32 & 33\\
41 & 42 & 43\\
51 & 52 & 53\\
\hline
\end{tabular}
\caption{A table}
\end{table}
\begin{figure}[htp]
\includegraphics{example-image-a}
\caption{A}\label{a}
\end{figure}
\lipsum[6-10]
\begin{figure}[htp]
\includegraphics{example-image-b}
\caption{A}\label{a}
\end{figure}
\begin{figure}[htp]
\includegraphics{example-image-c}
\caption{A}\label{a}
\end{figure}
\lipsum[16-20]
\end{document}
Save this input file as anyfilename-graphics.tex
Step 3
Invoke pdflatex anyfilename-graphics to obtain a PDF file containing all extracted graphics.
Step 4
Repeat Step 2 but replace graphics with floats, save the file as anyfilename-floats.tex. Now compile with pdflatex anyfilename-floats to get a PDF file containing all extracted floats (figure or table).
Step 5
Done!
figand use the terminal to runpdftk fig*.pdf cat output all-figs.pdffor example. Thus you will have all pdf glued together. – Sigur Oct 26 '13 at 17:21VerbatimOutto produce verbatim codes and create an external file contained exactly the code so I could compile those external files later. Maybe you can adapt it to produce your tables. – Sigur Oct 26 '13 at 17:45.texfiles and include with\input{table1}between the main text and in a empty document. Is this way the main text is more readable for humans and the document only with tables is very easy to do. Of course, thi is also valid for for the figures. – Fran Oct 26 '13 at 18:03\inputto include each table (e.g.,\input table01.tex) and kept them all separate, it would be easy to create atable-wrapper.texthat also input the same tables. Then a simpleMakefilewould generate both the regular .pdf and the table-wrapper.pdf. Same with the figures.... – jon Oct 26 '13 at 18:04\begin{table}, add\input{tableXXX}just before, select until\end{table}, cut the whole float and paste in the new documenttableXXX.tex. With a good editor may be you can automatize most of this procedure with a macro. – Fran Oct 26 '13 at 20:47\inputthem in the main file. But others don't. I'm doing this right now but as I said it's not a good solution for big files. +1 for mentioning macro. that's would be a good idea for large files. I don't know how to use macro in editors I use (texmaker, vim, gedit). for now with my 6 page conference paper I can copy paste them but for the 30 page journal paper I will get board from copying and pasting and I'll wish for and easier solution. the best one is a simple latex command\separatePDF{figures,tables}{filename.pdf}:) – sajjadG Oct 26 '13 at 21:00