FieldData represents form field data loaded from JSON file.
type FieldData struct {
// contains filtered or unexported fields
}
func LoadFromJSON(r io.Reader) (*FieldData, error)
LoadFromJSON loads JSON form data from `r`.
func LoadFromJSONFile(filePath string) (*FieldData, error)
LoadFromJSONFile loads form field data from a JSON file.
func LoadFromPDF(rs io.ReadSeeker) (*FieldData, error)
LoadFromPDF loads form field data from a PDF.
func LoadFromPDFFile(filePath string) (*FieldData, error)
LoadFromPDFFile loads form field data from a PDF file.
func (fd *FieldData) FieldImageValues() (map[string]*model.Image, error)
FieldImageValues implements model.FieldImageProvider interface.
func (fd *FieldData) FieldValues() (map[string]core.PdfObject, error)
FieldValues implements model.FieldValueProvider interface.
func (fd FieldData) JSON() (string, error)
JSON returns the field data as a string in JSON format.
func (fd *FieldData) SetImage(fieldName string, img *model.Image, opt []string) error
SetImage assign model.Image to a specific field identified by fieldName.
func (fd *FieldData) SetImageFromFile(fieldName string, imagePath string, opt []string) error
SetImageFromFile assign image file to a specific field identified by fieldName.