improve document dimensions