celsowm/pagyra-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

celsowm/pagyra-php

Composer 安装命令:

composer require celsowm/pagyra-php

包简介

A powerful oop PDF generator and HTML to PDF converter in PHP

README 文档

README

A powerful object-oriented library for PDF generation and HTML-to-PDF conversion in pure PHP.

Badges

  • Latest Stable Version
  • Total Downloads
  • License

Overview

Pagyra PHP is a robust and flexible library for creating PDF documents programmatically or directly converting from HTML/CSS. Designed with a fluent, object-oriented API, it provides fine-grained control over layout, styles, images, tables, and more — without relying on extensions like imagick or gd.

📦 Package on Packagist: celsowm/pagyra-php

Features

Programmatic PDF Generation

  • Add text, paragraphs, lists, tables, and images.
  • Precise control of fonts (TTF), colors, spacing, alignment, and line breaks.
  • Create complex layouts with blocks, columns, and positioning (relative, absolute, fixed, sticky).
  • Rounded borders, text shadows, and underlines.
  • Add clickable links.
  • Define headers and footers repeated on every page.

HTML to PDF Conversion

  • Built-in HTML parser.
  • Supports inline and embedded CSS.
  • Renders common tags such as <p>, <div>, <ul>, <ol>, <li>, <table>, <strong>, <em>, <a>, etc.
  • Applies basic CSS styles (color, font-size, text-align, font-weight, text-decoration, margin, etc.).

Advanced Features

  • Linear and radial gradients (preview/development).
  • Automatic page breaks.
  • Block height measurement before rendering.
  • Multiple fonts and variants (bold, italic).

Requirements

  • PHP >= 8.2
  • DOMDocument extension (enabled by default).

Installation

Install via Composer:

composer require celsowm/pagyra-php

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-09-22