Save annotations and PDF file when closing material view