# Maroto: A Go Library for Creating PDFs with Bootstrap-like Layouts

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/johnfercher-maroto
Generated for open source discovery and AI-assisted research.

Maroto is an open-source Go library designed for creating PDFs in a fast and simple manner. It draws inspiration from Bootstrap, allowing developers to structure PDF content using a familiar grid system. This tool leverages gofpdf to provide an intuitive way to generate professional documents, automatically handling page breaks and headers.

GitHub: https://github.com/johnfercher/maroto
OSRepos URL: https://osrepos.com/repo/johnfercher-maroto

## Summary

Maroto is an open-source Go library designed for creating PDFs in a fast and simple manner. It draws inspiration from Bootstrap, allowing developers to structure PDF content using a familiar grid system. This tool leverages gofpdf to provide an intuitive way to generate professional documents, automatically handling page breaks and headers.

## Topics

- Go
- PDF
- PDF Generation
- Bootstrap
- Golang
- Document Creation
- Grid Layout
- Fast PDF

## Repository Information

Last analyzed by OSRepos: Sat Mar 14 2026 21:12:30 GMT+0000 (Western European Standard Time)
Detail views: 1
GitHub clicks: 0

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Introduction

Maroto, a name derived from a Brazilian expression meaning an astute or clever person, is a powerful Go library for generating PDFs. It simplifies the complex process of PDF creation by adopting a layout approach similar to Bootstrap's grid system. Developers can define rows and columns, populating them with various components, making the process feel much like building a web page. Maroto intelligently manages page breaks, adding new pages as content expands and allowing for persistent headers across all pages. It is built upon the robust `gofpdf` library, ensuring reliable and high-quality PDF output.

## Installation

Getting started with Maroto is straightforward. You can install the latest version using `go get`:

bash
go get github.com/johnfercher/maroto/v2@v2.3.3


## Examples

Maroto provides a clear and intuitive API for building your PDFs. You can define your document structure with rows, columns, and various elements. To explore practical implementations and see Maroto in action, you can run the examples included in the repository:

bash
make examples


For comprehensive guidance and detailed code snippets, refer to the official Maroto v2 documentation.

## Why Use Maroto?

Maroto offers several compelling reasons for developers looking to generate PDFs in Go:

*   **Bootstrap-Inspired Layout**: Its grid system makes designing PDF layouts familiar and efficient for anyone accustomed to web development frameworks like Bootstrap.
*   **Simplicity and Speed**: Designed for fast and simple PDF creation, it abstracts away much of the underlying complexity.
*   **Automatic Page Management**: Maroto handles page breaks automatically, ensuring your content flows seamlessly across multiple pages without manual intervention.
*   **Persistent Headers**: Easily define headers that will appear on every new page, perfect for branding or consistent information.
*   **Active Development**: With a dedicated community and ongoing updates, Maroto continues to evolve and improve.

## Links

*   **GitHub Repository**: [https://github.com/johnfercher/maroto](https://github.com/johnfercher/maroto "Maroto GitHub Repository" target="_blank")
*   **GoDoc**: [https://pkg.go.dev/github.com/johnfercher/maroto/v2](https://pkg.go.dev/github.com/johnfercher/maroto/v2 "Maroto GoDoc" target="_blank")
*   **Maroto V2 Documentation**: [https://maroto.tech/#/README?id=maroto-v2](https://maroto.tech/#/README?id=maroto-v2 "Maroto V2 Documentation" target="_blank")
*   **Maroto V1 Branch**: [https://github.com/johnfercher/maroto/tree/v1](https://github.com/johnfercher/maroto/tree/v1 "Maroto V1 Branch" target="_blank")
*   **Maroto V1 Documentation**: [https://maroto.tech/#/v1/README?id=deprecated](https://maroto.tech/#/v1/README?id=deprecated "Maroto V1 Documentation" target="_blank")