-
-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b22cfd1
commit 89d9882
Showing
20 changed files
with
452 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package main | ||
|
||
import ( | ||
"github.com/johnfercher/maroto/pkg/v22" | ||
"github.com/johnfercher/maroto/pkg/v22/col" | ||
"github.com/johnfercher/maroto/pkg/v22/image" | ||
"github.com/johnfercher/maroto/pkg/v22/row" | ||
) | ||
|
||
func main() { | ||
pdf := v22.NewDocument("pdfzin") | ||
|
||
header := buildRow() | ||
content := buildRow() | ||
footer := buildRow() | ||
|
||
pdf.Add(header, content, footer) | ||
|
||
pdf.Render() | ||
} | ||
|
||
func buildRow() v22.Component { | ||
row := row.New(20) | ||
|
||
image := image.New("image1") | ||
|
||
col1 := col.New(4) | ||
col1.Add(image) | ||
|
||
col2 := col.New(4) | ||
col3 := col.New(4) | ||
|
||
row.Add(col1, col2, col3) | ||
return row | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,25 @@ | ||
module github.com/johnfercher/maroto | ||
|
||
go 1.13 | ||
go 1.21.1 | ||
|
||
require ( | ||
github.com/boombuler/barcode v1.0.1 | ||
github.com/google/uuid v1.3.0 | ||
github.com/jung-kurt/gofpdf v1.16.2 | ||
github.com/pkg/errors v0.9.1 | ||
github.com/stretchr/testify v1.8.4 | ||
) | ||
|
||
require ( | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/johnfercher/go-tree v1.0.2 // indirect | ||
github.com/phpdave11/gofpdf v1.4.2 // indirect | ||
github.com/phpdave11/gofpdi v1.0.12 // indirect | ||
github.com/pmezard/go-difflib v1.0.0 // indirect | ||
github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245 // indirect | ||
github.com/stretchr/objx v0.2.0 // indirect | ||
github.com/stretchr/testify v1.3.0 | ||
github.com/stretchr/objx v0.5.0 // indirect | ||
golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a // indirect | ||
golang.org/x/text v0.3.0 // indirect | ||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 // indirect | ||
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.