restore the viewer correctly after printing