fjson

package
v3.0.0-...-55e877b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2023 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package fjson provides support for loading PDF form field data from JSON data/files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldData

type FieldData struct {
	// contains filtered or unexported fields
}

FieldData represents form field data loaded from JSON file.

func LoadFromJSON

func LoadFromJSON(r _e.Reader) (*FieldData, error)

LoadFromJSON loads JSON form data from `r`.

func LoadFromJSONFile

func LoadFromJSONFile(filePath string) (*FieldData, error)

LoadFromJSONFile loads form field data from a JSON file.

func LoadFromPDF

func LoadFromPDF(rs _e.ReadSeeker) (*FieldData, error)

LoadFromPDF loads form field data from a PDF.

func LoadFromPDFFile

func LoadFromPDFFile(filePath string) (*FieldData, error)

LoadFromPDFFile loads form field data from a PDF file.

func (*FieldData) FieldImageValues

func (_fea *FieldData) FieldImageValues() (map[string]*_f.Image, error)

FieldImageValues implements model.FieldImageProvider interface.

func (*FieldData) FieldValues

func (_cfe *FieldData) FieldValues() (map[string]_ag.PdfObject, error)

FieldValues implements model.FieldValueProvider interface.

func (FieldData) JSON

func (_aa FieldData) JSON() (string, error)

JSON returns the field data as a string in JSON format.

func (*FieldData) SetImage

func (_bcd *FieldData) SetImage(fieldName string, img *_f.Image, opt []string) error

SetImage assign model.Image to a specific field identified by fieldName.

func (*FieldData) SetImageFromFile

func (_cac *FieldData) SetImageFromFile(fieldName string, imagePath string, opt []string) error

SetImageFromFile assign image file to a specific field identified by fieldName.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL