johnfercher/maroto

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

Go

2,766

586 commits

updated Oct 6, 2026

See the code

README

Maroto V2

GoDoc 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.3 is here! Try out:

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

result

Agent Skills

Maroto ships a set of skills for AI coding agents (Claude, Copilot, Cursor, etc.): Markdown instruction files that teach an agent how to generate PDFs with maroto — setup, config, layout, components, tables and testing — with every default and pitfall spelled out. The files work together as one package: copy the whole skills/maroto-pdf/ folder into your project and point your agent at its entry file, generation.md. Full description on the docs site.

Contributing

If you are an AI agent/LLM working on this repository, read AGENTS.md first and follow the standards defined in .github/skills.

CommandDescriptionDependencies
make buildBuild projectgo
make testRun unit testsgo
make fmtFormat filesgo (runs gofumpt/goimports via tools/go.mod)
make lintCheck filesgo (runs golangci-lint via tools/go.mod)
make dod(Definition of Done) Format files and check filesSame as make build, make test, make fmt, make lint and make codecov
make installInstall all dependencies and the pre-commit hookgo and npm (for docsify-cli)
make examplesRun all examplesgo
make mocksGenerate mocksgo (runs mockery via tools/go.mod)
make docsRun docsify docs server localdocsify
make godocRun godoc server localgo (runs godoc via tools/go.mod)
make install-hooksPoint git at .githooks so make dod runs on every commitgit
make codecovWarn about functions with 0% test coverage (never fails)go

goimports, gofumpt, golangci-lint, mockery, and godoc are versioned tool dependencies declared in tools/go.mod, a separate module so their transitive dependencies never end up in the main go.sum. See contribution.md for details.

make install (or make install-hooks on its own) configures a pre-commit git hook, tracked at .githooks/pre-commit, that runs make dod before every commit and blocks it if build, test, fmt, or lint fail.

Stargazers over time

Stargazers over time

bootstrap
fast
golang
grid
pdf
simple

johnfercher/maroto

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

Go

2,766

586 commits

updated Oct 6, 2026

See the code

README

Maroto V2

GoDoc 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.3 is here! Try out:

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

result

Agent Skills

Maroto ships a set of skills for AI coding agents (Claude, Copilot, Cursor, etc.): Markdown instruction files that teach an agent how to generate PDFs with maroto — setup, config, layout, components, tables and testing — with every default and pitfall spelled out. The files work together as one package: copy the whole skills/maroto-pdf/ folder into your project and point your agent at its entry file, generation.md. Full description on the docs site.

Contributing

If you are an AI agent/LLM working on this repository, read AGENTS.md first and follow the standards defined in .github/skills.

CommandDescriptionDependencies
make buildBuild projectgo
make testRun unit testsgo
make fmtFormat filesgo (runs gofumpt/goimports via tools/go.mod)
make lintCheck filesgo (runs golangci-lint via tools/go.mod)
make dod(Definition of Done) Format files and check filesSame as make build, make test, make fmt, make lint and make codecov
make installInstall all dependencies and the pre-commit hookgo and npm (for docsify-cli)
make examplesRun all examplesgo
make mocksGenerate mocksgo (runs mockery via tools/go.mod)
make docsRun docsify docs server localdocsify
make godocRun godoc server localgo (runs godoc via tools/go.mod)
make install-hooksPoint git at .githooks so make dod runs on every commitgit
make codecovWarn about functions with 0% test coverage (never fails)go

goimports, gofumpt, golangci-lint, mockery, and godoc are versioned tool dependencies declared in tools/go.mod, a separate module so their transitive dependencies never end up in the main go.sum. See contribution.md for details.

make install (or make install-hooks on its own) configures a pre-commit git hook, tracked at .githooks/pre-commit, that runs make dod before every commit and blocks it if build, test, fmt, or lint fail.

Stargazers over time

Stargazers over time

bootstrap
fast
golang
grid
pdf
simple

Project health

Overall

5.5/10

Maintained

10/10

Code review

1/10
OpenSSF Scorecard

Latest release

v1.0.0 · Sep 14, 2023

Releases this year

0

Significant stargazers

Eugene Kalinin

288 followers · starred Sep 2024

Alexis Hildebrandt

122 followers · starred Sep 2026

zirain

142 followers · starred Dec 2024

Jamie Mansfield

117 followers · starred Jan 2023