Skip to content

celsowm/pagyra-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pagyra PHP

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

About

A powerful oop pdf generator and html to pdf converter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages