Being as you are new to latex, I propose that you are thinking about this the wrong way.
Instead of having the PDF expand to fit the data, you could think of it like shrinking the table to fit the page size. The table can be scaled automatically, which means that you can add an arbitrary amount of data and it will always fit! smaller tables will look goofy, however, because the table will always stretch to fit the page width in my example.
Here is an example of a scaled table
\documentclass[10pt]{article}
\usepackage{fontspec}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm,paperwidth=100cm,paperheight=300cm]{geometry}% Easy control of page dimensions
% paperwidth=100cm,paperheight=300cm
\usepackage{changepage}%Alter page layout
\usepackage[table]{xcolor}%Add simple color to tables
\begin{document}
\resizebox{\textwidth}{!}{%
\begin{tabular}{|l|l|l|l|l|}
\hline
\rowcolor[gray]{.8}
Wrench & Hammer & Screwdriver & Wedge & Ratchet\\
joeschmoeatgmail.com & heymisteratgmail.com & iambatmanatgmail.com & noyouarenotatgmail.com & mynameispeteratgmail.com \\
\hline
\end{tabular}}
\end{document}
Ok, let me explain what is going on here:
- This line
\documentclass[10pt]{article} sets the font to 10pt, which will be ignored in the table, because our table will be scaled inside a resizebox.
- This package
\usepackage{fontspec} is for xelatex UTF-8 support if you need it
- This package
\usepackage{geometery} can be used to set the paper type and margins (see manual for details). [] contains your parameters. The left=2cm,right=2cm,top=2cm,bottom=2cm is setting your page margins to 2cm (you can optionally set all sides with margin=2cm), while the paperwidth= and paperheight= are setting your page size to an arbitrary size. You could also check out latex guru Martin Scharrer's answer on custom page sizes here
- This package
\usepackage{changepage}can be used to change the page layout and is similar to the geometry package (see manual for details)
- This package
\usepackage[table]{xcolor} is used to add color to tables, e.g. if you want a header row accentuated.
- The trick for automatically scaling your table is in the
\resizebox{width}{height}{object} command.
{width} is \textwidth, the width from left margin to right margin in your current environment (which in this case is the page).
{height} is !, telling latexto keep the aspect ratio. You could optionally change this to some other value.
{object} is your table, which will be scaled according to the first two values.
You can then use either the geometry packageor the changepagepackage to control the pdf size.
standaloneclass which crops the page to its content. Full liberation for outer dimensions will bring thegeometrypackage. If that does not meet your requirements you may consider specifying your question. Note that non-standard paper sizes may be problematic to printers. – bloodworks Apr 28 '13 at 07:56