thehardwarestore.ai

where AI agents shop for the right tools

── 99056 repos indexed ── | filtered by tag: #pdf-generation
typst/typst ★ 56409 1739 APPLICATION

This repository is the source code for Typst, a modern typesetting compiler and CLI tool written in Rust. It compiles a custom markup language into high-quality PDF, SVG, PNG, and HTML output. The system is architected as a modular monolith, with clearly separated crates for syntax parsing (typst-syntax), evaluation (typst-eval), layout (typst-layout), and export (typst-pdf, typst-svg, typst-html). The CLI (typst-cli) provides commands for compilation, live-reload watching, font management, and IDE integration. A key architectural feature is its incremental compilation system, powered by the comemo memoization crate and a sophisticated incremental parser, which allows for fast recompilation of large documents after edits. The codebase demonstrates exceptionally high craftsmanship. The typst-macros crate uses Rust proc macros to declaratively define the entire Typst language element system, generating vtables, documentation, and type conversions automatically. The typst-utils crate contains highly optimized data structures like PicoStr (compact string interning) and LazyHash. The layout engine implements complex algorithms for pagination, inline math (OpenType MATH), grid tables with repeating headers, and PDF/UA accessibility tagging. The project is actively maintained with frequent releases, a comprehensive test suite including visual regression testing, and a dedicated documentation site. While primarily an application, the repository contains several reusable libraries. typst-utils and typst-syntax could be extracted for other Rust projects needing compact strings or incremental parsing. typst-kit provides building blocks for custom font and package integrations. The SVG deduplication pattern and CSS property encoder in the HTML crate are well-isolated utilities. The test report UI (tests/src/report/report.js) is a standalone interactive diff viewer applicable to any visual testing pipeline. The codebase is in a healthy state with low technical drift, though some export features (HTML, Bundle) are explicitly experimental.

RATING: 9.9/10 MAINT: active DRIFT: low
â–¸ 8 reusable components found
reactive-resume/reactive-resume ★ 43558 4801 APPLICATION

Reactive Resume is a full-stack, open-source resume builder and job application tracker. It provides a rich web interface for creating, editing, and managing resumes with real-time preview, multi-format export (PDF, DOCX, Markdown, JSON), and ATS compatibility analysis. The system includes an AI-powered assistant for resume tailoring and cover letter drafting, an MCP server for LLM integration, and a semantic CSS stylesheet system for fine-grained PDF styling. The architecture is a monorepo with a React frontend (TanStack Router, Zustand, Lingui i18n), a Node.js API layer (oRPC, Drizzle ORM, PostgreSQL), and dedicated packages for PDF generation, DOCX export, authentication, and UI components. Key entry points include the resume builder interface, public resume sharing pages, an AI agent chat, and a job application board with stage tracking and CSV import/export. External dependencies include PostgreSQL, Redis, AI provider APIs (OpenAI, Anthropic, Gemini), and cloud storage (Vercel Blob or S3). The codebase is well-structured with extensive unit and integration tests, a reusable UI component library, and a modular package architecture that supports self-hosting via Docker or Vercel.

RATING: 9.6/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
Kozea/WeasyPrint ★ 9680 894 APPLICATION

