Updated PDF and save functions.