correct page arrangement for variable width pdf document