create an algorithm for a text document

Job ID: 37454828

Budget: $30 – $250 USD

I want to have the ability to enter 10 pt text on a 6" wide x 8" high page with .25" borders. The text would be entered in multiple entries of one to three lines with a one line space between the entries. I need the algorithm to determine when the page has been filled up with lines and to send a notice to the user when they are attempting to produce more lines than are allowed on the page. Example of page included.