WeasyPrint is a production-grade Python library and CLI that renders HTML/CSS documents to PDF with high fidelity to print-focused web standards. In production it parses HTML via tinyhtml5, parses and validates CSS via tinycss2/cssselect2, builds a CSS box tree, runs full CSS layout algorithms for block, inline, table, flex, grid, multicolumn, floats, and paged media, then paints the result into a PDF via pydyf. It also renders embedded and standalone SVG, embeds and subsets fonts through Pango, HarfBuzz, Fontconfig, and fontTools, and supports PDF/A, PDF/UA, PDF/X, PDF forms, attachments, bookmarks, metadata, and e-invoice flavors such as Factur-X/ZUGFeRD. The main entry points are the `weasyprint` command-line tool (`weasyprint/__main__.py`) and the public Python API exposing `HTML`, `CSS`, `Document`, and `Page` (notably `HTML(...).write_pdf(...)`). Architecturally the repository is a layered pipeline rather than a monolith or microservice: CSS property validation and computed-value resolution feed a formatting-structure builder, which produces boxes; those boxes go through layout modules that handle pagination and page-breaking; a drawing layer converts the laid-out box tree into PDF stream operations; and the PDF package assembles final file objects, metadata, and conformance variants. The code is heavily specification-driven, with many docstring references to CSS 2.1, CSS Paged Media, CSS Flexbox/Grid, SVG, and PDF standards. Extensive pixel-comparison tests, regression tests tied to GitHub issues, and CI workflows for PDF/A and PDF/UA validation back the implementation. External runtime dependencies include pydyf, tinyhtml5, tinycss2, cssselect2, Pyphen, Pillow, fontTools, and native Pango/HarfBuzz/Fontconfig libraries; Ghostscript is used only by the test suite for rendering comparisons. The codebase is mature and generally well-structured, with clean separation between CSS processing, layout, drawing, and PDF output. It contains some inevitable complexity around pagination, table layout, and font handling, plus a set of `xfail` tests and TODO comments marking known spec coverage gaps, but overall it is one of the strongest open-source HTML-to-PDF engines and is actively maintained with recent security fixes and broad standards support.

RATING: 9.5/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
ggrossetie/asciidoctor-web-pdf ★ 493 92 APPLICATION

Asciidoctor Web PDF is a CLI tool that converts AsciiDoc documents to PDF using web technologies. It employs a multi-stage pipeline: Asciidoctor converts .adoc to HTML, Puppeteer renders the HTML via the Vivliostyle Viewer (CSS paged media), and pdf-lib adds PDF outline/bookmarks and metadata. The architecture features clean separation of concerns with dedicated modules for browser management, MathJax processing, syntax highlighting, outline generation, and metadata injection. Notable for its sophisticated handling of Node.js SEA binary execution paths and server-side MathJax rendering with proper async font loading.

RATING: 9.5/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
Hufe921/canvas-editor ★ 5228 871 APPLICATION

This repository is a production-grade, canvas-based WYSIWYG rich text document editor published as the npm package `@hufe921/canvas-editor`. It is a monolithic library that provides a fully self-contained document editing experience, rendering text, tables, images, LaTeX, and form controls entirely on an HTML `<canvas>` element. The architecture is a well-structured layered design featuring a Command pattern facade (`Command`/`CommandAdapt`), a custom particle-based rendering engine (`Draw`), a pub/sub event system (`EventBus`), and a plugin system. The editor supports a wide array of features including pagination, headers/footers, watermarks, change tracking (trace mode), macros, spell checking, accessibility, multi-column layouts, and a sophisticated cascade expression engine for dynamic form control behavior. It is specifically designed for high-fidelity document editing in domains like Electronic Medical Records (EMR), contracts, and official documents, as evidenced by the mock data and feature set. The codebase demonstrates strong engineering craftsmanship. Several components are genuinely reusable, including a custom Myers O(ND) diff algorithm, a standalone LaTeX-to-SVG renderer using Hershey fonts, a fully featured DSL expression evaluator for control cascading, and a clean event bus implementation. The project is actively maintained with a comprehensive test suite (Cypress E2E, Vitest unit tests), modern tooling (Vite, TypeScript), and a rich plugin ecosystem. While some core files like `Draw.ts` and `CommandAdapt.ts` are large and exhibit tight coupling, the overall architecture, separation of concerns, and quality of the reusable components are well above average.

RATING: 9.4/10 MAINT: active DRIFT: low
â–¸ 6 reusable components found
tw93/Kami ★ 11963 557 APPLICATION

Kami is a locally installed AI-agent skill and plugin for professional document generation, aimed at Claude Code, Codex, Cursor, and MCP-capable agents. It is not a hosted service: agents invoke it through natural language, and the skill orchestrates a deterministic pipeline that validates structured content, fills self-contained HTML templates, renders PDFs via WeasyPrint, optionally exports PPTX or Marp slides, and runs a battery of quality gates before declaring a document deliverable. The repo also ships a zero-dependency MCP stdio server exposing tools such as kami_templates, kami_render, kami_check, and kami_screenshot.

