"Print to file" saves filename and most recent printer in prefs
The last file TBB prints is stored in the pref "print.print_to_filename", which persists until the next time you print to file.
The last actual printer you used is also written to the 'print_printer' pref.