One possibility using TikZ; \drawhline draws a horizontal rule and \drawvline, a vertical rule; each command has two optional arguments: the first one allows you to pass options controlling the lines aspect; the second one allows you to specify a vertical shifting for the horizontal line, and a horizontal shifting for the vertical line:
\documentclass{article}
\usepackage{tikz}
\usepackage{twoopt}
\usepackage{lipsum}
\newcounter{line}
\pgfdeclarelayer{background}
\pgfsetlayers{background,main}
\newcommandtwoopt\drawvline[2][][0pt]{%
\stepcounter{line}%
\begin{tikzpicture}[remember picture,overlay]
\begin{pgfonlayer}{background}
\coordinate (a\theline);
\draw[red,thick,#1]
([xshift=#2]a\theline|-current page.north) -- ([xshift=#2]a\theline|-current page.south);
\end{pgfonlayer}
\end{tikzpicture}%
}
\newcommandtwoopt\drawhline[2][][0pt]{%
\stepcounter{line}%
\begin{tikzpicture}[remember picture,overlay]
\begin{pgfonlayer}{background}
\coordinate (b\theline);
\draw[red,thick,#1]
([yshift=#2]b\theline-|current page.west) -- ([yshift=#2]b\theline-|current page.east);
\end{pgfonlayer}
\end{tikzpicture}%
}
\begin{document}
\lipsum[4]
Some text\drawvline
\lipsum[4]
Some test text goes here\drawhline[magenta]
\lipsum[4]
Some additional text goes here\drawvline[blue,line width=3pt]\drawhline[blue,line width=3pt]
\lipsum[4]
Text\drawvline[green!40!black][-1cm]\drawhline[green!40!black][-1cm]
\end{document}

The above solution draws rules extending the whole page area; to have then only extending the text area, the tikzpagenodes facilitates the work:
\documentclass{article}
\usepackage[a6paper]{geometry}
\usepackage{tikzpagenodes}
\usepackage{twoopt}
\usepackage{lipsum}
\newcounter{line}
\pgfdeclarelayer{background}
\pgfsetlayers{background,main}
\newcommandtwoopt\drawvline[2][][0pt]{%
\stepcounter{line}%
\begin{tikzpicture}[remember picture,overlay]
\begin{pgfonlayer}{background}
\coordinate (a\theline);
\draw[red,thick,#1]
([xshift=#2]a\theline|-current page text area.north) -- ([xshift=#2]a\theline|-current page text area.south);
\end{pgfonlayer}
\end{tikzpicture}%
}
\newcommandtwoopt\drawhline[2][][0pt]{%
\stepcounter{line}%
\begin{tikzpicture}[remember picture,overlay]
\begin{pgfonlayer}{background}
\coordinate (b\theline);
\draw[red,thick,#1]
([yshift=#2]b\theline-|current page text area.west) -- ([yshift=#2]b\theline-|current page text area.east);
\end{pgfonlayer}
\end{tikzpicture}%
}
\begin{document}
\lipsum[4]
Some text\drawvline
\lipsum[4]
Some test text goes here\drawhline[blue,line width=2pt]
\end{document}
