承接 a-schild/pdfcalendarbuilder 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

a-schild/pdfcalendarbuilder

最新稳定版本:1.0.12

Composer 安装命令:

composer require a-schild/pdfcalendarbuilder

包简介

PDF month calendar generator

README 文档

README

Generate pdf month calendars with autoscaling/sizing

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

  • 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);

Usage:

In your composer.json add the dependency:

    "require": {
        "php": "^8.1",
        "a-schild/pdfcalendarbuilder": ">=1.0.12",
    }

Creating the class and generate calendar

$cal = new aschild\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)

$cal = new aschild\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

  • Empty calendar, no entries, just a month grid Empty calendar
  • Overflowing boxes in normal libraries Box overflow in normal calendars
  • Resize row heights to adapt space usage Resize rows height
  • Resize row heights and shrink font size if needed Resize rows and shrink font
  • Day spanning events Events which span days

(C) 2019 - 2025 A.Schild

统计信息

  • 总下载量: 3.84k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2019-03-27