Documentation
¶
Overview ¶
Package pdf417 encodes ISO/IEC 15438:2015 PDF417 logical symbols.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidInput and ErrUnsupported classify PDF417 option failures. ErrInvalidInput = errors.New("pdf417: invalid input") // ErrUnsupported reports a valid option not implemented by the encoder. ErrUnsupported = errors.New("pdf417: unsupported option") )
Functions ¶
This section is empty.
Types ¶
type Compaction ¶
type Compaction uint8
Compaction selects a PDF417 high-level encoding strategy.
const ( // Automatic and the other constants select PDF417 compaction modes. Automatic Compaction = iota // Text forces text compaction. Text // Byte forces byte compaction. Byte // Numeric forces numeric compaction. Numeric )
type ErrorCorrection ¶
type ErrorCorrection uint8
ErrorCorrection selects one of the nine PDF417 correction levels.
const ( // DefaultErrorCorrection and the other constants select correction levels. DefaultErrorCorrection ErrorCorrection = iota // Level0 adds two correction codewords. Level0 // Level1 adds four correction codewords. Level1 // Level2 adds eight correction codewords. Level2 // Level3 adds sixteen correction codewords. Level3 // Level4 adds thirty-two correction codewords. Level4 // Level5 adds sixty-four correction codewords. Level5 // Level6 adds 128 correction codewords. Level6 // Level7 adds 256 correction codewords. Level7 // Level8 adds 512 correction codewords. Level8 )
type Macro ¶
type Macro struct {
SegmentIndex int
FileID string
LastSegment bool
FileName string
SegmentCount *int
Timestamp *int64
Sender string
Addressee string
FileSize *int64
Checksum *int
}
Macro describes a Macro PDF417 control block. FileID contains one or more three-digit codewords in the range 000 through 899.
type Options ¶
type Options struct {
Compaction Compaction
ErrorCorrection ErrorCorrection
Compact bool
MinRows int
MaxRows int
MinColumns int
MaxColumns int
QuietZone int
ECI int
Macro *Macro
}
Options controls PDF417 compaction, correction, layout, and quiet zone.
type Symbol ¶
type Symbol struct {
// contains filtered or unexported fields
}
Symbol combines an immutable logical symbol with PDF417 metadata.
func Encode ¶
Encode returns a PDF417 matrix with explicit compaction, correction, and row/column bounds. Each codeword row is rendered four modules high.
func (Symbol) Compaction ¶
func (symbol Symbol) Compaction() Compaction
Compaction returns the requested high-level encoding strategy.
func (Symbol) ErrorCorrection ¶
func (symbol Symbol) ErrorCorrection() ErrorCorrection
ErrorCorrection returns the selected correction level.