remember the state of selection when resetting the pdf document