A template is a kind of table in a smart form which has a fixed layout i.e. the layout is defined before hand.
This is a example form for using Templates and Bar Codes in a Smart form:
Following are the Form attributes,Form Interface and Global Definitions:
Following is the output of the GR slip:
For Bar code a character format has to be created;like:
Following is the attached XML file for the form: