Sure there is, it's just a lot easier to use a database.
You have to find a way of reading a file and only printing the part that you want to print.
By far the easiest way is to change the format of your textfile a little so all the parts of text you might want to print have the same number of lines.
That way you can skip to the part you want by just skipping x lines.
If this is not an option, you'll have to start putting keywords in your textfile
at the points where the various parts begin.
Then you can open the file and read it line by line untill you find the right keyword.
Then you can print the file untill you find another keyword, which tells you that a new piece of text is starting, so you can stop printing.
This works, it's just not the best solution.