How to get the pdf of a compiled table only
try this
\documentclass[varwidth]{standalone}[2011/12/21]
One additional step, but might be of interest anyway:
Add \pagestyle{empty}
to the preamble, so you have
pdflatex '\documentclass{article}\pagestyle{empty}\begin{document}\input{tab1}\end{document}'
and then run
pdfcrop article.pdf
where article.pdf
is the file made by pdflatex
. This produces a file article-crop.pdf
. pdfcrop
is a command line tool included in TeX Live and MikTeX. Without arguments it will crop away the outer whitespace from a PDF.