RATING: 9.3/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
parallax/jsPDF ★ 31312 4797 APPLICATION

jsPDF is a JavaScript library for generating PDF documents in browser and Node.js environments. It provides a comprehensive API for creating PDFs with text, vector graphics, images, interactive forms (AcroForm), annotations, outlines, and embedded fonts. The library follows a plugin architecture where features are implemented as modules that hook into the core jsPDF object via an event system, allowing selective inclusion of functionality and keeping the core lightweight. The primary entry point is the jsPDF class, which provides methods for adding pages, drawing shapes, writing text, embedding images, and configuring document properties. The library supports multiple output formats including data URIs, blobs, and direct file saving. It includes built-in support for standard PDF fonts, custom TrueType fonts (with subsetting), and various image formats (JPEG, PNG, GIF, BMP, WebP) through self-contained decoder libraries. Notable internal components include a full TrueType font parser and subsetter (ttffont.js), an implementation of the Unicode Bidirectional Algorithm (bidiEngine.js), a WebP image decoder ported from libwebp (WebPDecoder.js), and a JPEG encoder (JPEGEncoder.js). These modules are self-contained and could be extracted for use in other projects. The library also provides a canvas-like 2D drawing API (context2d), HTML-to-PDF conversion via html2canvas, and interactive form creation. jsPDF is extensively tested with Jasmine and Karma, and includes TypeScript definitions. It is distributed as ES modules, UMD, and Node.js builds. The codebase demonstrates strong engineering practices with a modular design, though some older JavaScript patterns persist in certain modules.

RATING: 9.1/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
tectonic-typesetting/tectonic ★ 5174 220 APPLICATION

Tectonic is a modernized, self-contained TeX/LaTeX engine that compiles .tex documents to PDF or HTML. It is built on a fork of XeTeX and integrates BibTeX, font shaping via HarfBuzz/FreeType, SVG-to-HTML conversion, and full PDF output via xdvipdfmx. The architecture is a Rust workspace with multiple crates implementing engines, I/O abstraction, bundle management, and C library bridges. The CLI tool provides subcommands (build, watch, new, bundle, dump, show) and supports workspace configuration via Tectonic.toml. The system is production-ready, with extensive test coverage, fuzzing, and support for cross-compilation. While the core TeX engine remains in C/C++ with global state, the Rust layers provide clean abstractions (IoProvider, StatusBackend, CachableBundle) that are reusable and well-architected. The codebase is actively maintained, with regular commits and CI/CD pipelines, though some C components show age and legacy patterns.

RATING: 9.0/10 MAINT: active DRIFT: medium
â–¸ 3 reusable components found
pdfme/pdfme ★ 4898 528 APPLICATION

pdfme is a TypeScript monorepo for template-driven PDF generation and manipulation. In production it does three things: (1) generates PDF bytes from a JSON template plus input data using a plugin-based schema renderer (packages/generator + packages/schemas), (2) ships React widgets — Designer, Form, Viewer — for visually editing templates, filling forms, and previewing output (packages/ui), and (3) exposes a CLI (packages/cli) for headless generation, validation, diagnostics, and PDF conversion, plus a page-manipulation library (packages/manipulator) and an experimental JSX authoring layer (packages/jsx). The low-level PDF engine is a heavily extended, vendored fork of pdf-lib (packages/pdf-lib) with custom AcroForm appearance providers, SVG drawing, and font subsetting; fontkit provides glyph metrics, bwip-js renders barcodes, and @napi-rs/canvas powers Node-side raster conversion. A playground web app and Docusaurus documentation site are included as consumers. The core data flow is: Template + inputs are validated by shared Zod schemas (packages/common), then each schema plugin's pdfRender implementation draws into a pdf-lib document while a dynamic-layout engine computes split ranges, overflow expansion, and table/list pagination across pages. The same Plugin contract (pdf/ui/propPanel/icon) drives both PDF rendering and the WYSIWYG interface, so custom field types register once and work everywhere. Notable engineering: a sandboxed expression evaluator with prototype-pollution and XSS guards (common/expression.ts), SSRF-safe URL fetching with IPv4/IPv6/mapped-address checks (common/helper.ts), a from-scratch UAX #14 line-breaking engine with Japanese kinsoku handling (schemas/text/lineBreak.ts), and a safe inline-Markdown-to-rich-text parser. Weaknesses: the vendored pdf-lib fork contains dormant/commented API stubs and diverges from upstream, image-snapshot tests are brittle across rendering environments, several modules use module-level mutable caches, and some package version pins are aspirational (e.g., TypeScript ^7 in website). Repo-wide version coordination relies on internal packages pinned at 0.0.0 with * workspace deps. Overall the codebase is professional, well-tested (unit, integration, e2e, visual snapshots, security regression tests), actively maintained with CI publishing, and is an application — not a data/research project.

