{"name":"Maroto: A Go Library for Creating PDFs with Bootstrap-like Layouts","description":"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","url":"https://osrepos.com/repo/johnfercher-maroto","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/johnfercher-maroto","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/johnfercher-maroto.md","json":"https://osrepos.com/repo/johnfercher-maroto.json","topics":["Go","PDF","PDF Generation","Bootstrap","Golang","Document Creation","Grid Layout","Fast PDF"],"keywords":["Go","PDF","PDF Generation","Bootstrap","Golang","Document Creation","Grid Layout","Fast PDF"],"stars":null,"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.","content":"## Introduction\n\nMaroto, 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.\n\n## Installation\n\nGetting started with Maroto is straightforward. You can install the latest version using `go get`:\n\nbash\ngo get github.com/johnfercher/maroto/v2@v2.3.3\n\n\n## Examples\n\nMaroto 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:\n\nbash\nmake examples\n\n\nFor comprehensive guidance and detailed code snippets, refer to the official Maroto v2 documentation.\n\n## Why Use Maroto?\n\nMaroto offers several compelling reasons for developers looking to generate PDFs in Go:\n\n*   **Bootstrap-Inspired Layout**: Its grid system makes designing PDF layouts familiar and efficient for anyone accustomed to web development frameworks like Bootstrap.\n*   **Simplicity and Speed**: Designed for fast and simple PDF creation, it abstracts away much of the underlying complexity.\n*   **Automatic Page Management**: Maroto handles page breaks automatically, ensuring your content flows seamlessly across multiple pages without manual intervention.\n*   **Persistent Headers**: Easily define headers that will appear on every new page, perfect for branding or consistent information.\n*   **Active Development**: With a dedicated community and ongoing updates, Maroto continues to evolve and improve.\n\n## Links\n\n*   **GitHub Repository**: [https://github.com/johnfercher/maroto](https://github.com/johnfercher/maroto \"Maroto GitHub Repository\" target=\"_blank\")\n*   **GoDoc**: [https://pkg.go.dev/github.com/johnfercher/maroto/v2](https://pkg.go.dev/github.com/johnfercher/maroto/v2 \"Maroto GoDoc\" target=\"_blank\")\n*   **Maroto V2 Documentation**: [https://maroto.tech/#/README?id=maroto-v2](https://maroto.tech/#/README?id=maroto-v2 \"Maroto V2 Documentation\" target=\"_blank\")\n*   **Maroto V1 Branch**: [https://github.com/johnfercher/maroto/tree/v1](https://github.com/johnfercher/maroto/tree/v1 \"Maroto V1 Branch\" target=\"_blank\")\n*   **Maroto V1 Documentation**: [https://maroto.tech/#/v1/README?id=deprecated](https://maroto.tech/#/v1/README?id=deprecated \"Maroto V1 Documentation\" target=\"_blank\")","metrics":{"detailViews":1,"githubClicks":0},"dates":{"published":null,"modified":"2026-03-14T21:12:30.000Z"}}