close PDF document at the end, this fix the last mem leak