finish export history to pdf