maroto

package module
v2.0.0-beta.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 13, 2024 License: MIT Imports: 16 Imported by: 25

README

Maroto V2

GoDoc Go Report Card Mentioned in Awesome Go
CI Lint Codecov Visits 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.0.0-beta.12 is here! Try out:
  • Installation withgo get:
go get github.com/johnfercher/maroto/v2@v2.0.0-beta.12
  • 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 docs serve local docsify

Stargazers over time

Stargazers over time

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfgs ...*entity.Config) core.Maroto

New is responsible for create a new instance of core.Maroto. It's optional to provide an *entity.Config with customizations those customization are created by using the config.Builder.

func NewMetricsDecorator

func NewMetricsDecorator(inner core.Maroto) core.Maroto

NewMetricsDecorator is responsible to create the metrics decorator for the maroto instance.

Types

This section is empty.

Directories

Path Synopsis
cmd
Package docs is the documentation of maroto lib.
Package docs is the documentation of maroto lib.
internal
nolint: dupl
pkg
Package pkg contains the public code of maroto.
Package pkg contains the public code of maroto.
components
Package components contains the public components of maroto.
Package components contains the public components of maroto.
components/code
Package code implements creation of Barcode, MatrixCode and QrCode.
Package code implements creation of Barcode, MatrixCode and QrCode.
components/col
Package col implements creation of columns.
Package col implements creation of columns.
components/image
Package image implements creation of images from file and bytes.
Package image implements creation of images from file and bytes.
components/line
Package line implements creation of lines.
Package line implements creation of lines.
components/list
Package list implements creation of lists (old tablelist).
Package list implements creation of lists (old tablelist).
components/page
Package page implements creation of pages.
Package page implements creation of pages.
components/row
Package row implements creation of rows.
Package row implements creation of rows.
components/signature
Package signature implements creation of signatures.
Package signature implements creation of signatures.
components/text
Package text implements creation of texts.
Package text implements creation of texts.
config
Package config implements custom configuration builder.
Package config implements custom configuration builder.
consts
Package consts contains the public constants of maroto.
Package consts contains the public constants of maroto.
consts/align
Package align contains all align types.
Package align contains all align types.
consts/border
Package border contains all border types.
Package border contains all border types.
consts/breakline
Package breakline contains all break line strategies.
Package breakline contains all break line strategies.
consts/extension
Package extension contains all image extensions.
Package extension contains all image extensions.
consts/fontfamily
Package fontfamily contains all default font families.
Package fontfamily contains all default font families.
consts/fontstyle
Package fontstyle contains all default font styles.
Package fontstyle contains all default font styles.
consts/linestyle
Package linestyle contains all line styles.
Package linestyle contains all line styles.
consts/orientation
Package orientation contains all orientations.
Package orientation contains all orientations.
consts/pagesize
Package pagesize contains all default page sizes.
Package pagesize contains all default page sizes.
consts/protection
Package protection contains all protection types.
Package protection contains all protection types.
consts/provider
Package provider contains all document generation providers.
Package provider contains all document generation providers.
core
Package core contains all core interfaces and basic implementations.
Package core contains all core interfaces and basic implementations.
core/entity
Package entity contains all core entities.
Package entity contains all core entities.
merge
Package merge implements PDF merge.
Package merge implements PDF merge.
metrics
Package metrics contains metrics models, constants and formatting.
Package metrics contains metrics models, constants and formatting.
props
Package props contain the public properties of maroto.
Package props contain the public properties of maroto.
repository
Package repository implements font repository.
Package repository implements font repository.
test
Package test implements unit test feature.
Package test implements unit test feature.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL