automatic position to the preview document