awesome-repositories.com
博客
MCP
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目关于排名机制媒体报道MCP 服务器
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
eKoopmans avatar

eKoopmans/html2pdf.js

0
View on GitHub↗
4,880 星标·1,468 分支·JavaScript·MIT·5 次浏览

Html2pdf.js

html2pdf.js 是一个客户端 JavaScript 库,用于将 HTML 元素和网页转换为可下载的 PDF 文档。它完全在浏览器中运行,无需后端服务器即可生成文件。

该库采用转换流水线,在生成最终 PDF 布局之前将 HTML 渲染为 canvas。此过程包括通过在锚点标签上覆盖可点击区域来保留活动超链接,并通过特定的样式规则或选择器管理分页。

用户可以通过页面边距、文件名和图像质量等设置来配置文档外观。转换过程通过基于 Promise 的工作流进行管理,允许执行顺序处理步骤并插入自定义函数以修改数据流。

Features

  • Client-Side PDF Generators - Provides the core capability to generate PDF documents entirely within the browser from HTML or canvas content.
  • Web-to-PDF Converters - Renders web pages and HTML content into static PDF documents using a browser-based approach.
  • HTML to PDF Converters - Transforms web-based HTML and CSS layouts into portable PDF files directly in the browser.
  • Web Content Export Tools - Converts specific HTML elements or full webpages into portable PDF files for users to download.
  • Client-Side Conversion Engines - Executes the entire HTML-to-PDF conversion pipeline in the browser using JavaScript without server round-trips.
  • HTML-to-PDF Canvas Renderers - Implements a conversion pipeline that renders HTML to canvas before generating the final PDF layout.
  • Canvas Rasterizers - Converts HTML elements into pixel-based canvas images as an intermediate step before PDF generation.
  • DOM-to-Canvas Renderers - Translates the current DOM tree and styles into a canvas-based pixel representation for consistent rendering.
  • PDF Hyperlink Overlays - Preserves active hyperlinks by calculating anchor coordinates and overlaying clickable regions on the final PDF.
  • Page Break Management - Allows the injection of manual page breaks using CSS style rules to prevent content splitting across pages.
  • Visual Layout Controls - Allows adjusting page margins and image quality to define the visual appearance of generated documents.

Star 历史

ekoopmans/html2pdf.js 的 Star 历史图表ekoopmans/html2pdf.js 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

Html2pdf.js 的开源替代方案

相似的开源项目,按与 Html2pdf.js 的功能重合度排序。
  • alvarcarto/url-to-pdf-apialvarcarto 的头像

    alvarcarto/url-to-pdf-api

    7,114在 GitHub 上查看↗

    This project is a browser rendering service and headless Chrome PDF generator built on Puppeteer. It functions as a backend tool for converting web pages and raw HTML content into PDF documents and screenshots. The service distinguishes itself through browser session control, allowing for the injection of session cookies and the configuration of navigation timeouts to handle authenticated pages. It also includes viewport-based layout scaling to adjust browser dimensions and device scale factors during the rendering process. The broader capability surface covers HTML content export and automa

    HTMLchromeheadlessheadless-chrome
    在 GitHub 上查看↗7,114
  • bubkoo/html-to-imagebubkoo 的头像

    bubkoo/html-to-image

    7,033在 GitHub 上查看↗

    html-to-image is a JavaScript library and client-side screenshot utility that transforms DOM elements into image formats such as PNG, JPEG, or SVG. It functions as a DOM-to-canvas renderer, using the browser's native rendering capabilities to convert document nodes into rasterized images or canvas elements. The library leverages SVG foreignObject serialization to capture live DOM content, which is then rasterized into pixel-based formats. It includes specialized exporters for generating binary Blobs or raw RGBA pixel data as typed arrays. The tool provides configurations for image appearance

    TypeScriptcanvasdataurldom
    在 GitHub 上查看↗7,033
  • tsayen/dom-to-imagetsayen 的头像

    tsayen/dom-to-image

    10,777在 GitHub 上查看↗

    dom-to-image is a programmatic tool for capturing the visual state of HTML elements as downloadable images or raw image data. It functions as a DOM to image converter that renders specific nodes as base64 data URLs, binary blobs, or pixel arrays. The library transforms HTML elements into raster or vector images by utilizing the HTML5 canvas API. It can retrieve raw byte arrays of a DOM node for low-level image manipulation as an RGBA pixel data extractor. The project covers web content rasterization and the generation of dynamic screenshots from live HTML content. It handles the conversion o

    JavaScriptcanvascssdom
    在 GitHub 上查看↗10,777
  • mpdf/mpdfmpdf 的头像

    mpdf/mpdf

    4,693在 GitHub 上查看↗

    mPDF is a PHP library that transforms UTF-8 encoded HTML and CSS into formatted PDF documents. It serves as a PDF generation engine and document architect capable of converting web pages and HTML forms into professional files. The project is distinguished by its multilingual rendering capabilities, providing comprehensive support for bidirectional text, right-to-left scripts, and CJK languages using Unicode font embedding and OpenType layout processing. It further enables professional print-ready design through advanced color modeling in CMYK, precise page dimensioning, and compliance with PD

    PHPcjkcsshtml
    在 GitHub 上查看↗4,693
查看 Html2pdf.js 的所有 30 个替代方案→

常见问题解答

ekoopmans/html2pdf.js 是做什么的?

html2pdf.js 是一个客户端 JavaScript 库,用于将 HTML 元素和网页转换为可下载的 PDF 文档。它完全在浏览器中运行,无需后端服务器即可生成文件。

ekoopmans/html2pdf.js 的主要功能有哪些?

ekoopmans/html2pdf.js 的主要功能包括:Client-Side PDF Generators, Web-to-PDF Converters, HTML to PDF Converters, Web Content Export Tools, Client-Side Conversion Engines, HTML-to-PDF Canvas Renderers, Canvas Rasterizers, DOM-to-Canvas Renderers。

ekoopmans/html2pdf.js 有哪些开源替代品?

ekoopmans/html2pdf.js 的开源替代品包括: alvarcarto/url-to-pdf-api — This project is a browser rendering service and headless Chrome PDF generator built on Puppeteer. It functions as a… bubkoo/html-to-image — html-to-image is a JavaScript library and client-side screenshot utility that transforms DOM elements into image… tsayen/dom-to-image — dom-to-image is a programmatic tool for capturing the visual state of HTML elements as downloadable images or raw… mpdf/mpdf — mPDF is a PHP library that transforms UTF-8 encoded HTML and CSS into formatted PDF documents. It serves as a PDF… bafs/gutenberg — Gutenberg is a CSS print formatting framework and web-to-PDF layout engine. It provides a system for managing… niklasvh/html2canvas — This project is a browser-based rendering engine that captures visual snapshots of web page elements. It functions as…