PHPackages                             jord-jd/uxdm-pdf-destination - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PDF &amp; Document Generation](/categories/documents)
4. /
5. jord-jd/uxdm-pdf-destination

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

jord-jd/uxdm-pdf-destination
============================

PDF destination for the UXDM data migrator

v2.0.0(3mo ago)102LGPL-3.0-onlyPHPPHP ^7.4 || ^8.0

Since Apr 23Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/Jord-JD/uxdm-pdf-destination)[ Packagist](https://packagist.org/packages/jord-jd/uxdm-pdf-destination)[ GitHub Sponsors](https://github.com/DivineOmega)[ RSS](/packages/jord-jd-uxdm-pdf-destination/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (4)Versions (5)Used By (0)

UXDM PDF Destination
====================

[](#uxdm-pdf-destination)

[![Build Status](https://camo.githubusercontent.com/1214d5b9c350b4d75386b3c930a06deab686ded77028705253d339c55157884a/68747470733a2f2f7472617669732d63692e636f6d2f4a6f72642d4a442f7578646d2d7064662d64657374696e6174696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/Jord-JD/uxdm-pdf-destination)[![Coverage Status](https://camo.githubusercontent.com/260cf88d9af213b904c9b19ba9ecfbcb62a308f525f338001f5e03c55814bbef/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f4a6f72642d4a442f7578646d2d7064662d64657374696e6174696f6e2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/Jord-JD/uxdm-pdf-destination?branch=master)

The UXDM PDF destination allows you to migrate data into a PDF table.

Installation
------------

[](#installation)

To install the UXDM PDF destination, just run the following composer command.

```
composer require jord-jd/uxdm-pdf-destination
```

Creating
--------

[](#creating)

To create a new PDF destination, you must provide it with the file path of PDF file you wish to export data to. The first row of the PDF table will contain the field names.

The following example creates a PDF destination object, using a PDF file called `users.pdf` in the same directory.

```
$pdfFile = __DIR__.'/users.pdf';
$pdfDestination = new PDFDestination($pdfFile);
```

Custom Paper Size &amp; Orientation
-----------------------------------

[](#custom-paper-size--orientation)

You can alter the PDF destination to output PDFs with a custom paper size and orientation. To do this, use the `setPaperSize` and `setPaperOrientation` methods of the PDF destination object, as shown below.

```
$destination->setPaperSize('A5');
$destination->setPaperOrientation('landscape');
```

HTML Prefix &amp; Suffix
------------------------

[](#html-prefix--suffix)

Internally, the PDF destination renders a basic HTML table into a PDF. If you wish to style the table, add a heading, or extra content, you can add a HTML prefix or HTML suffix.

An example of how to do this is shown below.

```
$htmlPrefix = 'My Report

                table { width: 100% }
                h1 { text-align: center; }
                th { text-transform: capitalize; text-align: center; }
                th, td { margin: 0; border: 1px solid #000; }
            ';
$htmlSuffix = 'Created by UXDM';

$destination->setHtmlPrefix($htmlPrefix);
$destination->setHtmlSuffix($htmlSuffix);
```

Assigning to migrator
---------------------

[](#assigning-to-migrator)

To use the PDF destination as part of a UXDM migration, you must assign it to the migrator. This process is the same for most destinations.

```
$migrator = new Migrator;
$migrator->setDestination($pdfDestination);
```

Alternatively, you can add multiple destinations, as shown below. You can also specify the fields you wish to send to each destination by passing an array of field names as the second parameter.

```
$migrator = new Migrator;
$migrator->addDestination($pdfDestination, ['field1', 'field2']);
$migrator->addDestination($otherDestination, ['field3', 'field2']);
```

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance82

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 92.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~829 days

Total

4

Last Release

93d ago

Major Versions

v1.1.0 → v2.0.02026-02-14

PHP version history (3 changes)v1.0.0PHP ^7.1

v1.1.0PHP ^7.1||^8.0

v2.0.0PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/c580cdf7c14898fff179cdfc1085892091d5d2f49d917873a12365af9ac77c93?d=identicon)[Jord-JD](/maintainers/Jord-JD)

---

Top Contributors

[![Jord-JD](https://avatars.githubusercontent.com/u/650645?v=4)](https://github.com/Jord-JD "Jord-JD (13 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jord-jd-uxdm-pdf-destination/health.svg)

```
[![Health](https://phpackages.com/badges/jord-jd-uxdm-pdf-destination/health.svg)](https://phpackages.com/packages/jord-jd-uxdm-pdf-destination)
```

###  Alternatives

[barryvdh/laravel-dompdf

A DOMPDF Wrapper for Laravel

7.3k87.6M278](/packages/barryvdh-laravel-dompdf)[consoletvs/invoices

Generate PDF invoices for your customers in laravel

455275.5k](/packages/consoletvs-invoices)[nucleos/dompdf-bundle

This bundle provides a wrapper for using dompdf inside symfony.

54882.8k1](/packages/nucleos-dompdf-bundle)[dino/dompdf-module

A Zend Framework 2 module for incorporating DOMPDF support.

61465.1k8](/packages/dino-dompdf-module)[omaralalwi/gpdf

Custom PDF wrapper supporting Arabic language

15411.6k](/packages/omaralalwi-gpdf)[phpnt/yii2-export

Yii2 It saves data in xls, csv, word, html, pdf files.

158.9k](/packages/phpnt-yii2-export)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
