The command \hrulefill
doesn't know where it is issued from; it just fills the remaining space on the line in a similar way to what \hfill
does (actually it is the same way).
For \vrulefill
it's quite similar:
\documentclass{article}
\usepackage{lipsum}
\newcommand{\vrulefill}{\leaders\vrule\vfill}
\begin{document}
\lipsum[1]
\vrulefill
\clearpage % <-- not necessary if it's the last page
\end{document}

You can make the rule start from where the last paragraph ends by finishing the paragraph with \parvrulefill
as in these examples:
\documentclass{article}
\usepackage{lipsum}
\newcommand{\vrulefill}{\leaders\vrule\vfill}
\makeatletter
\newcommand{\parvrulefill}{%
{\abovedisplayskip=\z@\belowdisplayskip=\z@
\abovedisplayshortskip=\z@\belowdisplayshortskip=\z@
$$\xdef\vrule@shift{\the\predisplaysize}$$}%
\par
\kern-\baselineskip
\leaders\hbox to\dimexpr\vrule@shift-2em{\hfill\vrule height1pt}\vfill
\clearpage
}
\makeatother
\begin{document}
\lipsum*[1]\parvrulefill
\lipsum*[2]\parvrulefill
\end{document}

\pdfsavepos
/\pdflastxpos
/pdflastypos
) that record, at\shipout
-time, where a given point is eventually placed on the page (or rendering canvas), and allow you to subsequently retrieve the saved position so that it can, e.g., be saved into an auxiliary file and used in the next run.