code: func (t *FpdfTpl) GobDecode(buf []byte) error {
  	r := bytes.NewBuffer(buf)
  	decoder := gob.NewDecoder(r)
  
  	firstClassTemplates := make([]*FpdfTpl, 0)
  	err := decoder.Decode(&firstClassTemplates)
  	t.templates = make([]Template, len(firstClassTemplates))
  
  	for x := 0; x < len(t.templates); x++ {
  		t.templates[x] = Template(firstClassTemplates[x])
  	}
  
  	firstClassImages := t.childrenImages()
  
  	t.templates = append(t.childrensTemplates(), t.templates...)
  
  	t.images = make(map[string]*ImageInfoType)
  	if err == nil {
  		err = decoder.Decode(&t.images)
  	}
  
  	for k, v := range firstClassImages {
  		t.images[k] = v
  	}
  
  	if err == nil {
  		err = decoder.Decode(&t.corner)
  	}
  	if err == nil {
  		err = decoder.Decode(&t.size)
  	}
  	if err == nil {
  		err = decoder.Decode(&t.bytes)
  	}
  	if err == nil {
  		err = decoder.Decode(&t.page)
  	}
  
  	return err
  }
docs: // GobDecode decodes the specified byte buffer into the receiving template.