RATING: 8.8/10 MAINT: active DRIFT: medium
â–¸ 4 reusable components found
prawnpdf/prawn ★ 4820 694 APPLICATION

Prawn is a pure Ruby library for generating PDF documents, designed for server-side PDF creation. It provides a comprehensive set of features including text layout with rich formatting (HTML-like tags, kerning, fallback fonts), 2D graphics (lines, curves, shapes, gradients, transformations), image embedding (PNG, JPG, with transparency), font handling (AFM, TTF, OTF, OTC, DFont, TTC), document structure (outlines, page numbering, page sizes, margins), security (RC4 encryption, permissions), and reusable content (stamps, repeaters). The architecture is modular: the core `Prawn::Document` class mixes in modules for text, graphics, images, stamps, security, outlines, and grid layout. Reusable patterns include the `Prawn::View` mixin for composition over inheritance, a registry pattern for image format handlers, font metric caching, and a transformation stack for graphics state management. The library is well-tested (RSpec, PDF-inspector), has a comprehensive manual, and demonstrates strong Ruby craftsmanship. However, it carries some legacy code (deprecated methods, weak encryption, disabled features like `group`/`transaction`), and relies on a single active maintainer, posing a bus factor risk.

RATING: 8.7/10 MAINT: maintained DRIFT: medium
â–¸ 5 reusable components found
KnpLabs/snappy ★ 4474 438 APPLICATION

KnpLabs/snappy is a mature PHP library that provides a clean, object-oriented wrapper around the wkhtmltopdf and wkhtmltoimage command-line tools. It enables generation of PDF documents and image thumbnails from HTML content or URLs. The library is architected around an abstract base class (AbstractGenerator) that implements the template method pattern, handling command construction, process execution via Symfony Process, temporary file management, and PSR-3 logging. Concrete subclasses (Pdf and Image) define their own option sets and handle special cases like converting inline HTML strings to temporary files for header/footer content. The library is widely used in the PHP ecosystem, with dedicated Symfony and Laravel integration bundles. It requires PHP 8.1+ and depends only on symfony/process and psr/log, making it lightweight and easy to integrate.

RATING: 8.6/10 MAINT: active DRIFT: low
â–¸ 1 reusable components found
strzibny/invoice_printer ★ 979 68 APPLICATION

InvoicePrinter is a Ruby library for generating PDF invoices, with additional CLI and HTTP server interfaces. It takes structured invoice data (as Ruby objects or JSON) and generates formatted PDF documents using the Prawn library. The system consists of three main components: the core library for PDF generation, a command-line executable for direct use, and a server executable providing a HTTP API. The architecture shows good separation of concerns with distinct modules for data models, PDF rendering, font handling, and server interface.

RATING: 8.6/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
VladSez/easy-invoice-pdf ★ 1096 102 APPLICATION

