Maroto screenshot

Maroto

Author Avatar Theme by Johnfercher
Updated: 14 Feb 2025
2411 Stars

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

Overview:

Maroto is a tool inspired by Bootstrap and powered by Gofpdf that allows users to create PDFs quickly and easily. The concept behind Maroto is akin to designing a website using Bootstrap, with the ability to structure content using rows and columns. Additionally, Maroto can automatically add new pages as needed and supports the inclusion of headers with various elements such as rows, lines, or tables.

Features:

  • Inspired by Bootstrap: Maroto follows the familiar structure of Bootstrap for creating PDFs.
  • Row and Column Structure: Users can organize content using a system of rows and columns.
  • Automatic Page Addition: Pages are dynamically added when content exceeds the available space.
  • Header Support: Define headers to be included on each new page with various components like rows, lines, or tables.

Installation:

To install Maroto, you can use the following command:

go get [maroto_package]

For full documentation on version 2 of Maroto, visit the official documentation page.

Contributing

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

Summary:

Maroto is a versatile tool for creating PDFs that simplifies the process by adopting a Bootstrap-like approach for structuring content. With features such as row and column organization, automatic page addition, and header support, Maroto offers a fast and straightforward solution for generating PDF documents. The tool also provides a range of commands for contributing and installing dependencies, making it easy to get started with creating PDFs using Maroto.