Document resize method