cleanup & final pdf