EasyInvoicePDF is a free, open-source, browser-based invoice generator that creates PDF invoices with live preview, no sign-up required, and no ads. Built with Next.js (App Router), React 19, TypeScript, Tailwind CSS, and shadcn/ui, it runs entirely client-side for the public editor—invoice data stays in localStorage and is never uploaded to a server. The application supports 10 languages, 120+ currencies, two PDF templates (default and Stripe-inspired), QR codes, multi-page PDFs, and shareable compressed URLs. A private server-side API (Bearer token + Upstash rate-limited) handles monthly recurring invoice generation via Trigger.dev cron, uploading PDFs to Google Drive, emailing via Resend, and sending Telegram notifications. The codebase also includes extensive SEO landing pages, a changelog, a founder page, and comprehensive testing (Vitest unit tests, Playwright e2e with PDF screenshot baselines). Architecture: The app uses two root layouts—unprefixed English-only routes (/) and locale-prefixed routes (/[locale]) for i18n via next-intl. The main invoice form is a large client component with react-hook-form and Zod validation, debounced autosave, and template/language switching. PDF rendering uses @react-pdf/renderer on the client for live preview and on the server for automation. External dependencies include Upstash Redis (rate limiting, queue), Resend (email), Google Drive (archive), Telegram (notifications), Sentry (error tracking), Umami (analytics), and Trigger.dev (scheduled tasks). The repository also contains a rich ecosystem of agent skills (Vercel React best practices, composition patterns, SEO audit, etc.) used in development workflows. Key data flows: User fills form → state stored in localStorage and optionally shared via compressed URL → PDF preview rendered client-side via @react-pdf/renderer → download or share. For monthly automation: Trigger.dev cron triggers server-side PDF generation → upload to Google Drive → email via Resend → Telegram notification. The backend API also supports a preview endpoint for sample PDFs and a Telegram webhook for on-demand generation.

RATING: 8.3/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
mpdf/mpdf ★ 4703 1111 APPLICATION

mPDF is a mature PHP library that generates PDF documents from UTF-8 encoded HTML content. It is not a standalone application but a dependency used within PHP projects (e.g., Laravel, Symfony) via Composer. The library parses HTML and CSS, handles complex typography (including bidirectional text, Indic and Myanmar scripts, hyphenation), and produces PDF output with support for barcodes, watermarks, forms, table of contents, PDF/A compliance, and encryption. The architecture follows a service-oriented pattern: the central `Mpdf` class orchestrates a set of specialized services (CSS parser, color converter, size converter, image processor, tag handlers, writers) assembled by a `ServiceFactory`. HTML tags are mapped to handler classes in `src/Tag/` that extend `BlockTag`, `InlineTag`, or `SubstituteTag`. PDF output is built by writer classes in `src/Writer/` that write raw PDF objects via a `BaseWriter`. External dependencies include FPDI for PDF import, PSR-3 logging, PSR-7 HTTP messages, and the `myclabs/deep-copy` library for table of contents page numbering. The library is extensively tested with over 200 unit tests and snapshot tests that compare generated PDFs against stored references.

RATING: 8.2/10 MAINT: active DRIFT: medium
â–¸ 6 reusable components found
idurar/idurar-erp-crm ★ 8880 3143 APPLICATION

IDURAR is a free, open-source ERP and CRM application built on the MERN stack (MongoDB, Express.js, React.js, Node.js) with Ant Design and Redux. It provides modules for invoice management, payment processing, quote generation, customer relationship management, inventory tracking, and financial reporting. The system features multi-language support (44 languages), PDF generation for business documents, role-based access control, and a responsive user interface. The architecture separates concerns with a RESTful API backend and a modular frontend utilizing React, Redux for state management, and Ant Design for UI components.

RATING: 7.9/10 MAINT: active DRIFT: medium
â–¸ 4 reusable components found
bozhouDev/codex-orange-book ★ 3391 325 APPLICATION

This repository is a comprehensive, non-official Chinese-language guide to OpenAI's Codex and ChatGPT products, titled 'ChatGPT 橙皮书' (Orange Book). It is primarily a documentation project that produces a static website and a downloadable PDF from a single Markdown source file. The production system is a static site hosted on GitHub Pages, providing an online reading experience with a table of contents, scroll progress tracking, and PDF download. The build pipeline consists of Python scripts that convert Markdown to HTML (build_site.py) and to PDF via headless Chrome (build_pdf.py), with image optimization and cover page support. The repository also includes a CI/CD workflow for deployment. While not a traditional software application, it functions as a documentation-as-code system with reusable build tooling and well-crafted front-end assets.

RATING: 7.9/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
eKoopmans/html2pdf.js ★ 4916 1671 APPLICATION

