fwiep / monthcalendar

Generate Dutch 2-page A5 PDF month calendars using PHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MonthCalendar

Generate Dutch 2-page A5 PDF month calendars using PHP

About

This project generates a 2-page A5 PDF-document containing twelve month grids of the given year. It uses mPDF for the PDF dirty work. It is loosely based on FWiePs WeekCalendar for PHP.

Example

A month calendar of the year 2023 is part of this project and can be downloaded right here.

Installation

To install the script, first clone the repository. Then install the mPDF-dependency using composer. Finally, launch the PHP-server and open up your browser to generate the document.

git clone https://github.com/fwiep/monthcalendar.git;
cd monthcalendar;
composer install;
php -S localhost:8080;

Troubleshooting

The only problem I've encountered so far, is that mPDF sometimes can't write to its temporary folder when called through a 'regular' webserver. This can be fixed by changing the folder's owner and/or permissions. On Fedora, the SELinux context has to be changed, too.

cd monthcalendar;
sudo chown -R myuser:apache .;
sudo chmod 775 vendor/mpdf/mpdf/tmp;
sudo chcon --recursive -t httpd_sys_rw_content_t vendor/mpdf/mpdf/tmp/;

About

Generate Dutch 2-page A5 PDF month calendars using PHP

License:GNU General Public License v3.0


Languages

Language:PHP 96.0%Language:CSS 4.0%