Hi Bahaa,
Did you check out this? https://docs.mendix.com/refguide/document-templates
If so, what is the exact problem you are facing?