[Tex/LaTex] How to stretch a line across the entire page width

graphics

I would like to stretch a black line across the entire page width. MWE:

\documentclass[letterpaper]{article}
\usepackage{geometry}
\geometry{top=.0in}
\usepackage{xhfill}
\begin{document}

\makebox[10in][c]{\xrfill{10pt}}

\end{document}

However, I cannot figure out how to get the box to begin at the left edge of the page – instead it begins at the left margin, as shown here:
marginproblem

Any assistance is appreciated!

Best Answer

This will work if the left/right margins are symmetric. If not, one could always increase the width of the \rule to compensate.

\documentclass[letterpaper]{article}
\usepackage{geometry}
\geometry{top=.0in}
\begin{document}
\noindent\makebox[\textwidth]{\rule{\paperwidth}{10pt}}
\end{document}

enter image description here