Document calibration