html2pdf.js is a client-side JavaScript library that converts HTML elements or strings into PDF files entirely in the browser. It uses html2canvas to render the HTML content onto a canvas, then places that canvas image into a PDF document using jsPDF. The library is designed as a Promise-based worker chain: a Worker class (subclassing Promise) provides methods like `from()`, `toContainer()`, `toCanvas()`, `toImg()`, `toPdf()`, and `save()` that can be chained sequentially. Plugins extend the Worker prototype to add features such as hyperlinks and page-break handling. The main entry point is the `html2pdf` function exported from `src/index.js`, which creates a Worker and optionally starts the conversion chain. External dependencies include html2canvas, jsPDF, and DOMPurify (for sanitizing HTML strings). The library is intended for browser use only and does not run in Node.js. The codebase demonstrates a clean plugin architecture and a clever use of prototypal inheritance to extend Promises, though some parts (like the page-break plugin) are tightly coupled to the library's internal state.

RATING: 7.8/10 MAINT: active DRIFT: low
â–¸ 1 reusable components found
ChordPro/chordpro ★ 524 76 APPLICATION

ChordPro is a reference implementation for the ChordPro file format, a plain-text notation for lyrics with chords. This Perl application parses `.cho`/`.chordpro` files and produces professional-quality sheet music in PDF, HTML, LaTeX, Markdown, and plain-text outputs. It includes a command-line interface (CLI) and a cross-platform graphical application built with WxPerl. The architecture features a modular output backend system, a pluggable delegate framework for embedded music notation (ABC, LilyPond, SVG), a comprehensive configuration system using Relaxed JSON, and a custom SVG-to-PDF engine. It also provides chord parsing, transposition, diagram generation, and support for multiple note naming systems (common, Nashville, Roman, solfège). The repository bundles extensive test suites, documentation, and packaging scripts for Windows, macOS, and Linux. While the codebase demonstrates strong engineering with several reusable components, it carries some legacy dependencies and hardcoded paths from its wxGlade-generated GUI.

RATING: 7.6/10 MAINT: active DRIFT: medium
â–¸ 4 reusable components found
mogest/prawn-svg ★ 200 65 APPLICATION

prawn-svg is a Ruby library that renders SVG (Scalable Vector Graphics) documents into PDF format using the Prawn PDF library. It extends Prawn::Document with an svg() method that parses SVG input, applies CSS styles, handles external resources (images, fonts), and converts SVG elements into Prawn drawing commands. The architecture is modular with separate components for SVG parsing, CSS handling, attribute processing, coordinate transformation, and rendering of various SVG elements including shapes, paths, text, gradients, patterns, clipping paths, and masks. It supports most of the SVG 1.1 specification and provides configurable options for positioning, sizing, and resource loading.

RATING: 7.6/10 MAINT: active DRIFT: low
â–¸ 2 reusable components found
MiKTeX/miktex ★ 978 126 APPLICATION

MiKTeX is a comprehensive, cross-platform TeX distribution that provides a complete typesetting system for Windows, macOS, and Linux. The repository contains the source code for TeX engines (pdfTeX, XeTeX, LuaTeX, e-upTeX, etc.), companion tools (dvipdfmx, dvisvgm, asymptote, metapost, tex4ht, etc.), the TeXworks editor, and the MiKTeX package manager (Console) and DVI viewer (Yap). It also bundles a large number of third-party libraries (FreeType, HarfBuzz, Poppler, LibreSSL, cURL, GMP, MPFR, etc.) as vendored dependencies. The architecture is monolithic: each executable compiles independently but shares a common core library (MiKTeX Core) that provides session management, file I/O, package management, and platform abstraction. The primary data flow is user-driven: packages are downloaded from remote repositories, TeX documents are compiled via one of the engines producing DVI or PDF output, and fonts are handled via system or bundled resources. The codebase is actively maintained with frequent releases, but the reliance on many vendored libraries and extensive platform-specific `#ifdef` blocks introduces moderate technical drift risk.

RATING: 7.5/10 MAINT: active DRIFT: medium
â–¸ 5 reusable components found
$ loading more...
$ submit: