Skip to content

Commit

Permalink
doc for datamatrix
Browse files Browse the repository at this point in the history
  • Loading branch information
kmpm authored Jun 23, 2021
1 parent 95e580f commit b6e05b7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ go get -u github.com/johnfercher/maroto
* [Signature](https://pkg.go.dev/github.com/johnfercher/maroto/pkg/pdf?tab=doc#PdfMaroto.Signature)
* Image ([From file](https://pkg.go.dev/github.com/johnfercher/maroto/pkg/pdf?tab=doc#PdfMaroto.FileImage) or [Base64](https://pkg.go.dev/github.com/johnfercher/maroto/pkg/pdf?tab=doc#PdfMaroto.Base64Image))
* [QrCode](https://pkg.go.dev/github.com/johnfercher/maroto/pkg/pdf?tab=doc#PdfMaroto.QrCode)
* [Barcode](https://pkg.go.dev/github.com/johnfercher/maroto/pkg/pdf?tab=doc#PdfMaroto.Barcode)
* [Barcode](https://pkg.go.dev/github.com/johnfercher/maroto/pkg/pdf?tab=doc#PdfMaroto.Barcode)
* [DataMatrixCode](https://pkg.go.dev/github.com/johnfercher/maroto/pkg/pdf?tab=doc#P#PdfMaroto.DataMatrixCode)

#### Components To Use Outside a Row
* [TableList](https://pkg.go.dev/github.com/johnfercher/maroto/pkg/pdf?tab=doc#PdfMaroto.TableList)
Expand Down
2 changes: 2 additions & 0 deletions docs/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Features and Components
- Qrcodes
- DataMatrix codes
- Signatures
Maroto has only gofpdf dependency. All tests pass on Linux and Mac.
Expand Down
1 change: 1 addition & 0 deletions internal/code.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func NewCode(pdf fpdf.Fpdf, math Math) *code {
}
}

// AddDataMatrix creates a DataMatrix code inside a cell
func (s *code) AddDataMatrix(code string, cell Cell, prop props.Rect) {
key := barcode.RegisterDataMatrix(s.pdf, code)

Expand Down
2 changes: 2 additions & 0 deletions pkg/pdf/pdf.go
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,8 @@ func (s *PdfMaroto) Barcode(code string, prop ...props.Barcode) (err error) {

return
}

// DataMatrixCode creates an datamatrix code inside a cell.
func (s *PdfMaroto) DataMatrixCode(code string, prop ...props.Rect) {
rectProp := props.Rect{}
if len(prop) > 0 {
Expand Down

0 comments on commit b6e05b7

Please sign in to comment.