
\documentclass{article}
  \usepackage[width=6cm]{geometry}
  \usepackage{tikz}
  \pagestyle{empty}
\begin{document}
\tikz\draw (0,0) -- (\linewidth,0pt);
\end{document}
