carlos7ags / folio
Modern PDF library for Go: layout engine, HTML to PDF, forms, signatures, barcodes, and PDF/A. Apache 2.0.
View on GitHubAI Architecture Analysis
This repository is indexed by RepoMind. By analyzing carlos7ags/folio in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewFolio A modern PDF library for Go — layout engine, HTML to PDF, forms, digital signatures, barcodes, and PDF/A compliance. **Try it live in your browser** --- Install Requires Go 1.21+. One external dependency: . --- Quick Start --- HTML to PDF The fastest way to generate PDFs — paste any HTML template and get a PDF. No Chrome, no Puppeteer, no server required. Supports 40+ HTML elements, inline and block CSS, flexbox, CSS grid, SVG, named/hex/rgb colors, rules, and tables with colspan. **Try HTML to PDF live in your browser** --- Layout Engine Folio uses a plan-based layout engine — layout is a pure function with no mutation during rendering. Elements can be laid out multiple times safely, which makes page break splitting clean and predictable. Layout Elements | Element | Description | |---|---| | | Word-wrapped text with alignment, leading, orphans/widows | | | H1-H6 with preset sizes, spacing, and auto-bookmarks | | | Borders, colspan, rowspan, header repetition, auto-column widths | | | Bullet, numbered, Roman, alpha, nested | | | Container with borders, background, padding | | | Flexbox layout with direction, wrap, alignment | | | JPEG, PNG, TIFF with aspect ratio preservation | | | Horizontal rule (solid, dashed, dotted) | | | Tab stops with dot leaders (for TOCs) | | | Clickable text with URL or internal destination | | | Left/right floating with text wrap | | | Multi-column layout with automatic balancing | | | Explicit page break | | | Code128, QR, EAN-13 inline in layout | --- Styled Text --- Tables --- Barcodes --- Interactive Forms --- Digital Signatures Supports PAdES B-B, B-T (timestamped), and B-LT (long-term validation with embedded OCSP responses and CRLs). Also supports external signers (HSM, KMS) via the interface. Uses Go stdlib crypto. --- Reading and Merging PDFs --- Headers, Footers, Watermarks --- Standards and Compliance --- Colors --- CLI --- Architecture • **No mutation** during layout — elements can be laid out multiple times safely • **Content splitting** across pages via overflow elements • **Intrinsic sizing** via MinWidth/MaxWidth for auto-column tables • **Deterministic output** — byte-for-byte reproducible PDFs • **One external dependency** — --- Package Structure --- Roadmap • [ ] Template library — invoice, report, certificate, resume • [ ] Hosted cloud API — POST HTML, get PDF • [ ] Java SDK via Panama FFI • [ ] .NET SDK via P/Invoke --- Contributing Contributions welcome. Please open an issue before submitting large PRs. --- License Apache License 2.0 — see LICENSE.