build sort of final pdf