code: func registerScaledBarcode(pdf barcodePdf, code string, bcode barcode.Barcode) error {
  	buf := new(bytes.Buffer)
  	err := jpeg.Encode(buf, bcode, nil)
  
  	if err != nil {
  		return err
  	}
  
  	reader := bytes.NewReader(buf.Bytes())
  	pdf.RegisterImageReader(code, "jpg", reader)
  
  	return nil
  }
docs: // registerScaledBarcode registers a barcode with its exact dimensions to the
  // PDF but does not put it on the page. Use Fpdf.Image() with the same code to
  // add the barcode to the page.