A code demo for create a document