Format document UI