MCPcopy
hub / github.com/johnfercher/maroto

github.com/johnfercher/maroto @v2.4.0 sqlite

repository ↗ · DeepWiki ↗ · release v2.4.0 ↗
2,942 symbols 9,661 edges 246 files 1,278 documented · 43%
README

Maroto V2

GoDoc Go Report Card Mentioned in Awesome Go
CI Lint Codecov Visits Badge Stars Badge

A Maroto way to create PDFs. Maroto is inspired in Bootstrap and uses Gofpdf. Fast and simple.

sirmaroto

Maroto definition: Brazilian expression, means an astute/clever/intelligent person. Art by @marinabankr

You can write your PDFs like you are creating a site using Bootstrap. A Row may have many Cols, and a Col may have many components. Besides that, pages will be added when content may extrapolate the useful area. You can define a header which will be added always when a new page appear, in this case, a header may have many rows, lines or tablelist.

Maroto v2.4.0 is here! Try out:

  • Installation withgo get:
go get github.com/johnfercher/maroto/v2@v2.4.0
  • You can see the full v2 documentation here.
  • The v1 still exists in this branch, and you can see the doc here.

result

Contributing

Command Description Dependencies
make build Build project go
make test Run unit tests go
make fmt Format files gofmt, gofumpt and goimports
make lint Check files golangci-lint
make dod (Definition of Done) Format files and check files Same as make build, make test, make fmt and make lint
make install Install all dependencies go, curl and git
make examples Run all examples go
make mocks Generate mocks go and mockery
make docs Run docsify docs server local docsify
make godoc Run godoc server local godoc

Stargazers over time

Stargazers over time

Extension points exported contracts — how you extend this code

Listable (Interface)
Listable is the main abstraction of a listable item in a TableList. A collection of objects that implements this interfa [6 …
pkg/components/list/list.go
Checkbox (Interface)
Checkbox is the abstraction which deals of how to add checkboxes inside PDF. [21 implementers]
pkg/core/components.go
Cache (Interface)
Cache is the interface to cache images. [4 implementers]
internal/cache/cache.go
Repository (Interface)
Repository is the abstraction to load custom fonts. [3 implementers]
pkg/repository/repository.go
Fpdf (Interface)
Fpdf defines the interface used for various methods. It is implemented by the main FPDF instance as well as templates. [2 …
internal/providers/gofpdf/gofpdfwrapper/fpdf.go
Builder (Interface)
Builder is the abstraction responsible for global customizations on the document. [1 implementers]
pkg/config/builder.go
Node (Interface)
Node is the interface that wraps the basic methods of a node. [22 implementers]
pkg/core/core.go
Builder (Interface)
Builder is the dependencies builder for gofpdf. [1 implementers]
internal/providers/gofpdf/builder.go

Core symbols most depended-on inside this repo

Run
called by 511
mocks/Col.go
run
called by 275
cmd/benchmark/main.go
Return
called by 221
mocks/Fpdf.go
Return
called by 203
mocks/Col.go
Add
called by 202
pkg/core/core.go
EXPECT
called by 177
mocks/Fpdf.go
Run
called by 176
mocks/Fpdf.go
New
called by 146
pkg/test/test.go

Shape

Method 1,950
Function 570
Struct 385
Interface 22
TypeAlias 15

Languages

Go100%

Modules by API surface

mocks/Fpdf.go1,060 symbols
internal/providers/gofpdf/gofpdfwrapper/fpdf.go178 symbols
mocks/Provider.go130 symbols
mocks/Font.go70 symbols
mocks/Maroto.go64 symbols
pkg/config/builder.go56 symbols
mocks/Row.go46 symbols
mocks/Page.go46 symbols
mocks/Col.go46 symbols
pkg/core/core.go41 symbols
mocks/Document.go34 symbols
pkg/core/components.go29 symbols

Dependencies from manifests, versioned

github.com/boombuler/barcodev1.1.0 · 1×
github.com/clipperhouse/uax29/v2v2.7.0 · 1×
github.com/davecgh/go-spewv1.1.1 · 1×
github.com/f-amaral/go-asyncv0.3.0 · 1×
github.com/hhrutter/lzwv1.0.0 · 1×
github.com/hhrutter/pkcs7v0.2.0 · 1×
github.com/hhrutter/tiffv1.0.2 · 1×
github.com/johnfercher/go-treev1.1.0 · 1×
github.com/mattn/go-runewidthv0.0.21 · 1×
github.com/pdfcpu/pdfcpuv0.11.1 · 1×
github.com/phpdave11/gofpdfv1.4.3 · 1×

For agents

$ claude mcp add maroto \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact