Documentation
¶
Index ¶
- Constants
- type AztecBarcode
- func (a *AztecBarcode) AztecErrorCorrection() int
- func (p *AztecBarcode) ElementType() ElementType
- func (a *AztecBarcode) ProcessTilde() bool
- func (a *AztecBarcode) ReaderInitialization() bool
- func (a *AztecBarcode) SetAztecErrorCorrection(value int)
- func (a *AztecBarcode) SetProcessTilde(value bool)
- func (a *AztecBarcode) SetReaderInitialization(value bool)
- func (a *AztecBarcode) SetSymbolSize(value int)
- func (a *AztecBarcode) SymbolSize() int
- type Barcode
- type Code11Barcode
- type Code128Barcode
- type Code25Barcode
- type Code39Barcode
- type Code93Barcode
- type DataMatrix
- type DataMatrixEncodingType
- type DataMatrixFunctionCharacter
- type DataMatrixSymbolSize
- type Dim2
- type Element
- type ElementCollector
- type ElementType
- type ErrorCorrection
- type Gs1DataBar
- type Gs1DataBarType
- type Iata25Barcode
- type Image
- func (p *Image) ElementType() ElementType
- func (p *Image) MaxHeight() float32
- func (p *Image) MaxWidth() float32
- func (p *Image) ScaleX() float32
- func (p *Image) ScaleY() float32
- func (p *Image) SetMaxHeight(value float32)
- func (p *Image) SetMaxWidth(value float32)
- func (p *Image) SetScaleX(value float32)
- func (p *Image) SetScaleY(value float32)
- type Line
- func (p *Line) Color() color.Color
- func (p *Line) ElementType() ElementType
- func (p *Line) LineStyle() LineStyle
- func (p *Line) SetColor(value color.Color)
- func (p *Line) SetLineStyle(value LineStyle)
- func (p *Line) SetWidth(value float32)
- func (p *Line) SetX2Offset(value float32)
- func (p *Line) SetY2Offset(value float32)
- func (p *Line) Width() float32
- func (p *Line) X2Offset() float32
- func (p *Line) Y2Offset() float32
- type LineStyle
- type MsiBarcode
- type MsiBarcodeCheckDigitMode
- type PageNumbering
- func (p *PageNumbering) Color() color.Color
- func (p *PageNumbering) ElementType() ElementType
- func (p *PageNumbering) Font() font.Font
- func (p *PageNumbering) FontSize() float32
- func (p *PageNumbering) SetColor(color color.Color)
- func (p *PageNumbering) SetFont(font font.Font)
- func (p *PageNumbering) SetFontSize(value float32)
- func (p *PageNumbering) SetText(value string)
- func (p *PageNumbering) Text() string
- type Pdf417Barcode
- func (p *Pdf417Barcode) Columns() int
- func (a *Pdf417Barcode) CompactPdf417() bool
- func (a *Pdf417Barcode) Compaction() compaction
- func (p *Pdf417Barcode) ElementType() ElementType
- func (a *Pdf417Barcode) ErrorCorrection() ErrorCorrection
- func (a *Pdf417Barcode) ProcessTilde() bool
- func (p *Pdf417Barcode) SetColumns(value int)
- func (a *Pdf417Barcode) SetCompactPdf417(value bool)
- func (a *Pdf417Barcode) SetCompaction(value compaction)
- func (a *Pdf417Barcode) SetErrorCorrection(value ErrorCorrection)
- func (a *Pdf417Barcode) SetProcessTilde(value bool)
- func (a *Pdf417Barcode) SetYDimension(value float32)
- func (a *Pdf417Barcode) YDimension() float32
- type QrCode
- type QrCodeFnc1
- type Rectangle
- func (p *Rectangle) BorderColor() color.Color
- func (p *Rectangle) BorderStyle() LineStyle
- func (p *Rectangle) BorderWidth() float32
- func (p *Rectangle) CornerRadius() float32
- func (p *Rectangle) ElementType() ElementType
- func (p *Rectangle) FillColor() color.Color
- func (p *Rectangle) Height() float32
- func (p *Rectangle) SetBorderColor(borderColor color.Color)
- func (p *Rectangle) SetBorderStyle(style LineStyle)
- func (p *Rectangle) SetBorderWidth(value float32)
- func (p *Rectangle) SetCornerRadius(value float32)
- func (p *Rectangle) SetFillColor(fillColor color.Color)
- func (p *Rectangle) SetHeight(value float32)
- func (p *Rectangle) SetWidth(value float32)
- func (p *Rectangle) Width() float32
- type StackedGs1DataBarBarcode
- func (p *StackedGs1DataBarBarcode) ElementType() ElementType
- func (p *StackedGs1DataBarBarcode) ExpandedStackedSegmentCount() int
- func (p *StackedGs1DataBarBarcode) RowHeight() float32
- func (p *StackedGs1DataBarBarcode) SetExpandedStackedSegmentCount(value int)
- func (p *StackedGs1DataBarBarcode) SetRowHeight() float32
- type Template
- type Text
- func (p *Text) Color() color.Color
- func (p *Text) ElementType() ElementType
- func (p *Text) Font() font.Font
- func (p *Text) FontSize() float32
- func (p *Text) SetColor(color color.Color)
- func (p *Text) SetFont(font font.Font)
- func (p *Text) SetFontSize(value float32)
- func (p *Text) SetText(value string)
- func (p *Text) Text() string
- type TextBarcode
- func (p *TextBarcode) ElementType() ElementType
- func (p *TextBarcode) Font() font.Font
- func (p *TextBarcode) FontSize() float32
- func (p *TextBarcode) SetFont(font font.Font)
- func (p *TextBarcode) SetFontSize(value float32)
- func (p *TextBarcode) SetShowText(value bool)
- func (p *TextBarcode) SetText(value string)
- func (p *TextBarcode) SetTextColor(color color.Color)
- func (p *TextBarcode) ShowText() bool
- func (p *TextBarcode) Text() string
- func (p *TextBarcode) TextColor() color.Color
- type ValueType
Constants ¶
const ( // Size Auto AutoAztecSymbolSize = iota // Full size Aztec Full = iota // Compact size Aztec Compact = iota // Aztec Runes Rune = iota // 15 rows by 15 columns Compact size. R15xC15Compact = iota // 19 rows by 19 columns Compact size. R19xC19Compact = iota // 19 rows by 19 columns R19xC19 = iota // 23 rows by 23 columns Compact size. R23xC23Compact = iota // 23 rows by 23 columns. R23xC23 = iota // 27 rows by 27 columns Compact size. R27xC27Compact = iota // 27 rows by 27 columns. R27xC27 = iota // 31 rows by 31 Column. R31xC31 = iota // 37 rows by 37 columns. R37xC37 = iota // 41 rows by 41 columns. R41xC41 = iota // 45 rows by 45 columns. R45xC45 = iota // 49 rows by 49 columns. R49xC49 = iota // 53 rows by 53 columns. R53xC53 = iota // 57 rows by 57 columns. R57xC57 = iota // 61 rows by 61 columns. R61xC61 = iota // 67 rows by 67 columns. R67xC67 = iota // 71 rows by 71 columns. R71xC71 = iota // 75 rows by 75 columns. R75xC75 = iota // 79 rows by 79 columns. R79xC79 = iota // 83 rows by 83 columns. R83xC83 = iota // 87 rows by 87 columns. R87xC87 = iota // 91 rows by 91 columns. R91xC91 = iota // 95 rows by 95 columns. R95xC95 = iota // 101 rows by 101 columns. R101xC101 = iota // 105 rows by 105 columns. R105xC105 = iota //109 rows by 109 columns. R109xC109 = iota // 113 rows by 113 columns. R113xC113 = iota // 117 rows by 117 columns. R117xC117 = iota // 121 rows by 121 columns. R121xC121 = iota // 125 rows by 125 columns. R125xC125 = iota // 131 rows by 131 columns. R131xC131 = iota // 135 rows by 135 columns. R135xC135 = iota // 139 rows by 139 columns. R139xC139 = iota // 143 rows by 143 columns. R143xC143 = iota // 147 rows by 147 columns. R147xC147 = iota // 151 rows by 151 columns. R151xC151 = iota )
const ( // Byte Compaction. Byte compaction = iota // Text Compaction. TextCompaction compaction = iota // Numeric Compaction. Numeric compaction = iota // All Compactions. Auto compaction = iota )
const ( // Represents top left placement. TopLeft elementPlacement = "TopLeft" // Represents top center placement. TopCenter elementPlacement = "TopCenter" // Represents top right placement. TopRight elementPlacement = "TopRight" // Represents bottom left placement. BottomLeft elementPlacement = "BottomLeft" // Represents bottom center placement. BottomCenter elementPlacement = "BottomCenter" // Represents bottom right placement. BottomRight elementPlacement = "BottomRight" )
const ( // Stacked type. Stacked stackedGs1DataBarType = "Stacked" // Stacked Omnidirectional type. StackedOmnidirectional stackedGs1DataBarType = "StackedOmnidirectional" // Expanded stacked type. ExpandedStacked stackedGs1DataBarType = "ExpandedStacked" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AztecBarcode ¶
type AztecBarcode struct {
Dim2
}
Represents an Aztec barcode element.
func NewAztecBarcodeElement ¶
func NewAztecBarcodeElement(value string, placement elementPlacement, xOffset float32, yOffset float32) *AztecBarcode
Initializes a new instance of the `AztecBarcodeElement` class.
- @param {string} value. The value of the barcode.
- @param {ElementPlacement} placement. The placement of the barcode on the page.
- @param {float} xOffset. The X coordinate of the barcode.
- @param {float} yOffset. The Y coordinate of the barcode.
func NewAztecBarcodeElementWithByteValue ¶
func NewAztecBarcodeElementWithByteValue(value []byte, placement elementPlacement, xOffset float32, yOffset float32) *AztecBarcode
Initializes a new instance of the `AztecBarcodeElement` class.
- @param {Buffer[]} value. The value of the barcode.
- @param {ElementPlacement} placement. The placement of the barcode on the page.
- @param {float} xOffset. The X coordinate of the barcode.
- @param {float} yOffset. The Y coordinate of the barcode.
func (*AztecBarcode) AztecErrorCorrection ¶
func (a *AztecBarcode) AztecErrorCorrection() int
Gets the error correction value.
Error correction value may be between 5% to 95%.
func (*AztecBarcode) ElementType ¶
func (p *AztecBarcode) ElementType() ElementType
func (*AztecBarcode) ProcessTilde ¶
func (a *AztecBarcode) ProcessTilde() bool
Gets a boolean indicating whether to process tilde symbol in the input.
func (*AztecBarcode) ReaderInitialization ¶
func (a *AztecBarcode) ReaderInitialization() bool
Gets a boolean representing if the barcode is a reader initialization symbol.
Setting true will mark the symbol as reader initialization symbol and the size of the symbol should be one of the following, R15xC15 Compact, R19xC19, R23xC23, R27xC27, R31xC31, R37xC37, R41xC41, R45xC45, R49xC49, R53xC53, R57xC57, R61xC61, R67xC67, R71xC71, R75xC75, R79xC79, R83xC83, R87xC87, R91xC91, R95xC95, R101xC101, R105xC105, R109xC109, however it is recommended to set Auto.
func (*AztecBarcode) SetAztecErrorCorrection ¶
func (a *AztecBarcode) SetAztecErrorCorrection(value int)
Sets the error correction value.
Error correction value may be between 5% to 95%.
func (*AztecBarcode) SetProcessTilde ¶
func (a *AztecBarcode) SetProcessTilde(value bool)
Sets a boolean indicating whether to process tilde symbol in the input.
Setting true will check for ~ character and processes it for FNC1 or ECI characters.
func (*AztecBarcode) SetReaderInitialization ¶
func (a *AztecBarcode) SetReaderInitialization(value bool)
Sets a boolean representing if the barcode is a reader initialization symbol.
Setting true will mark the symbol as reader initialization symbol and the size of the symbol should be one of the following, R15xC15 Compact, R19xC19, R23xC23, R27xC27, R31xC31, R37xC37, R41xC41, R45xC45, R49xC49, R53xC53, R57xC57, R61xC61, R67xC67, R71xC71, R75xC75, R79xC79, R83xC83, R87xC87, R91xC91, R95xC95, R101xC101, R105xC105, R109xC109, however it is recommended to set Auto.
func (*AztecBarcode) SetSymbolSize ¶
func (a *AztecBarcode) SetSymbolSize(value int)
Sets the barcode size, `AztecSymbolSize`.
func (*AztecBarcode) SymbolSize ¶
func (a *AztecBarcode) SymbolSize() int
Gets the barcode size, `AztecSymbolSize`.
type Barcode ¶
type Barcode struct { Element // contains filtered or unexported fields }
Base class from which barcode page elements are derived.
func (*Barcode) SetXDimension ¶
Sets the XDimension of the barcode.
func (*Barcode) XDimension ¶
Gets the XDimension of the barcode.
type Code11Barcode ¶
type Code11Barcode struct {
TextBarcode
}
Represents a Code 11 barcode element.
This class can be used to place a Code 11 barcode on a page.
func NewCode11Barcode ¶
func NewCode11Barcode(value string, placement elementPlacement, height float32, xOffset float32, yOffset float32) *Code11Barcode
Initializes a new instance of the `Code11BarcodeElement` class.
- @param {string} value. The value of the barcode.
- @param {ElementPlacement} placement. The placement of the barcode on the page.
- @param {number} height. The height of the barcode.
- @param {number} xOffset. The X coordinate of the barcode.
- @param {number} yOffset. The Y coordinate of the barcode.
func (*Code11Barcode) ElementType ¶
func (p *Code11Barcode) ElementType() ElementType
func (*Code11Barcode) Height ¶
func (p *Code11Barcode) Height() float32
Gets or sets the height of the barcode.
func (*Code11Barcode) SetHeight ¶
func (p *Code11Barcode) SetHeight(value float32)
Sets or sets the height of the barcode.
type Code128Barcode ¶
type Code128Barcode struct {
TextBarcode
}
Represents a Code 128 barcode element.
This class can be used to place a Code 128 barcode on a page.
func NewCode128Barcode ¶
func NewCode128Barcode(value string, placement elementPlacement, height float32, xOffset float32, yOffset float32) *Code128Barcode
Initializes a new instance of the `Code128BarcodeElement` class.
Code sets can be specified along with data, in order to do this `ProcessTilde` property needs to be set to `true` Example value: "~ BHello ~ AWORLD 1~ C2345", where ~A, ~B and ~C representing code sets A, B and C respectively. However if any inline code set has invalid characters it will be shifted to an appropriate code set.
- @param {string} value The value of the barcode.
- @param {elementPlacement} placement The placement of the barcode on the page.
- @param {number} height The height of the barcode.
- @param {number} xOffset The X coordinate of the barcode.
- @param {number} yOffset The Y coordinate of the barcode.
func (*Code128Barcode) ElementType ¶
func (p *Code128Barcode) ElementType() ElementType
func (*Code128Barcode) Height ¶
func (p *Code128Barcode) Height() float32
Gets the height of the barcode.
func (*Code128Barcode) SetHeight ¶
func (p *Code128Barcode) SetHeight(value float32)
sets the height of the barcode.
type Code25Barcode ¶
type Code25Barcode struct {
TextBarcode
}
Represents a Code 2 of 5 barcode element.
This class can be used to place a Code 2 of 5 barcode on a page.
func NewCode25Barcode ¶
func NewCode25Barcode(value string, placement elementPlacement, height float32, xOffset float32, yOffset float32) *Code25Barcode
Initializes a new instance of the `Code25BarcodeElement` class.
- @param {string} value. The value of the barcode.
- @param {ElementPlacement} placement. The placement of the barcode on the page.
- @param {number} height. The height of the barcode.
- @param {number} xOffset. The X coordinate of the barcode.
- @param {number} yOffset. The Y coordinate of the barcode.
func (*Code25Barcode) ElementType ¶
func (p *Code25Barcode) ElementType() ElementType
func (*Code25Barcode) Height ¶
func (p *Code25Barcode) Height() float32
Gets the height of the barcode.
func (*Code25Barcode) SetHeight ¶
func (p *Code25Barcode) SetHeight(value float32)
Sets the height of the barcode.
type Code39Barcode ¶
type Code39Barcode struct {
TextBarcode
}
Represents a Code 3 of 9 barcode element.
This class can be used to place a Code 3 of 9 barcode on a page.
func NewCode39Barcode ¶
func NewCode39Barcode(value string, placement elementPlacement, height float32, xOffset float32, yOffset float32) *Code39Barcode
func (*Code39Barcode) ElementType ¶
func (p *Code39Barcode) ElementType() ElementType
func (*Code39Barcode) Height ¶
func (p *Code39Barcode) Height() float32
Gets the height of the barcode.
func (*Code39Barcode) SetHeight ¶
func (p *Code39Barcode) SetHeight(value float32)
sets the height of the barcode.
type Code93Barcode ¶
type Code93Barcode struct {
TextBarcode
}
func NewCode93Barcode ¶
func NewCode93Barcode(value string, placement elementPlacement, height float32, xOffset float32, yOffset float32) *Code93Barcode
Initializes a new instance of the `Code93BarcodeElement` class.
- @param {string} value. The value of the barcode.
- @param {ElementPlacement} placement. The placement of the barcode on the page.
- @param {number} height. The height of the barcode.
- @param {number} xOffset. The X coordinate of the barcode.
- @param {number} yOffset. The Y coordinate of the barcode.
func (*Code93Barcode) ElementType ¶
func (p *Code93Barcode) ElementType() ElementType
func (*Code93Barcode) Height ¶
func (p *Code93Barcode) Height() float32
Gets the height of the barcode.
func (*Code93Barcode) SetHeight ¶
func (p *Code93Barcode) SetHeight(value float32)
sets the height of the barcode.
type DataMatrix ¶
type DataMatrix struct {
Dim2
}
func NewDataMatrix ¶
func NewDataMatrix(value string, placement elementPlacement, xOffset float32, yOffset float32, symbolSize DataMatrixSymbolSize, encodingType DataMatrixEncodingType, functionCharacter DataMatrixFunctionCharacter) *DataMatrix
Initializes a new instance of the `DataMatrixBarcodeElement` class.
- @param {string} value. The value of the barcode
- @param {ElementPlacement} placement. The placement of the barcode on the page
- @param {number} xOffset. The X coordinate of the barcode
- @param {number} yOffset. The Y coordinate of the barcode.
- @param {number} symbolsize. The symbol size of the barcode.
- @param {number} encodingType. The encoding type of the barcode.
- @param {number} functionCharacter. The function character of the barcode.
func NewDataMatrixWithByteValue ¶
func NewDataMatrixWithByteValue(value []byte, placement elementPlacement, xOffset float32, yOffset float32, symbolSize DataMatrixSymbolSize, encodingType DataMatrixEncodingType, functionCharacter DataMatrixFunctionCharacter) *DataMatrix
Initializes a new instance of the `DataMatrixBarcodeElement` class.
- @param {Byte[]} value. The value of the barcode
- @param {ElementPlacement} placement. The placement of the barcode on the page
- @param {number} xOffset. The X coordinate of the barcode
- @param {number} yOffset. The Y coordinate of the barcode.
- @param {number} symbolsize. The symbol size of the barcode.
- @param {number} encodingType. The encoding type of the barcode.
- @param {number} functionCharacter. The function character of the barcode.
func (*DataMatrix) ElementType ¶
func (p *DataMatrix) ElementType() ElementType
type DataMatrixEncodingType ¶
type DataMatrixEncodingType string
const ( // Calculates Encoding based on Value. AutoDataMatrixEncodingType DataMatrixEncodingType = "Auto" // Calculates ASCII Encoding based on Value. AutoAscii DataMatrixEncodingType = "AutoAscii" // ASCII Encoding. Ascii DataMatrixEncodingType = "Ascii" // Extended ASCII Encoding. ExtendedAscii DataMatrixEncodingType = "ExtendedAscii" // Double digit Encoding. DoubleDigitDataMatrixEncodingType = "DoubleDigit" // C40 Encoding. C40 DataMatrixEncodingType = "C40" // Text Encoding. TextDataMatrixEncodingType DataMatrixEncodingType = "Text" // ANSI X12 Encoding. AnsiX12 DataMatrixEncodingType = "AnsiX12" // EDIFACT Encoding. Edifact DataMatrixEncodingType = "Edifact" // Base256 Encoding. Base256 DataMatrixEncodingType = "Base256" )
type DataMatrixFunctionCharacter ¶
type DataMatrixFunctionCharacter string
const ( // Macro 05 Character. Macro05 DataMatrixFunctionCharacter = "Macro05" // Macro 06 Character. Macro06 DataMatrixFunctionCharacter = "Macro06" // ReaderProgramming Character. ReaderProgramming DataMatrixFunctionCharacter = "ReaderProgramming" // FNC1 Character. FNC1 DataMatrixFunctionCharacter = "FNC1" // None. None DataMatrixFunctionCharacter = "None" )
type DataMatrixSymbolSize ¶
type DataMatrixSymbolSize string
const ( // Calculates symbol size based on the value. AutoDataMatrixSymbolSize DataMatrixSymbolSize = "Auto" // 10 rows by 10 columns. R10xC10 DataMatrixSymbolSize = "R10xC10" // 12 rows by 12 columns. R12xC12 DataMatrixSymbolSize = "R12xC12" // 14 rows by 14 columns. R14xC14 DataMatrixSymbolSize = "R14xC14" // 16 rows by 16 columns. R16xC16 DataMatrixSymbolSize = "R16xC16" // 18 rows by 18 columns. R18xC18 DataMatrixSymbolSize = "R18xC18" // 20 rows by 20 columns. R20xC20 DataMatrixSymbolSize = "R20xC20" // 22 rows by 22 columns. R22xC22 DataMatrixSymbolSize = "R22xC22" // 24 rows by 24 columns. R24xC24 DataMatrixSymbolSize = "R24xC24" // 26 rows by 26 columns R26xC26 DataMatrixSymbolSize = "R26xC26" // 32 rows by 32 columns. R32xC32 DataMatrixSymbolSize = "R32xC32" // 36 rows by 36 columns. R36xC36 DataMatrixSymbolSize = "R36xC36" // 40 rows by 40 columns. R40xC40 DataMatrixSymbolSize = "R40xC40" // 44 rows by 44 columns. R44xC44 DataMatrixSymbolSize = "R44xC44" // 48 rows by 48 columns. R48xC48 DataMatrixSymbolSize = "R48xC48" // 52 rows by 52 columns. R52xC52 DataMatrixSymbolSize = "R52xC52" // 64 rows by 64 columns. R64xC64 DataMatrixSymbolSize = "R64xC64" // 72 rows by 72 columns. R72xC72 DataMatrixSymbolSize = "R72xC72" // 80 rows by 80 columns. R80xC80 DataMatrixSymbolSize = "R80xC80" // 88 rows by 88 columns. R88xC88 DataMatrixSymbolSize = "R88xC88" // 96 rows by 96 columns. R96xC96 DataMatrixSymbolSize = "R96xC96" // 104 rows by 104 columns. R104xC104 DataMatrixSymbolSize = "R104xC104" // 120 rows by 120 columns. R120xC120 DataMatrixSymbolSize = "R120xC120" // 132 rows by 132 columns. R132xC132 DataMatrixSymbolSize = "R132xC132" // 144 rows by 144 columns. R144xC144 DataMatrixSymbolSize = "R144xC144" // 8 rows by 18 columns. R8xC18 DataMatrixSymbolSize = "R8xC18" // 8 rows by 32 columns. R8xC32 DataMatrixSymbolSize = "R8xC32" // 12 rows by 26 columns. R12xC26 DataMatrixSymbolSize = "R12xC26" // 12 rows by 36 columns. R12xC36 DataMatrixSymbolSize = "R12xC36" // 16 rows by 36 columns. R16xC36 DataMatrixSymbolSize = "R16xC36" // 16 rows by 48 columns. R16xC48 DataMatrixSymbolSize = "R16xC48" )
type Dim2 ¶
type Dim2 struct {
Barcode
}
The base class for 2 dimensional bar codes (Aztec, Pdf417, DataMatrixBarcode and QrCode).
type Element ¶
type Element struct { ElementCollector `json:"-"` // Gets and sets placement of the page element on the page. Placement elementPlacement `json:"placement,omitempty"` // Gets or sets the X coordinate of the page element. XOffset float32 `json:"xOffset,omitempty"` // Gets or sets the Y coordinate of the page element. YOffset float32 `json:"yOffset,omitempty"` // Gets or sets the boolean value specifying whether the element should be added to even pages or not. EvenPages bool `json:"evenPages,omitempty"` // Gets or sets the boolean value specifying whether the element should be added to odd pages or not. OddPages bool `json:"oddPages,omitempty"` // contains filtered or unexported fields }
func (Element) MarshalJSON ¶
type ElementCollector ¶
type ElementCollector interface { InputValue() string ElementType() ElementType TextFont() font.Font Resources() resource.Resource }
Base class from which all page elements are derived.
type ElementType ¶
type ElementType string
const ( // Text element. TextElement ElementType = "Text" // Image element. ImageElement ElementType = "Image" // Code 128 barcode element. Code128BarcodeElement ElementType = "Code128Barcode" // Code 39 barcode element. Code39BarcodeElement ElementType = "Code39Barcode" // Code 2 of 5 barcode element. Code25BarcodeElement ElementType = "Code25Barcode" // Code 93 barcode element. Code93BarcodeElement ElementType = "Code93Barcode" // Code 11 barcode element. Code11BarcodeElement ElementType = "Code11Barcode" // GS1 data bar barcode element. Gs1DataBarBarcodeElement ElementType = "Gs1DataBarBarcode" // IATA 25 barcode element. Iata25BarcodeElement ElementType = "Iata25Barcode" // MSI barcode element. MsiBarcodeElement ElementType = "MsiBarcode" // Stacked GS1 data bar barcode element. StackedGs1DataBarBarcodeElement ElementType = "StackedGs1DataBarBarcode" // Aztec barcode element. AztecBarcodeElement ElementType = "AztecBarcode" // Data Matrix barcode element. DataMatrixBarcodeElement ElementType = "DataMatrixBarcode" // Pdf417 barcode Pdf417BarcodeElement ElementType = "Pdf417Barcode" // Qrcode barcode QrCodeElement ElementType = "QrCode" // PageNumbering Element PageNumberingElement ElementType = "PageNumbering" // Line Element LineElement ElementType = "Line" // Rectangle Element RectangleElement ElementType = "Rectangle" )
type ErrorCorrection ¶
type ErrorCorrection string
const ( // Error Correction Level 0. Level0 ErrorCorrection = "Level0" // Error Correction Level 1. Level1 ErrorCorrection = "Level1" // Error Correction Level 2. Level2 ErrorCorrection = "Level2" // Error Correction Level 3. Level3 ErrorCorrection = "Level3" // Error Correction Level 4. Level4 ErrorCorrection = "Level4" // Error Correction Level 5. Level5 ErrorCorrection = "Level5" // Error Correction Level 6. Level6 ErrorCorrection = "Level6" // Error Correction Level 7. Level7 ErrorCorrection = "Level7" // Error Correction Level 8. Level8 ErrorCorrection = "Level8" )
type Gs1DataBar ¶
type Gs1DataBar struct {
TextBarcode
}
Represents a GS1DataBar barcode element.
func NewGs1DataBarBarcode ¶
func NewGs1DataBarBarcode(value string, placement elementPlacement, height float32, bartype Gs1DataBarType, xOffset float32, yOffset float32) *Gs1DataBar
Initializes a new instance of the `Gs1DataBarBarcodeElement` class.
- @param {string} value. The value of the barcode.
- @param {ElementPlacement} placement. The placement of the barcode on the page.
- @param {float} height. The height of the barcode.
- @param {barType} type. The GS1DataBarType of the barcode.
- @param {float} xOffset. The X coordinate of the barcode.
- @param {float} yOffset. The Y coordinate of the barcode.
func (*Gs1DataBar) ElementType ¶
func (p *Gs1DataBar) ElementType() ElementType
func (*Gs1DataBar) SetHeight ¶
func (p *Gs1DataBar) SetHeight(value float32)
Sets the height of the barcode.
type Gs1DataBarType ¶
type Gs1DataBarType string
Represents GS1 DataBar types.
const ( // Omnidirectional GS1 DataBar type. Omnidirectional Gs1DataBarType = "Omnidirectional" // Limited GS1 DataBar type. Limited Gs1DataBarType = "Limited" // Expanded GS1 DataBar type. Expanded Gs1DataBarType = "Expanded" )
type Iata25Barcode ¶
type Iata25Barcode struct {
TextBarcode
}
Represents an IATA 2 of 5 barcode element.
This class can be used to place an IATA 2 of 5 barcode on a page.
func NewIata25Barcode ¶
func NewIata25Barcode(value string, placement elementPlacement, height float32, xOffset float32, yOffset float32) *Iata25Barcode
Initializes a new instance of the `Iata25BarcodeElement` class.
- @param {string} value The value of the barcode.
- @param {ElementPlacement} placement The placement of the barcode on the page.
- @param {float} height The height of the barcode.
- @param {float} xOffset The X coordinate of the barcode.
- @param {float} yOffset The Y coordinate of the barcode.
func (*Iata25Barcode) ElementType ¶
func (p *Iata25Barcode) ElementType() ElementType
func (*Iata25Barcode) Height ¶
func (p *Iata25Barcode) Height() float32
Gets the height of the barcode.
func (*Iata25Barcode) IncludeCheckDigit ¶
func (p *Iata25Barcode) IncludeCheckDigit() bool
Gets a value indicating if the check digit should be added to the value.
func (*Iata25Barcode) SetHeight ¶
func (p *Iata25Barcode) SetHeight(value float32)
Sets the height of the barcode.
func (*Iata25Barcode) SetIncludeCheckDigit ¶
func (p *Iata25Barcode) SetIncludeCheckDigit(value bool)
Sets a value indicating if the check digit should be added to the value.
type Image ¶
type Image struct {
Element
}
Represents an image element.
This class can be used to place images on a page.
func NewImageWithResourcePath ¶
func NewImageWithResourcePath(value string, placement elementPlacement, xOffset float32, yOffset float32) *Image
Initializes a new instance of the `ImageElement` class. *
- @param {string} resource The name of the image resource. | object containing the image resource.
- @param {ElementPlacement} placement The placement of the image on the page.
- @param {float} xOffset X coordinate of the image.
- @param {float} yOffset Y coordinate of the image.
func NewImagewithImageResource ¶
func NewImagewithImageResource(value resource.ImageResource, placement elementPlacement, xOffset float32, yOffset float32) *Image
Initializes a new instance of the `ImageElement` class.
- @param {Resource} resource The name of the image resource. | object containing the image resource.
- @param {ElementPlacement} placement The placement of the image on the page.
- @param {float} xOffset X coordinate of the image.
- @param {float} yOffset Y coordinate of the image.
func (*Image) ElementType ¶
func (p *Image) ElementType() ElementType
func (*Image) SetMaxHeight ¶
Sets the maximum height of the image.
func (*Image) SetMaxWidth ¶
Sets the maximum width of the image.
type Line ¶
type Line struct { Element // contains filtered or unexported fields }
Represents a line page element.
This class can be used to place lines of different length, width, color and patterns on a page.
func NewLine ¶
Initializes a new instance of the `LineElement` class.
- @param {ElementPlacement} placement The placement of the line on the page.
- @param {float} x2Offset X2 coordinate of the line.
- @param {float} y2Offset Y2 coordinate of the line.
func (*Line) ElementType ¶
func (p *Line) ElementType() ElementType
func (*Line) SetLineStyle ¶
func (*Line) SetX2Offset ¶
Sets the X2 coordinate of the line.
func (*Line) SetY2Offset ¶
sets the X2 coordinate of the line.
type LineStyle ¶
type LineStyle struct {
// contains filtered or unexported fields
}
func NewLineStyle ¶
Initializes a new instance of the `LineStyle` class.
- @param {float[]} dashArray The array specifying the line style.
- @param {float} dashPhase The phase of the line style.
type MsiBarcode ¶
type MsiBarcode struct {
TextBarcode
}
Represents a MSI Barcode element (also known as Modified Plessey).
func NewMsiBarcode ¶
func NewMsiBarcode(value string, placement elementPlacement, height float32, xOffset float32, yOffset float32) *MsiBarcode
Initializes a new instance of the `MsiBarcodeElement` class.
- @param {string} value The value of the barcode.
- @param {ElementPlacement} placement The placement of the barcode on the page.
- @param {float} height The height of the barcode.
- @param {float} xOffset The X coordinate of the barcode.
- @param {float} yOffset The Y coordinate of the barcode.
func (*MsiBarcode) ElementType ¶
func (p *MsiBarcode) ElementType() ElementType
func (*MsiBarcode) SetHeight ¶
func (p *MsiBarcode) SetHeight(value float32)
Sets the height of the barcode.
type MsiBarcodeCheckDigitMode ¶
type MsiBarcodeCheckDigitMode string
const ( // check digit of mod 10. Mod10 MsiBarcodeCheckDigitMode = "mod10" // check digit of mod 11. Mod11 MsiBarcodeCheckDigitMode = "mod11" // check digit of mod 1010. Mod1010 MsiBarcodeCheckDigitMode = "mod1010" // check digit of mod 1110. Mod1110 MsiBarcodeCheckDigitMode = "mod1110" )
type PageNumbering ¶
type PageNumbering struct { Element // contains filtered or unexported fields }
Represents a page numbering label page element.
func NewPageNumberingElement ¶
func NewPageNumberingElement(value string, placement elementPlacement, xOffset float32, yOffset float32) *PageNumbering
Initializes a new instance of the `PageNumberingElement` class.
- @param {string} text Text to display in the label.
- @param {ElementPlacement} placement The placement of the page numbering element on the page.
- @param {float} xOffset X coordinate of the label.
- @param {float} yOffset Y coordinate of the label.
func (*PageNumbering) Color ¶
func (p *PageNumbering) Color() color.Color
Gets `Color` object to use for the text of the label.
func (*PageNumbering) ElementType ¶
func (p *PageNumbering) ElementType() ElementType
func (*PageNumbering) Font ¶
func (p *PageNumbering) Font() font.Font
Gets the `Font` object to use for the text of the label.
func (*PageNumbering) FontSize ¶
func (p *PageNumbering) FontSize() float32
Gets the font size for the text of the label.
func (*PageNumbering) SetColor ¶
func (p *PageNumbering) SetColor(color color.Color)
sets `Color` object to use for the text of the label.
func (*PageNumbering) SetFont ¶
func (p *PageNumbering) SetFont(font font.Font)
sets the `Font` object to use for the text of the label.
func (*PageNumbering) SetFontSize ¶
func (p *PageNumbering) SetFontSize(value float32)
Sets the font size for the text of the label.
func (*PageNumbering) SetText ¶
func (p *PageNumbering) SetText(value string)
sets the text to display in the label.
func (*PageNumbering) Text ¶
func (p *PageNumbering) Text() string
Gets the text to display in the label.
type Pdf417Barcode ¶
type Pdf417Barcode struct {
Dim2
}
Represents Pdf417 barcode element.
This class can be used to generate Pdf417 barcode symbol.
func NewPdf417Barcode ¶
func NewPdf417Barcode(value string, placement elementPlacement, columns int, xOffset float32, yOffset float32) *Pdf417Barcode
Initializes a new instance of the `Pdf417BarcodeElement` class.
- @param {string} value String to be encoded | byte array.
- @param {ElementPlacement} placement The placement of the barcode on the page.
- @param {int} columns Columns of the PDF417 barcode.
- @param {float} xOffset The X coordinate of the PDF417 barcode.
- @param {float} yOffset The Y coordinate of the PDF417 barcode.
func NewPdf417BarcodeWithByteValue ¶
func NewPdf417BarcodeWithByteValue(value []byte, placement elementPlacement, columns int, xOffset float32, yOffset float32) *Pdf417Barcode
Initializes a new instance of the `Pdf417BarcodeElement` class.
- @param {Byte[]} value String to be encoded | byte array.
- @param {ElementPlacement} placement The placement of the barcode on the page.
- @param {int} columns Columns of the PDF417 barcode.
- @param {float} xOffset The X coordinate of the PDF417 barcode.
- @param {float} yOffset The Y coordinate of the PDF417 barcode.
func (*Pdf417Barcode) Columns ¶
func (p *Pdf417Barcode) Columns() int
Gets the columns of the barcode.
func (*Pdf417Barcode) CompactPdf417 ¶
func (a *Pdf417Barcode) CompactPdf417() bool
Gets the Compact Pdf417.
func (*Pdf417Barcode) Compaction ¶
func (a *Pdf417Barcode) Compaction() compaction
Gets the type of compaction.
func (*Pdf417Barcode) ElementType ¶
func (p *Pdf417Barcode) ElementType() ElementType
func (*Pdf417Barcode) ErrorCorrection ¶
func (a *Pdf417Barcode) ErrorCorrection() ErrorCorrection
Gets or sets the error correction level for the PDF417 barcode.
func (*Pdf417Barcode) ProcessTilde ¶
func (a *Pdf417Barcode) ProcessTilde() bool
Gets a boolean indicating whether to process the tilde character.
func (*Pdf417Barcode) SetColumns ¶
func (p *Pdf417Barcode) SetColumns(value int)
Sets the columns of the barcode.
func (*Pdf417Barcode) SetCompactPdf417 ¶
func (a *Pdf417Barcode) SetCompactPdf417(value bool)
Sets the Compact Pdf417.
func (*Pdf417Barcode) SetCompaction ¶
func (a *Pdf417Barcode) SetCompaction(value compaction)
sets the type of compaction.
func (*Pdf417Barcode) SetErrorCorrection ¶
func (a *Pdf417Barcode) SetErrorCorrection(value ErrorCorrection)
sets the error correction level for the PDF417 barcode.
func (*Pdf417Barcode) SetProcessTilde ¶
func (a *Pdf417Barcode) SetProcessTilde(value bool)
Sets a boolean indicating whether to process the tilde character.
func (*Pdf417Barcode) SetYDimension ¶
func (a *Pdf417Barcode) SetYDimension(value float32)
Sets the YDimension of the barcode.
func (*Pdf417Barcode) YDimension ¶
func (a *Pdf417Barcode) YDimension() float32
Gets the YDimension of the barcode.
type QrCode ¶
type QrCode struct {
Dim2
}
Represents a QR code barcode element.
func NewQrCodeElement ¶
func NewQrCodeElement(value string, placement elementPlacement, xOffset float32, yOffset float32) *QrCode
Initializes a new instance of the `QrCodeElement` class.
- @param {string} value The value of the QR code.
- @param {ElementPlacement} placement The placement of the barcode on the page.
- @param {float} xOffset The X coordinate of the QR code.
- @param {float} yOffset The Y coordinate of the QR code.
func NewQrCodeElementWithByteArray ¶
func NewQrCodeElementWithByteArray(value []byte, placement elementPlacement, xOffset float32, yOffset float32) *QrCode
Initializes a new instance of the `QrCodeElement` class.
- @param {byte[]} value The value of the QR code.
- @param {ElementPlacement} placement The placement of the barcode on the page.
- @param {float} xOffset The X coordinate of the QR code.
- @param {float} yOffset The Y coordinate of the QR code.
func (*QrCode) ElementType ¶
func (p *QrCode) ElementType() ElementType
func (*QrCode) SetVersion ¶
Gets or sets the QR code version.
type QrCodeFnc1 ¶
type QrCodeFnc1 = string
const ( // FNC1 Gs1. Gs1 QrCodeFnc1 = "gs1" // FNC1 Industry. Industry QrCodeFnc1 = "industry" )
type Rectangle ¶
type Rectangle struct { Element // contains filtered or unexported fields }
Represents a rectangle page element.
This class can be used to place rectangles of any size or color on a page.
func NewRectangle ¶
func (*Rectangle) BorderColor ¶
Gets the `Color` object to use for the border of the rectangle.
func (*Rectangle) BorderStyle ¶
Gets the `BorderStyle` object used to specify the border style of the rectangle.
func (*Rectangle) BorderWidth ¶
Gets the border width of the rectangle.
func (*Rectangle) CornerRadius ¶
Gets the corner radius of the rectangle.
func (*Rectangle) ElementType ¶
func (p *Rectangle) ElementType() ElementType
func (*Rectangle) SetBorderColor ¶
sets the `Color` object to use for the border of the rectangle.
func (*Rectangle) SetBorderStyle ¶
sets the `BorderStyle` object used to specify the border style of the rectangle.
func (*Rectangle) SetBorderWidth ¶
sets the border width of the rectangle.
func (*Rectangle) SetCornerRadius ¶
Sets the corner radius of the rectangle.
func (*Rectangle) SetFillColor ¶
sets the `Color` object to use for the fill of the rectangle.
type StackedGs1DataBarBarcode ¶
type StackedGs1DataBarBarcode struct {
TextBarcode
}
Represents a StackedGS1DataBar barcode element.
func NewStackedGs1DataBarBarcode ¶
func NewStackedGs1DataBarBarcode(value string, placement elementPlacement, stackedGs1BarType stackedGs1DataBarType, rowHeight float32, xOffset float32, yOffset float32) *StackedGs1DataBarBarcode
Initializes a new instance of the `StackedGs1DataBarBarcodeElement` class.
- @param {string} value The value of the barcode.
- @param {ElementPlacement} placement The placement of the barcode on the page.
- @param {StackedGs1DataBarType} stackedGs1DataBarType The StackedGS1DataBarType of the barcode.
- @param {float} rowHeight The row height of the barcode.
- @param {float} xOffset The X coordinate of the barcode.
- @param {float} yOffset The Y coordinate of the barcode.
func (*StackedGs1DataBarBarcode) ElementType ¶
func (p *StackedGs1DataBarBarcode) ElementType() ElementType
func (*StackedGs1DataBarBarcode) ExpandedStackedSegmentCount ¶
func (p *StackedGs1DataBarBarcode) ExpandedStackedSegmentCount() int
func (*StackedGs1DataBarBarcode) RowHeight ¶
func (p *StackedGs1DataBarBarcode) RowHeight() float32
Gets the row height of the barcode.
func (*StackedGs1DataBarBarcode) SetExpandedStackedSegmentCount ¶
func (p *StackedGs1DataBarBarcode) SetExpandedStackedSegmentCount(value int)
func (*StackedGs1DataBarBarcode) SetRowHeight ¶
func (p *StackedGs1DataBarBarcode) SetRowHeight() float32
Sets the row height of the barcode.
type Template ¶
type Template struct { // Gets or Sets the name of a signature field. Id string `json:"id"` // Gets or Sets the boolean, indicating the field signed or not. Elements []ElementCollector `json:"elements"` }
Represents a document template.
func NewTemplate ¶
func NewTemplate() Template
type Text ¶
type Text struct { Element // contains filtered or unexported fields }
func (*Text) ElementType ¶
func (p *Text) ElementType() ElementType
func (*Text) Font ¶
Gets the `Font` object used to specify the font of the text for the text element.
func (*Text) SetFont ¶
Sets the `Font` object used to specify the font of the text for the text element.
func (*Text) SetFontSize ¶
Sets the font size for the text of the text element.
type TextBarcode ¶
type TextBarcode struct { Barcode // contains filtered or unexported fields }
Base class from which barcode page elements that display text are derived.
func NewTextBarcode ¶
func NewTextBarcode(value string, placement elementPlacement, xOffset float32, yOffset float32) *TextBarcode
func (*TextBarcode) ElementType ¶
func (p *TextBarcode) ElementType() ElementType
func (*TextBarcode) Font ¶
func (p *TextBarcode) Font() font.Font
Gets the font to use when displaying the text.
func (*TextBarcode) FontSize ¶
func (p *TextBarcode) FontSize() float32
Gets the font size to use when displaying the text.
func (*TextBarcode) SetFont ¶
func (p *TextBarcode) SetFont(font font.Font)
Sets the font to use when displaying the text.
func (*TextBarcode) SetFontSize ¶
func (p *TextBarcode) SetFontSize(value float32)
Sets the font size to use when displaying the text.
func (*TextBarcode) SetShowText ¶
func (p *TextBarcode) SetShowText(value bool)
Sets a value indicating if the value should be placed as text below the barcode.
func (*TextBarcode) SetText ¶
func (p *TextBarcode) SetText(value string)
func (*TextBarcode) SetTextColor ¶
func (p *TextBarcode) SetTextColor(color color.Color)
Sets the color of the text.
func (*TextBarcode) ShowText ¶
func (p *TextBarcode) ShowText() bool
Gets a value indicating if the value should be placed as text below the barcode.
func (*TextBarcode) Text ¶
func (p *TextBarcode) Text() string
func (*TextBarcode) TextColor ¶
func (p *TextBarcode) TextColor() color.Color
Gets the color of the text.
Source Files
¶
- AztecBarcode.go
- AztecSymbolSize.go
- Barcode.go
- Code11Barcode.go
- Code128Barcode.go
- Code25Barcode.go
- Code39Barcode.go
- Code93Barcode.go
- Compaction.go
- DataMatrixEncodingType.go
- DataMatrixFunctionCharacter.go
- DataMatrixSymbolSize.go
- Dim2.go
- Element.go
- ElementPlacement.go
- ElementType.go
- ErrorCorrection.go
- Gs1DataBar.go
- Gs1DataBarType.go
- Iata25Barcode.go
- Image.go
- Line.go
- MsiBarcode.go
- MsiBarcodeCheckDigitMode.go
- PageNumbering.go
- Pdf417Barcode.go
- QrCode.go
- QrCodeFnc1.go
- Rectangle.go
- StackedGs1DataBarType.go
- Template.go
- Text.go
- TextBarcode.go
- ValueType.go
- datamatrixbarcode.go
- linestyle.go
- stackedgs1databarbarcode.go