Sometimes I'm using tikz as a plotting tool, without embedding the figure in a document. In this case, I normally, want to include the resulting PDF in a different TeX file (yes I know I could include the TikZ code directly, but it is not helpful in this case). Therefore, I want the picture to fit exactly to the page, so I won't have white space around it. To this end, I'm using the geometry package and clip of TikZ. For example, here:
\documentclass{minimal}
\usepackage{tikz}
\usepackage[paperwidth=1cm,paperheight=1cm,hmargin=0cm,vmargin=0cm]{geometry}
\begin{document}
\begin{center}
\begin{tikzpicture}
\clip (0,0) rectangle (1,1);
\draw[red] (0,0) -- (1,1);
\draw[red] (1,0) -- (0,1);
\draw[blue] (0,0) rectangle (1,1);
\end{tikzpicture}
\end{center}
\end{document}
Is there a better/nicer/more elegant way to do it?
EDIT 1:
For the sake of clarifying, I used clip because I thought it will make things simpler. Without it, things are actually more straightforward.
EDIT 2:
Unfortunately one can only accept one answer. In this case I could accept all. For me, I got to know three new tools, all are slightly different, to accomplish my goal. I choose the Martin's answer due to its standalone nature; no need of neither external tools nor post-proccessing. The other two options yielded more or less the same result.

\includestandalone{file}and decide if you want to use the.texof the PDF version, and even build the PDF if it is missing. – Martin Scharrer Jul 20 '11 at 09:02.5\pgflinewidthon each side of the clipping path. This is not an issue ofstandaloneor other solution shown here. – Martin Scharrer Jul 20 '11 at 09:46previewof mac os. – Dror Jul 20 '11 at 12:48\documentclass[class=minimal,border=0pt]{standalone}in Windows and it worked properly, but in Linux, compiling the same TeX file won't clip thetikzpictureas it does in Windows, any comment? – Rasoul Aug 17 '12 at 12:54standaloneunder Linux, so it should work fine. Please use the above example file and try again. Also, add\listfilesbefore\begin{document}and check the log output for the package versions. – Martin Scharrer Aug 17 '12 at 18:20