# How to obtain the space left to bottom of page

Since it is impossible to use \vfill inside a framebox, is there any way of getting the current height position of text? I want to fill in a framebox so that it uses all the space left on a page, instead of trial and error...

-
Welcome to TeX.SX. A tip: If you indent lines by 4 spaces, then they're marked as a code sample. You can also highlight the code and click the "code" button ({}). – Claudio Fiandrino Dec 27 '12 at 11:12
Also, you can use backticks  to mark your inline code. – Torbjørn T. Dec 27 '12 at 11:13
possible duplicate of How to compute the remaining space on the current page – Stephen Dec 27 '12 at 18:36
Check out [tex.stackexchange.com/a/17813/22413]. – A.Ellett Dec 27 '12 at 20:43

## Is there any way of getting the current height position of text?

If this were your only question, then you have the answer in Aditya's \measurepage in How to define a figure size so that it consumes the rest of a page?

I don't consider your question as duplicate though since it is specific to using \framebox which cannot take a macro directly as height using \framebox(<width>,<height>){<>} syntax. A possibility using Aditya's \measurepage macro is to use \parbox as in the MWE below.

\documentclass[]{article}
\usepackage[showframe]{geometry}
\usepackage{lipsum}

\newcommand\measurepage{\dimexpr\pagegoal-\pagetotal-\baselineskip\relax}
\newcommand{\MyFrameBox}[1]{%
-9.5pt}
\noindent
\framebox{
\parbox[t][\measurepage]{\linewidth}{
#1
}}}}
\begin{document}
\lipsum[1-2]

\MyFrameBox{\lipsum[1]}
%
%Here is the next text
\end{document}


The showframe option of the geometry` was just used here so that you can see where the text ends.

-