PHPackages                             net-tools/pdf - 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. net-tools/pdf

ActiveLibrary

net-tools/pdf
=============

Composer library for handling PDF files through TCPDF lib

1.0.7(2y ago)059MITPHPPHP &gt;= 7.0.0

Since Dec 1Pushed 2y ago1 watchersCompare

[ Source](https://github.com/net-tools/pdf)[ Packagist](https://packagist.org/packages/net-tools/pdf)[ RSS](/packages/net-tools-pdf/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (9)Used By (0)

net-tools/pdf
=============

[](#net-toolspdf)

Composer library for creating PDF files through TCPDF lib
---------------------------------------------------------

[](#composer-library-for-creating-pdf-files-through-tcpdf-lib)

### Setup instructions

[](#setup-instructions)

To install net-tools/pdf package, just require it through composer : `require net-tools/pdf:^1.0.0`

### How to use ?

[](#how-to-use-)

The package has an only helper class, `PdfHelper` ; you have to create an object of that class before using it.

The class constructor requires the following parameters :

parametermandatory/default valuedescriptionconfigfilemandatorythe path to an external config file for TCPDF library (which is a composer dependancy)orientationmandatoryprovide either L or P (landscape or portrait)authormandatoryauthor of the document (will appear in the PDF document properties)titlemandatorytitle of the document (will appear in the PDF document properties)subjectempty stringsubject of the document (will appear in the PDF document properties)fontsize10base font size to usefontnamehelveticadefault font to useBy default, PDF files created don't have any header/footer, but the header may be specified with `setHeader` method.

To create the document, just use HTML tags and simple CSS formatting (with `addHTMLPage`), and get the PDF file by calling `output` method.

### Sample

[](#sample)

```
$pdfh = new \Nettools\Pdf\PdfHelper($cfgfile, 'P', 'Me', 'Dummy title');
$pdfh->addHTMLPage("This is a simple PDF filewith two lines. First is bold, the second is in normal print.");
$pdfh->output($path_to_file_to_be_created);
```

You can also create a blank page, and then output several strings to it :

```
$pdfh->addPage();
$pdfh->writeHTML("first line");
$pdfh->writeHTML("second line");
$pdfh->output($path_to_file_to_be_created);
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~353 days

Recently: every ~616 days

Total

8

Last Release

978d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2cb0c1d404c8ae72b0a731246130079c2f440d6ea079815ca8c153aa361b1f28?d=identicon)[nettools.ovh](/maintainers/nettools.ovh)

---

Top Contributors

[![net-tools](https://avatars.githubusercontent.com/u/6818724?v=4)](https://github.com/net-tools "net-tools (7 commits)")

### Embed Badge

![Health badge](/badges/net-tools-pdf/health.svg)

```
[![Health](https://phpackages.com/badges/net-tools-pdf/health.svg)](https://phpackages.com/packages/net-tools-pdf)
```

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.4k37.3k](/packages/matomo-matomo)[spipu/html2pdf

Html2Pdf is a HTML to PDF converter written in PHP - It uses TCPDF - OFFICIAL PACKAGE

1.8k10.6M45](/packages/spipu-html2pdf)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[elibyy/tcpdf-laravel

tcpdf support for Laravel 6, 7, 8, 9, 10, 11

3542.7M5](/packages/elibyy-tcpdf-laravel)[iio/libmergepdf

Library for merging multiple PDFs

40813.6M13](/packages/iio-libmergepdf)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)

PHPackages © 2026

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