write to pdf file, changes in ExaminationModel and database