PHPackages                             efectn/php-pdf-calendar - 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. efectn/php-pdf-calendar

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

efectn/php-pdf-calendar
=======================

PDF month calendar generator

1.0.10(7y ago)09Apache-2.0PHPPHP ^7.3

Since Mar 27Pushed 3y agoCompare

[ Source](https://github.com/efectn/php-pdf-calendar)[ Packagist](https://packagist.org/packages/efectn/php-pdf-calendar)[ Docs](https://github.com/a-schild/pdfcalendarbuilder)[ RSS](/packages/efectn-php-pdf-calendar/feed)WikiDiscussions master Synced 1mo ago

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

PDF Calendar Generator for PHP
==============================

[](#pdf-calendar-generator-for-php)

[![Latest Stable Version](https://camo.githubusercontent.com/5f5c75c211647057fe5b9f0237871d04728dcc92f85156f882ee25772e4d6679/68747470733a2f2f706f7365722e707567782e6f72672f65666563746e2f7068702d7064662d63616c656e6461722f762f737461626c65)](https://packagist.org/packages/efectn/php-pdf-calendar) [![Latest Unstable Version](https://camo.githubusercontent.com/8ce60be09e0b34d3676207f403e9e407525e267348a9e435cea527ba92e5e019/68747470733a2f2f706f7365722e707567782e6f72672f65666563746e2f7068702d7064662d63616c656e6461722f762f756e737461626c65)](https://packagist.org/packages/efectn/php-pdf-calendar) [![Total Downloads](https://camo.githubusercontent.com/ac502ca980fe82ddd5f353450d1722d92fdc50ef28a3f36b3805bfec3368179c/68747470733a2f2f706f7365722e707567782e6f72672f65666563746e2f7068702d7064662d63616c656e6461722f646f776e6c6f616473)](https://packagist.org/packages/efectn/php-pdf-calendar) [![Monthly Downloads](https://camo.githubusercontent.com/825072501274f70d3298c421090bc3b11d5a20203457b9265f539071b1d46dba/68747470733a2f2f706f7365722e707567782e6f72672f65666563746e2f7068702d7064662d63616c656e6461722f642f6d6f6e74686c79)](https://packagist.org/packages/efectn/php-pdf-calendar)

**Generate PDF month calendars with autoscaling/sizing.**

Originally forked from [a-schild/pdfcalendarbuilder](https://github.com/a-schild/pdfcalendarbuilder), but under active maintenance.

With the addMonth() introduced in 1.0.8 you can generate a PDF containing multiple months. Each month will be on it's own page then.

Unique Features
---------------

[](#unique-features)

- The class can try to put everything on one page.
- In an normal calendar, all rows have the same height.
- This library can shrink/expand rows, so everything fits on one page. See setResizeRowHeightsIfNeeded(true/false);
- If this is not enough, it can reduce the font size until everything fits on one page. See setShrinkFontSizeIfNeeded(true/false);

Installation &amp; Usage:
-------------------------

[](#installation--usage)

Run: `composer require efectn/php-pdf-calendar`

### Creating the class and generate calendar

[](#creating-the-class-and-generate-calendar)

```
$cal = new efectn\PDFCalendarBuilder\CalendarBuilder(1, 2019, "Calendar title", true, 'mm', 'A4');
$cal->startPDF();
$cal->addEntry($startDate, $endDate, "Entry 1", "#000000", "#fffff");
$cal->buildCalendar();
$cal->Output("calendar.pdf", "I");

```

### Creating the class and generate calendar for 3 months (Required version 1.0.7 or higher)

[](#creating-the-class-and-generate-calendar-for-3-months-required-version-107-or-higher)

```
$cal = new efectn\PDFCalendarBuilder\CalendarBuilder(1, 2019, "Calendar title Jan", true, 'mm', 'A4');
$cal->startPDF();
$cal->addEntry($startDate1, $endDate1, "Entry 1", "#000000", "#ffffff");
$cal->buildCalendar();
$cal->addMonth(2, 2019, "Title for Feb");
$cal->addEntry($startDate2, $endDate2, "Entry 1", "#000000", "#ffffff");
$cal->buildCalendar();
$cal->addMonth(3, 2019, "Title for March");
$cal->addEntry($startDate3, $endDate3, "Entry 1", "#000000", "#ffffff");
$cal->buildCalendar();
$cal->Output("calendar.pdf", "I");

```

Examples
--------

[](#examples)

- Empty calendar, no entries, just a month grid [![Empty calendar ](doc/img/calendar-empty.png)](doc/img/calendar-empty.png)
- Overflowing boxes in normal libraries [![Box overflow in normal calendars](doc/img/calendar-overflow.png)](doc/img/calendar-overflow.png)
- Resize row heights to adapt space usage [![Resize rows height](doc/img/calendar-resize-row2.png)](doc/img/calendar-resize-row2.png)
- Resize row heights and shrink font size if needed [![Resize rows and shrink font](doc/img/calendar-resize-rows-shrink-fontsize.png)](doc/img/calendar-resize-rows-shrink-fontsize.png)
- Day spanning events [![Events which span days](doc/img/calendar-day-spanning.png)](doc/img/calendar-day-spanning.png)

(C) 2019-2022 A.Schild, (C) 2022 Efe Çetin

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 85.7% 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 ~0 days

Total

11

Last Release

2607d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f4bd49f753add28137935eb6eb69db4b69a9951d371e9b9e009eff231d27b84c?d=identicon)[efectn](/maintainers/efectn)

---

Top Contributors

[![a-schild](https://avatars.githubusercontent.com/u/1441009?v=4)](https://github.com/a-schild "a-schild (36 commits)")[![efectn](https://avatars.githubusercontent.com/u/45270788?v=4)](https://github.com/efectn "efectn (6 commits)")

---

Tags

pdfcalendar

### Embed Badge

![Health badge](/badges/efectn-php-pdf-calendar/health.svg)

```
[![Health](https://phpackages.com/badges/efectn-php-pdf-calendar/health.svg)](https://phpackages.com/packages/efectn-php-pdf-calendar)
```

###  Alternatives

[spipu/html2pdf

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

1.8k10.6M45](/packages/spipu-html2pdf)[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)[imal-h/pdf-box

The most advanced, driver-based PDF manipulation library for PHP v3.0. Supports Ghostscript, Chrome Headless (HTML to PDF), OpenSSL/FPDI (Signing), and PDFtk (Forms).

60403.9k](/packages/imal-h-pdf-box)[propa/tcpdi

TCPDI is a PHP class for importing PDF to use with TCPDF

231.1M1](/packages/propa-tcpdi)[bithost-gmbh/pdfviewhelpers

This is a TYPO3 CMS extension that provides various Fluid ViewHelpers to generate PDF documents.

45242.7k2](/packages/bithost-gmbh-pdfviewhelpers)

PHPackages © 2026

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