Added PDF for pregenerated PDF

This commit is contained in:
Torsten Schulz
2023-12-27 18:19:27 +01:00
parent 547e4bbb6f
commit 82a68012ae
746 changed files with 139205 additions and 3620 deletions

View File

@@ -10,7 +10,10 @@
"tinymce/tinymce": "*",
"phpmailer/phpmailer": "dev-master",
"webklex/php-imap": "^4.1",
"phpoffice/phpspreadsheet": "dev-master"
"phpoffice/phpspreadsheet": "dev-master",
"setasign/fpdi": "^2.6",
"setasign/fpdi-fpdf": "^2.3",
"tecnickcom/tcpdf": "*"
},
"minimum-stability": "dev"
}

361
composer.lock generated
View File

@@ -4,8 +4,77 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "72b352d0dd8de809a4596cf92be7dab3",
"content-hash": "f6435e0e50b2cb103779c27782947022",
"packages": [
{
"name": "carbonphp/carbon-doctrine-types",
"version": "2.1.0",
"source": {
"type": "git",
"url": "https://github.com/CarbonPHP/carbon-doctrine-types.git",
"reference": "99f76ffa36cce3b70a4a6abce41dba15ca2e84cb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/99f76ffa36cce3b70a4a6abce41dba15ca2e84cb",
"reference": "99f76ffa36cce3b70a4a6abce41dba15ca2e84cb",
"shasum": ""
},
"require": {
"php": "^7.4 || ^8.0"
},
"conflict": {
"doctrine/dbal": "<3.7.0 || >=4.0.0"
},
"require-dev": {
"doctrine/dbal": "^3.7.0",
"nesbot/carbon": "^2.71.0 || ^3.0.0",
"phpunit/phpunit": "^10.3"
},
"type": "library",
"autoload": {
"psr-4": {
"Carbon\\Doctrine\\": "src/Carbon/Doctrine/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "KyleKatarn",
"email": "kylekatarnls@gmail.com"
}
],
"description": "Types to use Carbon in Doctrine",
"keywords": [
"carbon",
"date",
"datetime",
"doctrine",
"time"
],
"support": {
"issues": "https://github.com/CarbonPHP/carbon-doctrine-types/issues",
"source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/2.1.0"
},
"funding": [
{
"url": "https://github.com/kylekatarnls",
"type": "github"
},
{
"url": "https://opencollective.com/Carbon",
"type": "open_collective"
},
{
"url": "https://tidelift.com/funding/github/packagist/nesbot/carbon",
"type": "tidelift"
}
],
"time": "2023-12-11T17:09:12+00:00"
},
{
"name": "doctrine/inflector",
"version": "2.1.x-dev",
@@ -619,15 +688,16 @@
"source": {
"type": "git",
"url": "https://github.com/briannesbitt/Carbon.git",
"reference": "98276233188583f2ff845a0f992a235472d9466a"
"reference": "a12dbbaab4d14bc43760f677b0f12047684b84a7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/98276233188583f2ff845a0f992a235472d9466a",
"reference": "98276233188583f2ff845a0f992a235472d9466a",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/a12dbbaab4d14bc43760f677b0f12047684b84a7",
"reference": "a12dbbaab4d14bc43760f677b0f12047684b84a7",
"shasum": ""
},
"require": {
"carbonphp/carbon-doctrine-types": "*",
"ext-json": "*",
"php": "^7.1.8 || ^8.0",
"psr/clock": "^1.0",
@@ -639,8 +709,8 @@
"psr/clock-implementation": "1.0"
},
"require-dev": {
"doctrine/dbal": "^2.0 || ^3.1.4",
"doctrine/orm": "^2.7",
"doctrine/dbal": "^2.0 || ^3.1.4 || ^4.0",
"doctrine/orm": "^2.7 || ^3.0",
"friendsofphp/php-cs-fixer": "^3.0",
"kylekatarnls/multi-tester": "^2.0",
"ondrejmirtes/better-reflection": "*",
@@ -718,7 +788,7 @@
"type": "tidelift"
}
],
"time": "2023-09-25T11:31:05+00:00"
"time": "2023-12-15T21:58:36+00:00"
},
{
"name": "phpmailer/phpmailer",
@@ -726,12 +796,12 @@
"source": {
"type": "git",
"url": "https://github.com/PHPMailer/PHPMailer.git",
"reference": "a1fa2714c447adda7e6b07c4bfa290dfc1a035b2"
"reference": "5372c1694dea54e156443af9c888ccecfa52cb4d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/a1fa2714c447adda7e6b07c4bfa290dfc1a035b2",
"reference": "a1fa2714c447adda7e6b07c4bfa290dfc1a035b2",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/5372c1694dea54e156443af9c888ccecfa52cb4d",
"reference": "5372c1694dea54e156443af9c888ccecfa52cb4d",
"shasum": ""
},
"require": {
@@ -751,6 +821,7 @@
"yoast/phpunit-polyfills": "^1.0.4"
},
"suggest": {
"decomplexity/SendOauth2": "Adapter for using XOAUTH2 authentication",
"ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses",
"ext-openssl": "Needed for secure SMTP sending and DKIM signing",
"greew/oauth2-azure-provider": "Needed for Microsoft Azure XOAUTH2 authentication",
@@ -799,7 +870,7 @@
"type": "github"
}
],
"time": "2023-10-09T11:27:29+00:00"
"time": "2023-12-18T07:46:07+00:00"
},
{
"name": "phpoffice/phpspreadsheet",
@@ -1216,6 +1287,167 @@
},
"time": "2017-10-23T01:57:42+00:00"
},
{
"name": "setasign/fpdf",
"version": "1.8.6",
"source": {
"type": "git",
"url": "https://github.com/Setasign/FPDF.git",
"reference": "0838e0ee4925716fcbbc50ad9e1799b5edfae0a0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Setasign/FPDF/zipball/0838e0ee4925716fcbbc50ad9e1799b5edfae0a0",
"reference": "0838e0ee4925716fcbbc50ad9e1799b5edfae0a0",
"shasum": ""
},
"require": {
"ext-gd": "*",
"ext-zlib": "*"
},
"type": "library",
"autoload": {
"classmap": [
"fpdf.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Olivier Plathey",
"email": "oliver@fpdf.org",
"homepage": "http://fpdf.org/"
}
],
"description": "FPDF is a PHP class which allows to generate PDF files with pure PHP. F from FPDF stands for Free: you may use it for any kind of usage and modify it to suit your needs.",
"homepage": "http://www.fpdf.org",
"keywords": [
"fpdf",
"pdf"
],
"support": {
"source": "https://github.com/Setasign/FPDF/tree/1.8.6"
},
"time": "2023-06-26T14:44:25+00:00"
},
{
"name": "setasign/fpdi",
"version": "v2.6.0",
"source": {
"type": "git",
"url": "https://github.com/Setasign/FPDI.git",
"reference": "a6db878129ec6c7e141316ee71872923e7f1b7ad"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Setasign/FPDI/zipball/a6db878129ec6c7e141316ee71872923e7f1b7ad",
"reference": "a6db878129ec6c7e141316ee71872923e7f1b7ad",
"shasum": ""
},
"require": {
"ext-zlib": "*",
"php": "^5.6 || ^7.0 || ^8.0"
},
"conflict": {
"setasign/tfpdf": "<1.31"
},
"require-dev": {
"phpunit/phpunit": "~5.7",
"setasign/fpdf": "~1.8.6",
"setasign/tfpdf": "~1.33",
"squizlabs/php_codesniffer": "^3.5",
"tecnickcom/tcpdf": "~6.2"
},
"suggest": {
"setasign/fpdf": "FPDI will extend this class but as it is also possible to use TCPDF or tFPDF as an alternative. There's no fixed dependency configured."
},
"type": "library",
"autoload": {
"psr-4": {
"setasign\\Fpdi\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jan Slabon",
"email": "jan.slabon@setasign.com",
"homepage": "https://www.setasign.com"
},
{
"name": "Maximilian Kresse",
"email": "maximilian.kresse@setasign.com",
"homepage": "https://www.setasign.com"
}
],
"description": "FPDI is a collection of PHP classes facilitating developers to read pages from existing PDF documents and use them as templates in FPDF. Because it is also possible to use FPDI with TCPDF, there are no fixed dependencies defined. Please see suggestions for packages which evaluates the dependencies automatically.",
"homepage": "https://www.setasign.com/fpdi",
"keywords": [
"fpdf",
"fpdi",
"pdf"
],
"support": {
"issues": "https://github.com/Setasign/FPDI/issues",
"source": "https://github.com/Setasign/FPDI/tree/v2.6.0"
},
"funding": [
{
"url": "https://tidelift.com/funding/github/packagist/setasign/fpdi",
"type": "tidelift"
}
],
"time": "2023-12-11T16:03:32+00:00"
},
{
"name": "setasign/fpdi-fpdf",
"version": "v2.3.0",
"source": {
"type": "git",
"url": "https://github.com/Setasign/FPDI-FPDF.git",
"reference": "f2fdc44e4d5247a3bb55ed2c2c1396ef05c02357"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Setasign/FPDI-FPDF/zipball/f2fdc44e4d5247a3bb55ed2c2c1396ef05c02357",
"reference": "f2fdc44e4d5247a3bb55ed2c2c1396ef05c02357",
"shasum": ""
},
"require": {
"setasign/fpdf": "^1.8.2",
"setasign/fpdi": "^2.3"
},
"type": "library",
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jan Slabon",
"email": "jan.slabon@setasign.com",
"homepage": "https://www.setasign.com"
}
],
"description": "Kind of metadata package for dependencies of the latest versions of FPDI and FPDF.",
"homepage": "https://www.setasign.com/fpdi",
"keywords": [
"fpdf",
"fpdi",
"pdf"
],
"support": {
"source": "https://github.com/Setasign/FPDI-FPDF/tree/v2.3.0"
},
"abandoned": true,
"time": "2020-02-19T12:21:53+00:00"
},
{
"name": "symfony/deprecation-contracts",
"version": "2.5.x-dev",
@@ -1289,12 +1521,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
"reference": "365992c83a836dfe635f1e903ccca43ee03d3dd2"
"reference": "4da1713e88cf9c44bd4bf65f54772681222fcbec"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/365992c83a836dfe635f1e903ccca43ee03d3dd2",
"reference": "365992c83a836dfe635f1e903ccca43ee03d3dd2",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/4da1713e88cf9c44bd4bf65f54772681222fcbec",
"reference": "4da1713e88cf9c44bd4bf65f54772681222fcbec",
"shasum": ""
},
"require": {
@@ -1357,7 +1589,7 @@
"type": "tidelift"
}
],
"time": "2023-08-21T07:23:18+00:00"
"time": "2023-12-27T11:45:35+00:00"
},
{
"name": "symfony/polyfill-iconv",
@@ -1861,12 +2093,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
"reference": "96015d73801bb59de5a43d71906c5690759f29ea"
"reference": "ba72f72fceddf36f00bd495966b5873f2d17ad8f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/translation/zipball/96015d73801bb59de5a43d71906c5690759f29ea",
"reference": "96015d73801bb59de5a43d71906c5690759f29ea",
"url": "https://api.github.com/repos/symfony/translation/zipball/ba72f72fceddf36f00bd495966b5873f2d17ad8f",
"reference": "ba72f72fceddf36f00bd495966b5873f2d17ad8f",
"shasum": ""
},
"require": {
@@ -1950,7 +2182,7 @@
"type": "tidelift"
}
],
"time": "2023-10-14T16:25:31+00:00"
"time": "2023-11-03T16:16:43+00:00"
},
{
"name": "symfony/translation-contracts",
@@ -2031,20 +2263,92 @@
"time": "2023-05-29T12:43:27+00:00"
},
{
"name": "tinymce/tinymce",
"version": "dev-master",
"name": "tecnickcom/tcpdf",
"version": "dev-main",
"source": {
"type": "git",
"url": "https://github.com/tinymce/tinymce-dist.git",
"reference": "02e194ec4d37aab8335332f8ac3e8d2292ba2d47"
"url": "https://github.com/tecnickcom/TCPDF.git",
"reference": "5fce932fcee4371865314ab7f6c0d85423c5c7ce"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/tinymce/tinymce-dist/zipball/02e194ec4d37aab8335332f8ac3e8d2292ba2d47",
"reference": "02e194ec4d37aab8335332f8ac3e8d2292ba2d47",
"url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/5fce932fcee4371865314ab7f6c0d85423c5c7ce",
"reference": "5fce932fcee4371865314ab7f6c0d85423c5c7ce",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"default-branch": true,
"type": "library",
"autoload": {
"classmap": [
"config",
"include",
"tcpdf.php",
"tcpdf_parser.php",
"tcpdf_import.php",
"tcpdf_barcodes_1d.php",
"tcpdf_barcodes_2d.php",
"include/tcpdf_colors.php",
"include/tcpdf_filters.php",
"include/tcpdf_font_data.php",
"include/tcpdf_fonts.php",
"include/tcpdf_images.php",
"include/tcpdf_static.php",
"include/barcodes/datamatrix.php",
"include/barcodes/pdf417.php",
"include/barcodes/qrcode.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL-3.0-or-later"
],
"authors": [
{
"name": "Nicola Asuni",
"email": "info@tecnick.com",
"role": "lead"
}
],
"description": "TCPDF is a PHP class for generating PDF documents and barcodes.",
"homepage": "http://www.tcpdf.org/",
"keywords": [
"PDFD32000-2008",
"TCPDF",
"barcodes",
"datamatrix",
"pdf",
"pdf417",
"qrcode"
],
"support": {
"issues": "https://github.com/tecnickcom/TCPDF/issues",
"source": "https://github.com/tecnickcom/TCPDF/tree/6.6.5"
},
"funding": [
{
"url": "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&currency_code=GBP&business=paypal@tecnick.com&item_name=donation%20for%20tcpdf%20project",
"type": "custom"
}
],
"time": "2023-09-06T15:09:26+00:00"
},
{
"name": "tinymce/tinymce",
"version": "6.8.2",
"source": {
"type": "git",
"url": "https://github.com/tinymce/tinymce-dist.git",
"reference": "b0073db409746748af4fc06fbee337bb99f462d9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/tinymce/tinymce-dist/zipball/b0073db409746748af4fc06fbee337bb99f462d9",
"reference": "b0073db409746748af4fc06fbee337bb99f462d9",
"shasum": ""
},
"type": "component",
"extra": {
"component": {
@@ -2086,9 +2390,9 @@
"wysiwyg"
],
"support": {
"source": "https://github.com/tinymce/tinymce-dist/tree/6.7.0"
"source": "https://github.com/tinymce/tinymce-dist/tree/6.8.2"
},
"time": "2023-08-30T11:10:35+00:00"
"time": "2023-12-11T03:21:56+00:00"
},
{
"name": "voku/anti-xss",
@@ -2429,7 +2733,8 @@
"aliases": [],
"minimum-stability": "dev",
"stability-flags": {
"phpmailer/phpmailer": 20
"phpmailer/phpmailer": 20,
"phpoffice/phpspreadsheet": 20
},
"prefer-stable": false,
"prefer-lowest": false,

View File

@@ -1,5 +1,8 @@
<?php
include 'renderer.php';
require_once 'vendor/autoload.php';
use setasign\Fpdi\Fpdi;
class Membership extends Renderer {
protected array $formFields = [
@@ -67,43 +70,43 @@ class Membership extends Renderer {
if ($formData['agreedElectronicalHandling'] !== 1) {
$this->errors['accept_electronical_usage'] = 'Für die Online-Registrierung müssen Sie der elektronischen Verarbeitung zustimmen';
}
}
}
protected function saveNewMember(array $formData): void {
$salt = $this->generateRandomString();
$query = sprintf("INSERT INTO ffajs.clubmember( "
. " first_name, last_name, street, zip, town, "
. " birthdate, phone, email, child_name, child_street, "
. " subscription, bank_name, iban, bic, account_member_name, "
. " membership_status, salt) "
. "VALUES('%s', '%s', '%s', '%s', '%s', "
. " '%s', '%s', '%s', '%s', '%s', "
. " '%s', '%s', '%s', '%s', '%s', "
. " %d, '%s') ",
$this->getDbEncryptedValueIfNeeded($formData, 'firstname', $salt),
$this->getDbEncryptedValueIfNeeded($formData, 'lastname', $salt),
$this->getDbEncryptedValueIfNeeded($formData, 'street', $salt),
$this->getDbEncryptedValueIfNeeded($formData, 'zip', $salt),
$this->getDbEncryptedValueIfNeeded($formData, 'town', $salt),
$this->getDbEncryptedValueIfNeeded($formData, 'birthDate', $salt),
$this->getDbEncryptedValueIfNeeded($formData, 'phoneNumber', $salt),
$this->getDbEncryptedValueIfNeeded($formData, 'email', $salt),
$this->getDbEncryptedValueIfNeeded($formData, 'childName', $salt),
$this->getDbEncryptedValueIfNeeded($formData, 'childStreet', $salt),
$this->getDbEncryptedValueIfNeeded($formData, 'payHeight', $salt),
$this->getDbEncryptedValueIfNeeded($formData, 'bankname', $salt),
$this->getDbEncryptedValueIfNeeded($formData, 'iban', $salt),
$this->getDbEncryptedValueIfNeeded($formData, 'bic', $salt),
$this->getDbEncryptedValueIfNeeded($formData, 'accountmembername', $salt),
1,
$salt);
mysqli_query($this->dbConnection, $query);
}
protected function saveNewMember(array $formData): void {
$salt = $this->generateRandomString();
$query = sprintf("INSERT INTO ffajs.clubmember( "
. " first_name, last_name, street, zip, town, "
. " birthdate, phone, email, child_name, child_street, "
. " subscription, bank_name, iban, bic, account_member_name, "
. " membership_status, salt) "
. "VALUES('%s', '%s', '%s', '%s', '%s', "
. " '%s', '%s', '%s', '%s', '%s', "
. " '%s', '%s', '%s', '%s', '%s', "
. " %d, '%s') ",
$this->getDbEncryptedValueIfNeeded($formData, 'firstname', $salt),
$this->getDbEncryptedValueIfNeeded($formData, 'lastname', $salt),
$this->getDbEncryptedValueIfNeeded($formData, 'street', $salt),
$this->getDbEncryptedValueIfNeeded($formData, 'zip', $salt),
$this->getDbEncryptedValueIfNeeded($formData, 'town', $salt),
$this->getDbEncryptedValueIfNeeded($formData, 'birthDate', $salt),
$this->getDbEncryptedValueIfNeeded($formData, 'phoneNumber', $salt),
$this->getDbEncryptedValueIfNeeded($formData, 'email', $salt),
$this->getDbEncryptedValueIfNeeded($formData, 'childName', $salt),
$this->getDbEncryptedValueIfNeeded($formData, 'childStreet', $salt),
$this->getDbEncryptedValueIfNeeded($formData, 'payHeight', $salt),
$this->getDbEncryptedValueIfNeeded($formData, 'bankname', $salt),
$this->getDbEncryptedValueIfNeeded($formData, 'iban', $salt),
$this->getDbEncryptedValueIfNeeded($formData, 'bic', $salt),
$this->getDbEncryptedValueIfNeeded($formData, 'accountmembername', $salt),
1,
$salt);
mysqli_query($this->dbConnection, $query);
}
protected function sendEmail(array $formData): void {
protected function sendEmail(array $formData): void {
$noForm = count($this->errors) === 0;
if ($noForm) {
$data = ['Name' => $formData['firstname'], $formData['lastname'], 'Strasse' => $formData['street'], 'Ort' => $formData['zip'] . ' ' . $formData['town'],
$data = ['Vorname' => $formData['firstname'], 'Nachname' => $formData['lastname'], 'Strasse' => $formData['street'], 'Ort' => $formData['zip'] . ' ' . $formData['town'],
'Geburtstag' => $formData['birthDate'], 'Telefon' => $formData['phoneNumber'], 'Email' => $formData['email'],
'Name des Kindes' => $formData['childName'], 'Straße des Kindes' => $formData['childStreet'],
'Gewünschter Mitgliedsbeitrag' => $formData['payHeight'], 'Geldinstitut' => $formData['bankname'],
@@ -118,8 +121,77 @@ class Membership extends Renderer {
foreach ($data as $field => $value) {
$message .= $field . ': ' . $value . "\n";
}
$this->sendMail($mail, 'Mitgliedsantrag', $message, '');
$attachment = [
'Mitgliedsantrag.pdf' => ['content' => $this->createPdf(), 'type' => 'application/pdf']
];
$this->sendMail($mail, 'Mitgliedsantrag', $message, '', $attachment);
$this->templateName = 'membership_success';
}
}
}
protected function createPdf(array $formData): TCPDF
{
$pdf = new Fpdi();
$pdf->AddFont('DejaVuSans', '', 'DejaVuSans.php');
$pdf->AddFont('DejaVuSans Bold', '', 'DejaVuSans-Bold.php');
$pdf->AddPage('P', 'A4');
$pdf->SetMargins(20, 20, 20, 20);
$pdf->SetFont('DejaVuSans Bold', '', 15);
$pdf->Cell(0, 2, utf8_decode('Verein der Freunde und Förderer'), 0, 1, 'C');
$pdf->Cell(0, 10, utf8_decode('der August-Jaspert-Schule e.V.'), 0, 1, 'C');
$pdf->SetFont('DejaVuSans Bold', '', 13);
$pdf->Cell(0, 13.5, utf8_decode('Beitrittserklärung'), 0, 1, 'L');
$pdf->setFont('DejaVuSans', '', 12);
$pdf->Cell(0, 12, utf8_decode('Folgende Felder sind Pflicht und müssen ausgefüllt werden'), 0, 1, 'L');
$newFields = [
'Name' => $formData['lastname'],
'Vorname' => $formData['firstname'],
'Straße' => $formData['street'],
'PLZ und Wohnort' => $formData['zip'] . ' ' . $formData['town'],
'Telefon' => $formData['phoneNumber'],
'Email-Adresse' => $formData['email'],
'Geburtsdatum' => $formData['birthDate'],
'Gewünschter Beitrag' => str_replace('€', '', $formData['payHeight']) . ' EUR',
];
foreach ($newFields as $field => $value) {
$pdf->Cell(60, 5, utf8_decode($field), 0);
$pdf->Cell(0, 5, utf8_decode($value), 0, 1);
}
$pdf->Ln(5);
$pdf->MultiCell(0, 5, utf8_decode('Ich erkläre hiermit, dass ich die Satzung des Vereins erhalten habe und akzeptiere und trete dem Verein bei.'));
$pdf->Ln(14);
$lineStartX = $pdf->GetX();
$pdf->Cell(0, 0, '', 'T');
$lineEndX = $pdf->GetX();
$pdf->SetFont('DejaVuSans', '', 10);
$pdf->Ln(1);
$pdf->Cell(60, 2, utf8_decode('Ort, Datum'), 0);
$pdf->Cell(0, 2, utf8_decode('Unterschrift'), 0);
$pdf->Ln(15);
$pdf->SetFont('DejaVuSans', '', 12);
$pdf->MultiCell(0, 5, utf8_decode('Wenn Sie die Abbuchung per SEPA-Mandat wünschen, füllen Sie bitte folgende Felder aus:'));
$pdf->Ln(5);
$newFields = [
'Geldinstitut' => $formData['bankname'],
'IBAN' => $formData['iban'],
'BIC' => $formData['bic'],
'Kontoinhaber' => $formData['accountmembername'],
];
foreach ($newFields as $field => $value) {
$pdf->Cell(60, 5, utf8_decode($field), 0);
$pdf->Cell(0, 5, utf8_decode($value), 0, 1);
}
$pdf->Ln(5);
$pdf->MultiCell(0, 5, utf8_decode('Mir ist bekannt, das ich diese Einzugsermächtigung jederzeit widerrufen kann und sie mit Beendigung meiner Mitgliedschaft automatisch erlischt.'));
$pdf->Ln(14);
$lineStartX = $pdf->GetX();
$pdf->Cell(0, 0, '', 'T');
$lineEndX = $pdf->GetX();
$pdf->SetFont('DejaVuSans', '', 10);
$pdf->Ln(1);
$pdf->Cell(60, 2, utf8_decode('Ort, Datum'), 0);
$pdf->Cell(0, 2, utf8_decode('Unterschrift'), 0);
return $pdf->Output('S', '');
}
}

View File

@@ -449,11 +449,15 @@ class Renderer {
return $mail;
}
protected function sendMail(PHPMailer $mail, string $subject, string $body, string $signature): void {
protected function sendMail(PHPMailer $mail, string $subject, string $body, string $signature, $attachments = []): void {
$completeBody = $body . $signature . $this->emailLegalInformation();
$mail->Subject = $subject;
$mail->Body = $completeBody;
$mail->AltBody = 'Diese Email benötigt HTML-Ansicht';
foreach ($attachments as $fileName => $attachment) {
$mail->addStringAttachment($attachment['content'], $fileName, 'base64', $attachment['type']);
}
$mail->send();
}

21
libs/fpdm/LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2017 codeshell
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

138
libs/fpdm/README.md Normal file
View File

@@ -0,0 +1,138 @@
# PDF Form Filling with FPDM
## Package
The FPDM class allows to fill out PDF forms, i.e. populate fields of a PDF file. It is **developed by Olivier Plathey**, author of the [FDPF Library](http://www.fpdf.org/), and has been released as [Skript 93](http://www.fpdf.org/en/script/script93.php).
I created this repository for the following reasons:
- make the current FPDM source available via [composer](https://packagist.org/packages/tmw/fpdm), autoload via classmaps
- bugfixing
- FIX: compatibility issues with PHP 7.x [e376dc1](https://github.com/codeshell/fpdm/commit/e376dc157655ded24c61e098199586f3325d63c1) v2.9.1
- FIX: filling forms in multiple files (wrong buffer usage, invalid offsets) [e376dc1](https://github.com/codeshell/fpdm/commit/e376dc157655ded24c61e098199586f3325d63c1) v2.9.1
- FIX: convert ASCII object names to utf-8 [1eddba7](https://github.com/codeshell/fpdm/commit/1eddba76f610690821e8c0b3753df337a6cf65f7) v2.9.2
- improvements (changes to the original codebase are prefixed with `//FIX: change description` and ended with `//ENDFIX`)
- ADD: support for checkboxes (disabled by default, activate with `$pdf->useCheckboxParser = true;`) [0375dd9](https://github.com/codeshell/fpdm/commit/0375dd95f05fd2d8d32d9ae1ab882fa0895b07b3) v2.9.2
## Version
Based on version 2.9 (2017-05-11) available from [fpdf.org/en/script/script93.php](http://www.fpdf.org/en/script/script93.php).
_Note: If you find that a new version has been hosted on fpdf.org, please do not hesitate to drop me [a short note](https://github.com/codeshell/fpdm/issues) to make sure I do not miss it out._
This repository only contains the separate php class written for form filling (FPD**M**). If you are looking for a repository containing the main FPD**F** Library, please head over to [github.com/Setasign/FPDF](https://github.com/Setasign/FPDF).
Once again, all credits to Olivier Plathey for providing an easy to use script for form filling in addition to his FPDF library!
## Installation
### Composer
The preferred way of making FPDM available in your app is to install it via composer with
`composer require tmw/fpdm`
## Usage
### Composer (autoload)
[autoload](https://getcomposer.org/doc/01-basic-usage.md#autoloading) FPDM class files by adding this to your code:
`require 'vendor/autoload.php';`
### Standalone Script (legacy)
Load the top level entry point by calling
`require_once '/abolute/path/to/fpdm.php';`
or
`require_once './relative/path/to/fpdm.php';`
## Customization to original code
### classmaps vs. psr-4 (or: legacy code vs modern frameworks á la Laravel)
Autoloading classes with [namespaces](https://www.php.net/manual/en/language.namespaces.basics.php) and following [PSR-4: Autoloader](https://www.php-fig.org/psr/psr-4/) would be desireable. Especially reducing the risk of naming conflicts by using vendor namespaces.
However, FPDM has been around for a long time and as such is used in many projects that use non-namespaced code (I refer to them as legacy projects). Legacy projects instantiate FPDM by calling `$mypdf = new FPDM()` which is unqualified but defaults to the global namespace with non-namespaced code.
Using psr-4 would autoload the class to a subnamespace (e.g. \codeshell\fpdm\FPDM) instead of the global namespace (e.g. \FPDM) thus breaking any legacy code no matter if it used `new FPDM()` or `new \FPDM()`.
__Classmaps are a compromise.__ They allow taking advantage of composers autoloading and dependency management. Yet classes are added to the global namespace. Legacy projects can switch to composer without having to refactor their code. __Newer projects (e.g. utilizing frameworks like laravel, that heavily rely on namespaces) can still use legacy classes__ by using the fully qualified name (in this case the class name prefixed with global prefix operator as in `new \FPDM()`).
That's my reasoning for using classmaps over psr-4 for FPDM. Please let me know if there are use cases where classmaps won't work with modern frameworks.
### Checkboxes
I added support for checkboxes. The feature is not heavily tested but works for me. Can be enabled with `useCheckboxParser = true` like so:
```php
<?php
$fields = array(
'my_checkbox' => 'anything that evaluates to true.', // checkbox will be checked; Careful, that includes ANY non-empty string (even "no" or "unchecked")
'another_checkbox' => false, // checkbox will be UNchecked; empty string or 0 work as well
);
$pdf = new FPDM('template.pdf');
$pdf->useCheckboxParser = true; // Checkbox parsing is ignored (default FPDM behaviour) unless enabled with this setting
$pdf->Load($fields, true);
$pdf->Merge();
$pdf->Output();
```
You don't have to figure out the technical names of checkbox states. They are retrieved during the parsing process.
## Original Info Page
_Everything below is mirrored from http://www.fpdf.org/en/script/script93.php ._
### Information
Author: Olivier
License: FPDF
### Description
This script allows to merge data into a PDF form. Given a template PDF with text fields, it's
possible to inject values in two different ways:
- from a PHP array
- from an <abbr title="Forms Data Format">FDF</abbr> file
The resulting document is produced by the Output() method, which works the same as for FPDF.
Note: if your template PDF is not compatible with this script, you can process it with
[PDFtk](https://www.pdflabs.com/tools/pdftk-server/) this way:
`pdftk modele.pdf output modele2.pdf`
Then try again with modele2.pdf.
### Example
This example shows how to merge data from an array:
```php
<?php
/***************************
Sample using a PHP array
****************************/
$fields = array(
'name' => 'My name',
'address' => 'My address',
'city' => 'My city',
'phone' => 'My phone number'
);
$pdf = new FPDM('template.pdf');
$pdf->Load($fields, false); // second parameter: false if field values are in ISO-8859-1, true if UTF-8
$pdf->Merge();
$pdf->Output();
?>
```
View the result [here](http://www.fpdf.org/en/script/ex93.pdf).

49
libs/fpdm/composer.json Normal file
View File

@@ -0,0 +1,49 @@
{
"name": "tmw/fpdm",
"description": "PDF form filling using FPDM Class written by FPDF author Olivier",
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Olivier Plathey",
"email": "oliver@fpdf.org",
"homepage": "http://www.fpdf.org/",
"role": "Author"
},
{
"name": "codeshell",
"role": "Developer",
"homepage": "https://github.com/codeshell/"
}
],
"homepage": "https://github.com/codeshell/fpdm",
"autoload": {
"classmap": [
"src/fpdm.php",
"src/filters/"
]
},
"repositories": [
{
"type": "git",
"url": "https://github.com/codeshell/fpdm",
"name": "GitHub"
}
],
"require": {
"php": ">=5.3.0"
},
"keywords": [
"FPDM",
"PDF",
"forms",
"fields",
"fill",
"populate",
"FPDF"
],
"support": {
"issues": "https://github.com/codeshell/fpdm/issues",
"source": "https://github.com/codeshell/fpdm/tree/master"
}
}

19
libs/fpdm/fpdm.php Normal file
View File

@@ -0,0 +1,19 @@
<?php
/**
* Entry point for legacy calls
*
* Devs not using composer autoload will have included this file directly.
* Keeping it as a wrapper allows to retain compatibility with legacy projects
* while allowing adjustments to the source to improve composer integration.
*/
define('FPDM_DIRECT', true);
require_once("src/fpdm.php");
require_once("src/filters/FilterASCIIHex.php");
require_once("src/filters/FilterASCII85.php");
require_once("src/filters/FilterFlate.php");
require_once("src/filters/FilterLZW.php");
require_once("src/filters/FilterStandard.php");

View File

@@ -0,0 +1,20 @@
<?php
/***************************
Sample using a PHP array
****************************/
require('fpdm.php');
$fields = array(
'name' => 'My name',
'address' => 'My address',
'city' => 'My city',
'phone' => 'My phone number'
);
$pdf = new FPDM('template.pdf');
$pdf->Load($fields, false); // second parameter: false if field values are in ISO-8859-1, true if UTF-8
$pdf->Merge();
$pdf->Output();
?>

12
libs/fpdm/src/ex-fdf.php Normal file
View File

@@ -0,0 +1,12 @@
<?php
/***************************
Sample using an FDF file
****************************/
require('fpdm.php');
$pdf = new FPDM('template.pdf', 'fields.fdf');
$pdf->Merge();
$pdf->Output();
?>

BIN
libs/fpdm/src/ex.pdf Normal file

Binary file not shown.

2
libs/fpdm/src/export/cache/data.fdf vendored Normal file
View File

@@ -0,0 +1,2 @@
%FDF-1.2
%âãÏÓ

Binary file not shown.

View File

@@ -0,0 +1,125 @@
<?php
/****************************************************************
*@file fdf.php
*@name Generates fdf files
*@internal fdf bridge to forge_fdf
*@package fpdftk
*@date 2010-12-05
*@author 0livier
*@version 2.1
*@note
* V2.1 (05.12.2010) Adaptation for FPDM
* V2.0 (27.10.2010) USe of URL TOOLBOX package
* V1.0 (22.10.2010) First working release
******************************************************************/
require ("forge_fdf.php");
if (!defined('URL_TOOLBOX')) die("Requires the URL_TOOLBOX package!");
/**
*Resolves relative pdf urls to absolute
*
*@note pdf paths MUST BE ABSOLUTE in the fdf file or http scheme because when path contains .. then fdf fails
*@param String $pdf_url any url
*@return String $url the absolute url
**/
function resolve_pdf_url($pdf_url) {
//----------------------------------
$url=resolve_url($pdf_url);
return $url;
}
/**
*Generates a form definition file (fdf)
*
*@note error message is dumped into syslog if supported
*@todo Expand support not only to fdf_data_strings (I don't need this feature)
*@param String $pdf_url
*@param Array $pdf_data the array that holds fields datas (field_name => field_value
*@param String $output_mode
* 'D' : WARNING!! By default, THIS FUNCTION SENDS HTTP HEADERS! It MUST be called before
* any content is spooled to the browser, or the function will fail!
* 'S' : Return the fdf file generated as a string
* <fdf_file> fullpathname to where the fdf file content has to be saved.
*@return mixed ret the return value which can be:
* -a boolean true when output_mode is set to 'D'
* -a text the fdf content when output_mode is set to 'S'
* -an array holding success flag with either the fdf size or the error message
**/
function output_fdf($pdf_url,$pdf_data,$output_mode='D') {
//---------------------------------------------------------
// Ensures pdf path is absolute
$pdf_form_url=resolve_pdf_url($pdf_url);
// string data, used for text fields, combo boxes and list boxes
$fdf_data_strings=$pdf_data;
// name data, used for checkboxes and radio buttons
// (e.g., /Yes and /Off for true and false)
$fdf_data_names=array();
//fields security and accessibility attributes
$fields_hidden=array();
$fields_readonly=array();
$fdf=forge_fdf( $pdf_form_url,
$fdf_data_strings,
$fdf_data_names,
$fields_hidden,
$fields_readonly );
switch($output_mode) {
case "D"://Send the fdf header so acrobat recognize it.
header ("Content-Type: application/vnd.fdf");
print $fdf;
$ret=true;
break;
case "S"://String
$ret=$fdf;
break;
default:// write the file out
$error_fdf_access='';
$fdf_file=$output_mode;
$fdf_dir=dirname($fdf_file);
//Paranoïd access mode with syslog in background as watchdog for errors
if(file_exists($fdf_dir)) {
if(is_writable($fdf_dir)) {
if(!is_writable($fdf_file)&&false) { //Create
$error_fdf_access="can not write fdf file ($fdf_file), disk full or missing rights?";
}
}else {
$error_fdf_access="can not write into fdf's directory ($fdf_dir)";
}
}else {
$error_fdf_access="can not access to fdf's directory ($fdf_dir)";
}
$success=false;
if($error_fdf_access !="") {
$err="output_fdf : Unable to create fdf file '".$fdf_file."'<br> because $error_fdf_access.";
} else {
if($fp=fopen($fdf_file,'w')){
$err=fwrite($fp,$fdf,strlen($fdf));
if(function_exists('syslog')) syslog(LOG_WARNING,"FDF file '".$output_mode."' written successfully ($err bytes)");
$success=true;
}else{
$err="output_fdf : Unable to generate file '".$output_mode."', disk full or corrupted?.";
}
fclose($fp);
}
$ret=array("success"=>$success,"return"=>$err);
}
return $ret;
}
?>

View File

@@ -0,0 +1,146 @@
<?php
/* forge_fdf, by Sid Steward
version 1.0
visit: www.pdfhacks.com/forge_fdf/
For text fields, combo boxes and list boxes, add
field values as a name => value pair to $fdf_data_strings.
For check boxes and radio buttons, add field values
as a name => value pair to $fdf_data_names. Typically,
true and false correspond to the (case sensitive)
names "Yes" and "Off".
Any field added to the $fields_hidden or $fields_readonly
array must also be a key in $fdf_data_strings or
$fdf_data_names; this might be changed in the future
Any field listed in $fdf_data_strings or $fdf_data_names
that you want hidden or read-only must have its field
name added to $fields_hidden or $fields_readonly; do this
even if your form has these bits set already
PDF can be particular about CR and LF characters, so I
spelled them out in hex: CR == \x0d : LF == \x0a
*/
function escape_pdf_string( $ss )
{
$ss_esc= '';
$ss_len= strlen( $ss );
for( $ii= 0; $ii< $ss_len; ++$ii ) {
if( ord($ss{$ii})== 0x28 || // open paren
ord($ss{$ii})== 0x29 || // close paren
ord($ss{$ii})== 0x5c ) // backslash
{
$ss_esc.= chr(0x5c).$ss{$ii}; // escape the character w/ backslash
}
else if( ord($ss{$ii}) < 32 || 126 < ord($ss{$ii}) ) {
$ss_esc.= sprintf( "\\%03o", ord($ss{$ii}) ); // use an octal code
}
else {
$ss_esc.= $ss{$ii};
}
}
return $ss_esc;
}
/**
$key = addcslashes($key, "\n\r\t\\()");
$val = addcslashes($val, "\n\r\t\\()");
**/
function escape_pdf_name( $ss )
{
$ss_esc= '';
$ss_len= strlen( $ss );
for( $ii= 0; $ii< $ss_len; ++$ii ) {
if( ord($ss{$ii}) < 33 || 126 < ord($ss{$ii}) ||
ord($ss{$ii})== 0x23 ) // hash mark
{
$ss_esc.= sprintf( "#%02x", ord($ss{$ii}) ); // use a hex code
}
else {
$ss_esc.= $ss{$ii};
}
}
return $ss_esc;
}
/**
* Generates the fdf code
*
*@param String $pdf_form_url: a string containing a URL path to a PDF file on the
* server. This PDF MUST exist and contain fields with
* the names referenced by $pdf_data for this function
* to work.
*@param Array $fdf_data_strings: an array of any fields in $pdf_form_url that you want to
* populate, of the form key=>val; where the field
* name is the key, and the field's value is in val.
*@return String
**/
function forge_fdf( $pdf_form_url,
$fdf_data_strings,
$fdf_data_names,
$fields_hidden,
$fields_readonly )
{
$fdf = "%FDF-1.2\x0d%\xe2\xe3\xcf\xd3\x0d\x0a"; // header
$fdf.= "1 0 obj\x0d<< "; // open the Root dictionary
$fdf.= "\x0d/FDF << "; // open the FDF dictionary
$fdf.= "/Fields [ "; // open the form Fields array
// string data, used for text fields, combo boxes and list boxes
foreach( $fdf_data_strings as $key => $value ) {
$fdf.= "<< /V (".escape_pdf_string($value).")".
"/T (".escape_pdf_string($key).") ";
if( in_array( $key, $fields_hidden ) )
$fdf.= "/SetF 2 ";
else
$fdf.= "/ClrF 2 ";
if( in_array( $key, $fields_readonly ) )
$fdf.= "/SetFf 1 ";
else
$fdf.= "/ClrFf 1 ";
$fdf.= ">> \x0d";
}
// name data, used for checkboxes and radio buttons
// (e.g., /Yes and /Off for true and false)
foreach( $fdf_data_names as $key => $value ) {
$fdf.= "<< /V /".escape_pdf_name($value).
" /T (".escape_pdf_string($key).") ";
if( in_array( $key, $fields_hidden ) )
$fdf.= "/SetF 2 ";
else
$fdf.= "/ClrF 2 ";
if( in_array( $key, $fields_readonly ) )
$fdf.= "/SetFf 1 ";
else
$fdf.= "/ClrFf 1 ";
$fdf.= ">> \x0d";
}
$fdf.= "] \x0d"; // close the Fields array
// the PDF form filename or URL, if given
if( $pdf_form_url ) {
$fdf.= "/F (".escape_pdf_string($pdf_form_url).") \x0d";
}
$fdf.= ">> \x0d"; // close the FDF dictionary
$fdf.= ">> \x0dendobj\x0d"; // close the Root dictionary
// trailer; note the "1 0 R" reference to "1 0 obj" above
$fdf.= "trailer\x0d<<\x0d/Root 1 0 R \x0d\x0d>>\x0d";
$fdf.= "%%EOF\x0d\x0a";
return $fdf;
}
?>

View File

@@ -0,0 +1,148 @@
<?php
/****************************************************************
*@file pdftk.php
*@name Generates pdf files using the pdf toolkit
*@requires the pdftk binary os dependant placed in this same directory, see line 63 of this script.
*@internal fdf bridge to pdftk
*@package fpdftk
*@date 2010-12-06
*@author 0livier
*@version 2.0
*@note
* V2.0 '06.12.2010) Add security support , first public release.
* V1.0 (05.12.2010) First working release
******************************************************************/
if (!defined('URL_TOOLBOX')) die("Requires the URL_TOOLBOX package!");
define("PHP5_ENGINE",version_compare(phpversion(), "5"));
//!NOTE try to detect your OS
function is_windows(){
$PHP_OS=php_uname('s');
return (strtoupper(substr($PHP_OS, 0, 3)) === 'WIN');
}
function is_mac() {
//--------------
$PHP_OS=php_uname('s');
return (strtoupper(substr($PHP_OS, 0, 6)) === 'DARWIN'); //not tested
}
/**
*Generate randomly an unique id
*@note this is used to fight acrobat cache
**/
function rnunid() {
return md5( uniqid() ); // 32 characters long
//$unique = sha1( uniqid() ); // 40 characters long
}
/**
*@name pdftk
*@brief Validate with xmlint (external tool) an xml file using the schema (XML|DTD|XSD|RNG|SCH)
*@access public
*@note This function will call pdftk/pdftk.exe like this:
* pdftk form.pdf fill_form data.fdf output out.pdf flatten
* (pdftk form.filled.pdf output out.pdf flatten is not supported)
*
* If the input FDF file includes Rich Text formatted data in
* addition to plain text, then the Rich Text data is packed
* into the form fields as well as the plain text. Pdftk also
* sets a flag that cues Acrobat/Reader to generate new field
* appearances based on the Rich Text data. That way, when the
* user opens the PDF, the viewer will create the Rich Text
* fields on the spot. If the user's PDF viewer does not sup-
* port Rich Text, then the user will see the plain text data
* instead. If you flatten this form before Acrobat has a
* chance to create (and save) new field appearances, then the
* plain text field data is what you'll see.
*
*@internal Wrapper to call pdftk, a shell command, in background.
*@param String pdf_file absolute pathname to a pdf form file
*@param String fdf_file absolute pathname to a pdf data file
*@param String settings
*
* Output modes 'compress', 'uncompress', 'flatten' ..(see pdftk --help)
*@return Array an associative array with two keys:
* Boolean success a flag , if positive meaning the process is a success
* String return the path to the pdf generated or the error message
**/
function pdftk($pdf_file,$fdf_file,$settings) {
//------------------------------------------
$descriptorspec = array(
0 => array("pipe", "r"), // // stdin
1 => array("pipe", "w"), // stdout
2 => array("pipe", "w") // stderr
);
$output_modes=$settings['output_modes'];
$security=$settings['security'];
$cwd = '/tmp';
$env = array('misc_options' => 'aeiou');
$err='';
$success=0;
if(is_windows()) {
$cmd="pdftk.exe"; //For windows
}else{
$cmd="pdftk"; //For linux and mac
}
$dircmd=fix_path(dirname(__file__));
if(file_exists("$dircmd/$cmd")) {
$pdf_out=FPDM_CACHE."pdf_flatten.pdf";
$cmdline="$dircmd/$cmd \"$pdf_file\" fill_form \"$fdf_file\" output \"$pdf_out\" $output_modes $security"; //direct to ouptut
//echo htmlentities("$cmdline , $descriptorspec, $cwd, $env");
if(PHP5_ENGINE) { // Php5
$process = proc_open($cmdline, $descriptorspec, $pipes, $cwd, $env);
}else { //Php4
$process = proc_open($cmdline, $descriptorspec, $pipes);
}
if (is_resource($process)) {
if(PHP5_ENGINE) {
$err=stream_get_contents($pipes[2]);
}else { //Php4
$err= "";
while (($str = fgets($pipes[2], 4096))) {
$err.= "$str\n";
}
}
fclose($pipes[2]);
//Its important to close the pipes before proc_close call to avoid dead locks
$return_value = proc_close($process);
}else {
$err="No more resource to execute the command";
}
}else {
$err="Sorry but pdftk binary is not provided / Cette fonctionnalite requiere pdftk non fourni ici<ol>";
$err.="<li>download it from / telecharger ce dernier a partir de <br><blockquote><a href=\"http://www.pdflabs.com/docs/install-pdftk/\">pdflabs</a></blockquote>";
$err.="<li>copy the executable in this directory / Copier l'executable dans<br><blockquote><b>$dircmd</b></blockquote>" ;
$err.="<li>set \$cmd to match binary name in / configurer \$cmd pour qu'il corresponde dans le fichier<br><blockquote><b>".__file__."</b></blockquote></ol>";
}
if($err) {
$ret=array("success"=> false,"return"=>$err);
}else
$ret=array("success"=> true,"return"=>$pdf_out);
return $ret;
}
?>

View File

@@ -0,0 +1,454 @@
pdftk 1.43 a Handy Tool for Manipulating PDF Documents
Copyright (C) 2003-10, Sid Steward - Please Visit: www.pdftk.com
This is free software; see the source code for copying conditions. There is
NO warranty, not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
SYNOPSIS
pdftk <input PDF files | - | PROMPT>
[input_pw <input PDF owner passwords | PROMPT>]
[<operation> <operation arguments>]
[output <output filename | - | PROMPT>]
[encrypt_40bit | encrypt_128bit]
[allow <permissions>]
[owner_pw <owner password | PROMPT>]
[user_pw <user password | PROMPT>]
[flatten] [compress | uncompress]
[keep_first_id | keep_final_id] [drop_xfa]
[verbose] [dont_ask | do_ask]
Where:
<operation> may be empty, or:
[cat | attach_files | unpack_files | burst |
fill_form | background | stamp | generate_fdf |
multibackground | multistamp |
dump_data | dump_data_fields | update_info]
For Complete Help: pdftk --help
DESCRIPTION
If PDF is electronic paper, then pdftk is an electronic staple-remover,
hole-punch, binder, secret-decoder-ring, and X-Ray-glasses. Pdftk is a
simple tool for doing everyday things with PDF documents. Use it to:
* Merge PDF Documents
* Split PDF Pages into a New Document
* Rotate PDF Documents or Pages
* Decrypt Input as Necessary (Password Required)
* Encrypt Output as Desired
* Fill PDF Forms with X/FDF Data and/or Flatten Forms
* Generate FDF Data Stencil from PDF Forms
* Apply a Background Watermark or a Foreground Stamp
* Report PDF Metrics such as Metadata and Bookmarks
* Update PDF Metadata
* Attach Files to PDF Pages or the PDF Document
* Unpack PDF Attachments
* Burst a PDF Document into Single Pages
* Uncompress and Re-Compress Page Streams
* Repair Corrupted PDF (Where Possible)
OPTIONS
A summary of options is included below.
--help, -h
Show summary of options.
<input PDF files | - | PROMPT>
A list of the input PDF files. If you plan to combine these PDFs
(without using handles) then list files in the order you want
them combined. Use - to pass a single PDF into pdftk via stdin.
Input files can be associated with handles, where a handle is a
single, upper-case letter:
<input PDF handle>=<input PDF filename>
Handles are often omitted. They are useful when specifying PDF
passwords or page ranges, later.
For example: A=input1.pdf B=input2.pdf
[input_pw <input PDF owner passwords | PROMPT>]
Input PDF owner passwords, if necessary, are associated with
files by using their handles:
<input PDF handle>=<input PDF file owner password>
If handles are not given, then passwords are associated with
input files by order.
Most pdftk features require that encrypted input PDF are accom-
panied by the ~owner~ password. If the input PDF has no owner
password, then the user password must be given, instead. If the
input PDF has no passwords, then no password should be given.
When running in do_ask mode, pdftk will prompt you for a pass-
word if the supplied password is incorrect or none was given.
[<operation> <operation arguments>]
If this optional argument is omitted, then pdftk runs in 'fil-
ter' mode. Filter mode takes only one PDF input and creates a
new PDF after applying all of the output options, like encryp-
tion and compression.
Available operations are: cat, attach_files, unpack_files,
burst, fill_form, background, stamp, multibackground, multi-
stamp, dump_data, dump_data_fields, generate_fdf, update_info.
Some operations takes additional arguments, described below.
cat [<page ranges>]
Catenates pages from input PDFs to create a new PDF. Page
order in the new PDF is specified by the order of the given
page ranges. Page ranges are described like this:
<input PDF handle>[<begin page number>[-<end page num-
ber>[<qualifier>]]][<page rotation>]
Where the handle identifies one of the input PDF files, and
the beginning and ending page numbers are one-based refer-
ences to pages in the PDF file, and the qualifier can be even
or odd, and the page rotation can be N, S, E, W, L, R, or D.
If the handle is omitted from the page range, then the pages
are taken from the first input PDF.
The even qualifier causes pdftk to use only the even-numbered
PDF pages, so 1-6even yields pages 2, 4 and 6 in that order.
6-1even yields pages 6, 4 and 2 in that order.
The odd qualifier works similarly to the even.
The page rotation setting can cause pdftk to rotate pages and
documents. Each option sets the page rotation as follows (in
degrees): N: 0, E: 90, S: 180, W: 270, L: -90, R: +90, D:
+180. L, R, and D make relative adjustments to a page's rota-
tion.
If no arguments are passed to cat, then pdftk combines all
input PDFs in the order they were given to create the output.
NOTES:
* <end page number> may be less than <begin page number>.
* The keyword end may be used to reference the final page of
a document instead of a page number.
* Reference a single page by omitting the ending page number.
* The handle may be used alone to represent the entire PDF
document, e.g., B1-end is the same as B.
Page Range Examples w/o Handles:
1-endE - rotate entire document 90 degrees
5 11 20
5-25oddW - take odd pages in range, rotate 90 degrees
6-1
Page Range Examples Using Handles:
Say A=in1.pdf B=in2.pdf, then:
A1-21
Bend-1odd
A72
A1-21 Beven A72
AW - rotate entire document 90 degrees
B
A2-30evenL - take the even pages from the range, remove 90
degrees from each page's rotation
A A
AevenW AoddE
AW BW BD
attach_files <attachment filenames | PROMPT> [to_page <page number |
PROMPT>]
Packs arbitrary files into a PDF using PDF's file attachment
features. More than one attachment may be listed after
attach_files. Attachments are added at the document level
unless the optional to_page option is given, in which case
the files are attached to the given page number (the first
page is 1, the final page is end). For example:
pdftk in.pdf attach_files table1.html table2.html to_page 6
output out.pdf
unpack_files
Copies all of the attachments from the input PDF into the
current folder or to an output directory given after output.
For example:
pdftk report.pdf unpack_files output ~/atts/
or, interactively:
pdftk report.pdf unpack_files output PROMPT
burst Splits a single, input PDF document into individual pages.
Also creates a report named doc_data.txt which is the same as
the output from dump_data. If the output section is omitted,
then PDF pages are named: pg_%04d.pdf, e.g.: pg_0001.pdf,
pg_0002.pdf, etc. To name these pages yourself, supply a
printf-styled format string via the output section. For
example, if you want pages named: page_01.pdf, page_02.pdf,
etc., pass output page_%02d.pdf to pdftk. Encryption can be
applied to the output by appending output options such as
owner_pw, e.g.:
pdftk in.pdf burst owner_pw foopass
fill_form <FDF data filename | XFDF data filename | - | PROMPT>
Fills the single input PDF's form fields with the data from
an FDF file, XFDF file or stdin. Enter the data filename
after fill_form, or use - to pass the data via stdin, like
so:
pdftk form.pdf fill_form data.fdf output form.filled.pdf
After filling a form, the form fields remain interactive
unless you also use the flatten output option. flatten merges
the form fields with the PDF pages. You can use flatten
alone, too, but only on a single PDF:
pdftk form.pdf fill_form data.fdf output out.pdf flatten
or:
pdftk form.filled.pdf output out.pdf flatten
If the input FDF file includes Rich Text formatted data in
addition to plain text, then the Rich Text data is packed
into the form fields as well as the plain text. Pdftk also
sets a flag that cues Acrobat/Reader to generate new field
appearances based on the Rich Text data. That way, when the
user opens the PDF, the viewer will create the Rich Text
fields on the spot. If the user's PDF viewer does not sup-
port Rich Text, then the user will see the plain text data
instead. If you flatten this form before Acrobat has a
chance to create (and save) new field appearances, then the
plain text field data is what you'll see.
background <background PDF filename | - | PROMPT>
Applies a PDF watermark to the background of a single input
PDF. Pass the background PDF's filename after background
like so:
pdftk in.pdf background back.pdf output out.pdf
Pdftk uses only the first page from the background PDF and
applies it to every page of the input PDF. This page is
scaled and rotated as needed to fit the input page. You can
use - to pass a background PDF into pdftk via stdin.
If the input PDF does not have a transparent background (such
as a PDF created from page scans) then the resulting back-
ground won't be visible -- use the stamp feature instead.
multibackground <background PDF filename | - | PROMPT>
Same as the background feature, but applies each page of the
background PDF to the corresponding page of the input PDF.
If the input PDF has more pages than the stamp PDF, then the
final stamp page is repeated across these remaining pages in
the input PDF.
stamp <stamp PDF filename | - | PROMPT>
This behaves just like the background feature except it over-
lays the stamp PDF page on top of the input PDF document's
pages. This works best if the stamp PDF page has a transpar-
ent background.
multistamp <stamp PDF filename | - | PROMPT>
Same as the stamp feature, but applies each page of the back-
ground PDF to the corresponding page of the input PDF. If
the input PDF has more pages than the stamp PDF, then the
final stamp page is repeated across these remaining pages in
the input PDF.
dump_data
Reads a single, input PDF file and reports various statis-
tics, metadata, bookmarks (a/k/a outlines), and page labels
to the given output filename or (if no output is given) to
stdout. Does not create a new PDF.
dump_data_fields
Reads a single, input PDF file and reports form field statis-
tics to the given output filename or (if no output is given)
to stdout. Does not create a new PDF.
generate_fdf
Reads a single, input PDF file and generates a FDF file suit-
able for fill_form out of it to the given output filename or
(if no output is given) to stdout. Does not create a new
PDF.
update_info <info data filename | - | PROMPT>
Changes the metadata stored in a single PDF's Info dictionary
to match the input data file. The input data file uses the
same syntax as the output from dump_data. This does not
change the metadata stored in the PDF's XMP stream, if it has
one. For example:
pdftk in.pdf update_info in.info output out.pdf
[output <output filename | - | PROMPT>]
The output PDF filename may not be set to the name of an input
filename. Use - to output to stdout. When using the dump_data
operation, use output to set the name of the output data file.
When using the unpack_files operation, use output to set the
name of an output directory. When using the burst operation,
you can use output to control the resulting PDF page filenames
(described above).
[encrypt_40bit | encrypt_128bit]
If an output PDF user or owner password is given, output PDF
encryption strength defaults to 128 bits. This can be overrid-
den by specifying encrypt_40bit.
[allow <permissions>]
Permissions are applied to the output PDF only if an encryption
strength is specified or an owner or user password is given. If
permissions are not specified, they default to 'none,' which
means all of the following features are disabled.
The permissions section may include one or more of the following
features:
Printing
Top Quality Printing
DegradedPrinting
Lower Quality Printing
ModifyContents
Also allows Assembly
Assembly
CopyContents
Also allows ScreenReaders
ScreenReaders
ModifyAnnotations
Also allows FillIn
FillIn
AllFeatures
Allows the user to perform all of the above, and top
quality printing.
[owner_pw <owner password | PROMPT>]
[user_pw <user password | PROMPT>]
If an encryption strength is given but no passwords are sup-
plied, then the owner and user passwords remain empty, which
means that the resulting PDF may be opened and its security
parameters altered by anybody.
[compress | uncompress]
These are only useful when you want to edit PDF code in a text
editor like vim or emacs. Remove PDF page stream compression by
applying the uncompress filter. Use the compress filter to
restore compression.
[flatten]
Use this option to merge an input PDF's interactive form fields
(and their data) with the PDF's pages. Only one input PDF may be
given. Sometimes used with the fill_form operation.
[keep_first_id | keep_final_id]
When combining pages from multiple PDFs, use one of these
options to copy the document ID from either the first or final
input document into the new output PDF. Otherwise pdftk creates
a new document ID for the output PDF. When no operation is
given, pdftk always uses the ID from the (single) input PDF.
[drop_xfa]
If your input PDF is a form created using Acrobat 7 or Adobe
Designer, then it probably has XFA data. Filling such a form
using pdftk yields a PDF with data that fails to display in
Acrobat 7 (and 6?). The workaround solution is to remove the
form's XFA data, either before you fill the form using pdftk or
at the time you fill the form. Using this option causes pdftk to
omit the XFA data from the output PDF form.
This option is only useful when running pdftk on a single input
PDF. When assembling a PDF from multiple inputs using pdftk,
any XFA data in the input is automatically omitted.
[verbose]
By default, pdftk runs quietly. Append verbose to the end and it
will speak up.
[dont_ask | do_ask]
Depending on the compile-time settings (see ASK_ABOUT_WARNINGS),
pdftk might prompt you for further input when it encounters a
problem, such as a bad password. Override this default behavior
by adding dont_ask (so pdftk won't ask you what to do) or do_ask
(so pdftk will ask you what to do).
When running in dont_ask mode, pdftk will over-write files with
its output without notice.
EXAMPLES
Decrypt a PDF
pdftk secured.pdf input_pw foopass output unsecured.pdf
Encrypt a PDF using 128-bit strength (the default), withhold all per-
missions (the default)
pdftk 1.pdf output 1.128.pdf owner_pw foopass
Same as above, except password 'baz' must also be used to open output
PDF
pdftk 1.pdf output 1.128.pdf owner_pw foo user_pw baz
Same as above, except printing is allowed (once the PDF is open)
pdftk 1.pdf output 1.128.pdf owner_pw foo user_pw baz allow printing
Join in1.pdf and in2.pdf into a new PDF, out1.pdf
pdftk in1.pdf in2.pdf cat output out1.pdf
or (using handles):
pdftk A=in1.pdf B=in2.pdf cat A B output out1.pdf
or (using wildcards):
pdftk *.pdf cat output combined.pdf
Remove 'page 13' from in1.pdf to create out1.pdf
pdftk in.pdf cat 1-12 14-end output out1.pdf
or:
pdftk A=in1.pdf cat A1-12 A14-end output out1.pdf
Apply 40-bit encryption to output, revoking all permissions (the
default). Set the owner PW to 'foopass'.
pdftk 1.pdf 2.pdf cat output 3.pdf encrypt_40bit owner_pw foopass
Join two files, one of which requires the password 'foopass'. The out-
put is not encrypted.
pdftk A=secured.pdf 2.pdf input_pw A=foopass cat output 3.pdf
Uncompress PDF page streams for editing the PDF in a text editor (e.g.,
vim, emacs)
pdftk doc.pdf output doc.unc.pdf uncompress
Repair a PDF's corrupted XREF table and stream lengths, if possible
pdftk broken.pdf output fixed.pdf
Burst a single PDF document into pages and dump its data to
doc_data.txt
pdftk in.pdf burst
Burst a single PDF document into encrypted pages. Allow low-quality
printing
pdftk in.pdf burst owner_pw foopass allow DegradedPrinting
Write a report on PDF document metadata and bookmarks to report.txt
pdftk in.pdf dump_data output report.txt
Rotate the first PDF page to 90 degrees clockwise
pdftk in.pdf cat 1E 2-end output out.pdf
Rotate an entire PDF document to 180 degrees
pdftk in.pdf cat 1-endS output out.pdf
NOTES
The pdftk home page permalink is:
http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/
The easy-to-remember shortcut is: www.pdftk.com
AUTHOR
Sid Steward (sid.steward at pdflabs dot com) maintains pdftk. Please
email him with questions or bug reports. Include pdftk in the subject
line to ensure successful delivery. Thank you.

12
libs/fpdm/src/fields.fdf Normal file
View File

@@ -0,0 +1,12 @@
%FDF-1.2
%âăĎÓ
1 0 obj
<<
/FDF <</Fields [<</T (name) /V (My name)>> <</T (address) /V (My address)>> <</T (city) /V (My city)>> <</T (phone) /V (My phone number)>>] /F (template.pdf)>>
>>
endobj
trailer
<<
/Root 1 0 R
>>
%%EOF

View File

@@ -0,0 +1,108 @@
<?php
//
// FPDI - Version 1.3.4
//
// Copyright 2004-2010 Setasign - Jan Slabon
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
if (!defined('ORD_z'))
define('ORD_z',ord('z'));
if (!defined('ORD_exclmark'))
define('ORD_exclmark', ord('!'));
if (!defined('ORD_u'))
define('ORD_u', ord('u'));
if (!defined('ORD_tilde'))
define('ORD_tilde', ord('~'));
$__tmp = version_compare(phpversion(), "5") == -1 ? array('FilterASCII85') : array('FilterASCII85', false);
if (!call_user_func_array('class_exists', $__tmp)) {
if(isset($FPDM_FILTERS)) array_push($FPDM_FILTERS,"ASCII85Decode");
class FilterASCII85 {
function error($msg) {
die($msg);
}
function decode($in) {
$out = '';
$state = 0;
$chn = null;
$l = strlen($in);
for ($k = 0; $k < $l; ++$k) {
$ch = ord($in[$k]) & 0xff;
if ($ch == ORD_tilde) {
break;
}
if (preg_match('/^\s$/',chr($ch))) {
continue;
}
if ($ch == ORD_z && $state == 0) {
$out .= chr(0).chr(0).chr(0).chr(0);
continue;
}
if ($ch < ORD_exclmark || $ch > ORD_u) {
return $this->error('Illegal character in ASCII85Decode.');
}
$chn[$state++] = $ch - ORD_exclmark;
if ($state == 5) {
$state = 0;
$r = 0;
for ($j = 0; $j < 5; ++$j)
$r = $r * 85 + $chn[$j];
$out .= chr($r >> 24);
$out .= chr($r >> 16);
$out .= chr($r >> 8);
$out .= chr($r);
}
}
$r = 0;
if ($state == 1)
return $this->error('Illegal length in ASCII85Decode.');
if ($state == 2) {
$r = $chn[0] * 85 * 85 * 85 * 85 + ($chn[1]+1) * 85 * 85 * 85;
$out .= chr($r >> 24);
}
else if ($state == 3) {
$r = $chn[0] * 85 * 85 * 85 * 85 + $chn[1] * 85 * 85 * 85 + ($chn[2]+1) * 85 * 85;
$out .= chr($r >> 24);
$out .= chr($r >> 16);
}
else if ($state == 4) {
$r = $chn[0] * 85 * 85 * 85 * 85 + $chn[1] * 85 * 85 * 85 + $chn[2] * 85 * 85 + ($chn[3]+1) * 85 ;
$out .= chr($r >> 24);
$out .= chr($r >> 16);
$out .= chr($r >> 8);
}
return $out;
}
function encode($in) {
return $this->error("ASCII85 encoding not implemented.");
}
}
}
unset($__tmp);

View File

@@ -0,0 +1,65 @@
<?php
//
// FPDM - Filter ASCII Hex
// NOTE: Not tested but should work.
//
if(isset($FPDM_FILTERS)) array_push($FPDM_FILTERS,"ASCIIHexDecode");
class FilterASCIIHex {
/**
*Get a binary string from its hexadecimal representation
*
*@internal same as _hex2bin ($hexString)
*@access public
*@note Function was written because PHP has a bin2hex, but not a hex2bin!
*@internal note pack(“C”,hexdec(substr($data,$i,2))) DOES NOT WORK
*
**/
function decode($data) {
$hexString=$data;
$BinStr = '';
$hexLength=strlen($hexString);
// only hex numbers is allowed
if ($hexLength % 2 != 0 || preg_match("/[^\da-fA-F]/",$hexString)) return FALSE;
//Loop through the input and convert it
for ($i = 0; $i < $hexLength; $i += 2)
$BinStr .= '%'.substr ($hexString, $i, 2);
// Raw url-decode and return the result
return rawurldecode ($BinStr);//chr(hexdec())
}
/**
*Encodes a binary string to its hexadecimal representation
*
*@internal same as bin2hex
*@access public
*@internal dechex(ord($str{$i})); is buggy because for hex value of 0-15 heading 0 is missing! Using sprintf() to get it right.
*@param string $str a binary string
*@return string hex the hexified string
**/
function encode($data) {
//----------------------
$str=$data;
$hex = "";
$i = 0;
do {
$hex .= sprintf("%02x", ord($str{$i}));
$i++;
} while ($i < strlen($str));
return $hex;
}
}
?>

View File

@@ -0,0 +1,49 @@
<?php
//
// FPDM - Filter Flate
// NOTE: requires ZLIB >= 1.0.9!
//
$__tmp = version_compare(phpversion(), "5") == -1 ? array('FilterFlateDecode') : array('FilterFlateDecode', false);
if (!call_user_func_array('class_exists', $__tmp)) {
if(isset($FPDM_FILTERS)) array_push($FPDM_FILTERS,"FlateDecode");
class FilterFlate {
var $data = null;
var $dataLength = 0;
function error($msg) {
die($msg);
}
/**
* Method to decode GZIP compressed data.
*
* @param string data The compressed data.
* @return uncompressed data
*/
function decode($data) {
$this->data = $data;
$this->dataLength = strlen($data);
// uncompress
$data=gzuncompress($data);
if(!$data) $this->error("FilterFlateDecode: invalid stream data.");
return $data;
}
function encode($in) {
return gzcompress($in, 9);
}
}
}
//unset $__tmp;
?>

View File

@@ -0,0 +1,162 @@
<?php
//
// FPDI - Version 1.3.4
//
// Copyright 2004-2010 Setasign - Jan Slabon
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
$__tmp = version_compare(phpversion(), "5") == -1 ? array('FilterLZW') : array('FilterLZW', false);
if (!call_user_func_array('class_exists', $__tmp)) {
if(isset($FPDM_FILTERS)) array_push($FPDM_FILTERS,"LZWDecode");
class FilterLZW {
var $sTable = array();
var $data = null;
var $dataLength = 0;
var $tIdx;
var $bitsToGet = 9;
var $bytePointer;
var $bitPointer;
var $nextData = 0;
var $nextBits = 0;
var $andTable = array(511, 1023, 2047, 4095);
function error($msg) {
die($msg);
}
/**
* Method to decode LZW compressed data.
*
* @param string data The compressed data.
*/
function decode($data) {
if($data[0] == 0x00 && $data[1] == 0x01) {
$this->error('LZW flavour not supported.');
}
$this->initsTable();
$this->data = $data;
$this->dataLength = strlen($data);
// Initialize pointers
$this->bytePointer = 0;
$this->bitPointer = 0;
$this->nextData = 0;
$this->nextBits = 0;
$oldCode = 0;
$string = '';
$uncompData = '';
while (($code = $this->getNextCode()) != 257) {
if ($code == 256) {
$this->initsTable();
$code = $this->getNextCode();
if ($code == 257) {
break;
}
$uncompData .= $this->sTable[$code];
$oldCode = $code;
} else {
if ($code < $this->tIdx) {
$string = $this->sTable[$code];
$uncompData .= $string;
$this->addStringToTable($this->sTable[$oldCode], $string[0]);
$oldCode = $code;
} else {
$string = $this->sTable[$oldCode];
$string = $string.$string[0];
$uncompData .= $string;
$this->addStringToTable($string);
$oldCode = $code;
}
}
}
return $uncompData;
}
/**
* Initialize the string table.
*/
function initsTable() {
$this->sTable = array();
for ($i = 0; $i < 256; $i++)
$this->sTable[$i] = chr($i);
$this->tIdx = 258;
$this->bitsToGet = 9;
}
/**
* Add a new string to the string table.
*/
function addStringToTable ($oldString, $newString='') {
$string = $oldString.$newString;
// Add this new String to the table
$this->sTable[$this->tIdx++] = $string;
if ($this->tIdx == 511) {
$this->bitsToGet = 10;
} else if ($this->tIdx == 1023) {
$this->bitsToGet = 11;
} else if ($this->tIdx == 2047) {
$this->bitsToGet = 12;
}
}
// Returns the next 9, 10, 11 or 12 bits
function getNextCode() {
if ($this->bytePointer == $this->dataLength) {
return 257;
}
$this->nextData = ($this->nextData << 8) | (ord($this->data[$this->bytePointer++]) & 0xff);
$this->nextBits += 8;
if ($this->nextBits < $this->bitsToGet) {
$this->nextData = ($this->nextData << 8) | (ord($this->data[$this->bytePointer++]) & 0xff);
$this->nextBits += 8;
}
$code = ($this->nextData >> ($this->nextBits - $this->bitsToGet)) & $this->andTable[$this->bitsToGet-9];
$this->nextBits -= $this->bitsToGet;
return $code;
}
function encode($in) {
$this->error("LZW encoding not implemented.");
}
}
}
unset($__tmp);

View File

@@ -0,0 +1,20 @@
<?php
//
// FPDM - Filter Standard
// NOTE: dummy filter for unfiltered streams!
//
if(isset($FPDM_FILTERS)) array_push($FPDM_FILTERS,"Standard");
class FilterStandard {
function decode($data) {
return $data;
}
function encode($data) {
return $data;
}
}
?>

2233
libs/fpdm/src/fpdm.php Normal file

File diff suppressed because it is too large Load Diff

184
libs/fpdm/src/lib/url.php Normal file
View File

@@ -0,0 +1,184 @@
<?php
/****************************************************************
*@file url.php
*@name Url manipulation toolbox
*@internal Useful functions to deal with URLs
*@package URL_TOOLBOX
*@date 2010-10-27
*@author 0livier
*@version 1.0
*@note
* V1.0 (27.10.2010) First release
******************************************************************/
if (!defined('URL_TOOLBOX')) {
function getScheme(/*$port is optional*/) {
//---------------------------------------
$numargs = func_num_args();
$port=($numargs >0) ? func_get_arg(0) : $_SERVER["SERVER_PORT"];
$schemes=array(
'http'=> 80,// default for http
'https'=> 443, // default for https
'ftp' => 21, // default for ftp
'ftps'=> 990 // default for ftps
);
$ports=array_flip($schemes);
return (array_key_exists($port,$ports)) ? $ports[$port] : 0;
}
function getHost() {
//------------------
return $_SERVER["HTTP_HOST"];// [SERVER_NAME]
}
if (!function_exists('fix_path')) {
// fixes windows paths...
// (windows accepts forward slashes and backwards slashes, so why does PHP use backwards?
function fix_path($path) {
//-------------------------
return str_replace('\\','/',$path);
}
}
function getWebDir($local_dir) {
//----------------------------
$local_root=$_SERVER["DOCUMENT_ROOT"];
$server_dir=str_replace($local_root,'',$local_dir);
return $server_dir;
}
//Local dir may be:
// the main script dir: dirname($_SERVER['PHP_SELF'])
// the current script dir fix_path(dirname(__FILE__))
//return the full url with ending /
function getUrlfromDir($local_dir) {
//-------------------------------
$server_dir=getWebDir($local_dir);
$server_scheme=getScheme();
$server_host=getHost();
return "{$server_scheme}://{$server_host}/$server_dir";
}
/**
* Compiles url out of array of it's pieces
* 'query' is ignored if 'query_params' is present
*
* @param Array $aUrl Array of url pieces
*/
function build_url($aUrl) {
//-------------------------
//[scheme]://[user]:[pass]@[host]/[path]?[query]#[fragment]
if (!is_array($aUrl)) {
return "";
}
$sQuery = '';
// Compile query
if (isset($aUrl['query_params']) && is_array($aUrl['query_params'])) {
$aPairs = array();
foreach ($aUrl['query_params'] as $sKey=>$sValue) {
$aPairs[] = $sKey.'='.urlencode($sValue);
}
$sQuery = implode('&', $aPairs);
} else {
if(isset($aUrl['query'])) $sQuery = $aUrl['query'];
}
// Compile url
$sUrl =
$aUrl['scheme'] . '://' . (
isset($aUrl['user']) && $aUrl['user'] != '' && isset($aUrl['pass'])
? $aUrl['user'] . ':' . $aUrl['pass'] . '@'
: ''
) .
$aUrl['host'] . (
isset($aUrl['path']) && $aUrl['path'] != ''
? $aUrl['path']
: ''
) . (
$sQuery != ''
? '?' . $sQuery
: ''
) . (
isset($aUrl['fragment']) && $aUrl['fragment'] != ''
? '#' . $aUrl['fragment']
: ''
);
return $sUrl;
}
function resolve_url($relative_url) {
//-----------------------------
$url=parse_url($relative_url);
$url["path"]=resolve_path($url["path"]); //fix this
$absolute_url=build_url($url);
return $absolute_url;
}
//Get realpath without checking existence of file like php function does..
function resolve_path($path) {
//----------------------------------
$out=array();
foreach(explode('/', $path) as $i=>$fold){
if ($fold=='' || $fold=='.') continue;
if ($fold=='..' && $i>0 && end($out)!='..') array_pop($out);
else $out[]= $fold;
} return ($path{0}=='/'?'/':'').join('/', $out);
}
//This part is from http://fr2.php.net/manual/en/function.parse-url.php
function j_parseUrl($url) {
//--------------------------
$r = "(?:([a-z0-9+-._]+)://)?";
$r .= "(?:";
$r .= "(?:((?:[a-z0-9-._~!$&'()*+,;=:]|%[0-9a-f]{2})*)@)?";
$r .= "(?:\[((?:[a-z0-9:])*)\])?";
$r .= "((?:[a-z0-9-._~!$&'()*+,;=]|%[0-9a-f]{2})*)";
$r .= "(?::(\d*))?";
$r .= "(/(?:[a-z0-9-._~!$&'()*+,;=:@/]|%[0-9a-f]{2})*)?";
$r .= "|";
$r .= "(/?";
$r .= "(?:[a-z0-9-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+";
$r .= "(?:[a-z0-9-._~!$&'()*+,;=:@\/]|%[0-9a-f]{2})*";
$r .= ")?";
$r .= ")";
$r .= "(?:\?((?:[a-z0-9-._~!$&'()*+,;=:\/?@]|%[0-9a-f]{2})*))?";
$r .= "(?:#((?:[a-z0-9-._~!$&'()*+,;=:\/?@]|%[0-9a-f]{2})*))?";
preg_match("`$r`i", $url, $match);
$parts = array(
"scheme"=>'',
"userinfo"=>'',
"authority"=>'',
"host"=> '',
"port"=>'',
"path"=>'',
"query"=>'',
"fragment"=>'');
switch (count ($match)) {
case 10: $parts['fragment'] = $match[9];
case 9: $parts['query'] = $match[8];
case 8: $parts['path'] = $match[7];
case 7: $parts['path'] = $match[6] . $parts['path'];
case 6: $parts['port'] = $match[5];
case 5: $parts['host'] = $match[3]?"[".$match[3]."]":$match[4];
case 4: $parts['userinfo'] = $match[2];
case 3: $parts['scheme'] = $match[1];
}
$parts['authority'] = ($parts['userinfo']?$parts['userinfo']."@":"").
$parts['host'].
($parts['port']?":".$parts['port']:"");
return $parts;
}
define('URL_TOOLBOX',1);
}//End of URL_TOOLBOX
?>

BIN
libs/fpdm/src/template.pdf Normal file

Binary file not shown.

25
style/DejaVuSans.php Normal file
View File

@@ -0,0 +1,25 @@
<?php
$type = 'TrueType';
$name = 'DejaVuSans';
$desc = array('Ascent'=>760,'Descent'=>-240,'CapHeight'=>760,'Flags'=>32,'FontBBox'=>'[-1021 -356 1681 1167]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>600);
$up = -63;
$ut = 44;
$cw = array(
chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>318,'!'=>401,'"'=>460,'#'=>838,'$'=>636,'%'=>950,'&'=>780,'\''=>275,'('=>390,')'=>390,'*'=>500,'+'=>838,
','=>318,'-'=>361,'.'=>318,'/'=>337,'0'=>636,'1'=>636,'2'=>636,'3'=>636,'4'=>636,'5'=>636,'6'=>636,'7'=>636,'8'=>636,'9'=>636,':'=>337,';'=>337,'<'=>838,'='=>838,'>'=>838,'?'=>531,'@'=>1000,'A'=>684,
'B'=>686,'C'=>698,'D'=>770,'E'=>632,'F'=>575,'G'=>775,'H'=>752,'I'=>295,'J'=>295,'K'=>656,'L'=>557,'M'=>863,'N'=>748,'O'=>787,'P'=>603,'Q'=>787,'R'=>695,'S'=>635,'T'=>611,'U'=>732,'V'=>684,'W'=>989,
'X'=>685,'Y'=>611,'Z'=>685,'['=>390,'\\'=>337,']'=>390,'^'=>838,'_'=>500,'`'=>500,'a'=>613,'b'=>635,'c'=>550,'d'=>635,'e'=>615,'f'=>352,'g'=>635,'h'=>634,'i'=>278,'j'=>278,'k'=>579,'l'=>278,'m'=>974,
'n'=>634,'o'=>612,'p'=>635,'q'=>635,'r'=>411,'s'=>521,'t'=>392,'u'=>634,'v'=>592,'w'=>818,'x'=>592,'y'=>592,'z'=>525,'{'=>636,'|'=>337,'}'=>636,'~'=>838,chr(127)=>600,chr(128)=>636,chr(129)=>600,chr(130)=>318,chr(131)=>352,
chr(132)=>518,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>500,chr(137)=>1342,chr(138)=>635,chr(139)=>400,chr(140)=>1070,chr(141)=>600,chr(142)=>685,chr(143)=>600,chr(144)=>600,chr(145)=>318,chr(146)=>318,chr(147)=>518,chr(148)=>518,chr(149)=>590,chr(150)=>500,chr(151)=>1000,chr(152)=>500,chr(153)=>1000,
chr(154)=>521,chr(155)=>400,chr(156)=>1023,chr(157)=>600,chr(158)=>525,chr(159)=>611,chr(160)=>318,chr(161)=>401,chr(162)=>636,chr(163)=>636,chr(164)=>636,chr(165)=>636,chr(166)=>337,chr(167)=>500,chr(168)=>500,chr(169)=>1000,chr(170)=>471,chr(171)=>612,chr(172)=>838,chr(173)=>361,chr(174)=>1000,chr(175)=>500,
chr(176)=>500,chr(177)=>838,chr(178)=>401,chr(179)=>401,chr(180)=>500,chr(181)=>636,chr(182)=>636,chr(183)=>318,chr(184)=>500,chr(185)=>401,chr(186)=>471,chr(187)=>612,chr(188)=>969,chr(189)=>969,chr(190)=>969,chr(191)=>531,chr(192)=>684,chr(193)=>684,chr(194)=>684,chr(195)=>684,chr(196)=>684,chr(197)=>684,
chr(198)=>974,chr(199)=>698,chr(200)=>632,chr(201)=>632,chr(202)=>632,chr(203)=>632,chr(204)=>295,chr(205)=>295,chr(206)=>295,chr(207)=>295,chr(208)=>775,chr(209)=>748,chr(210)=>787,chr(211)=>787,chr(212)=>787,chr(213)=>787,chr(214)=>787,chr(215)=>838,chr(216)=>787,chr(217)=>732,chr(218)=>732,chr(219)=>732,
chr(220)=>732,chr(221)=>611,chr(222)=>605,chr(223)=>630,chr(224)=>613,chr(225)=>613,chr(226)=>613,chr(227)=>613,chr(228)=>613,chr(229)=>613,chr(230)=>982,chr(231)=>550,chr(232)=>615,chr(233)=>615,chr(234)=>615,chr(235)=>615,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>612,chr(241)=>634,
chr(242)=>612,chr(243)=>612,chr(244)=>612,chr(245)=>612,chr(246)=>612,chr(247)=>838,chr(248)=>612,chr(249)=>634,chr(250)=>634,chr(251)=>634,chr(252)=>634,chr(253)=>592,chr(254)=>635,chr(255)=>592);
$enc = 'cp1252';
$uv = array(0=>array(0,128),128=>8364,130=>8218,131=>402,132=>8222,133=>8230,134=>array(8224,2),136=>710,137=>8240,138=>352,139=>8249,140=>338,142=>381,145=>array(8216,2),147=>array(8220,2),149=>8226,150=>array(8211,2),152=>732,153=>8482,154=>353,155=>8250,156=>339,158=>382,159=>376,160=>array(160,96));
$file = 'DejaVuSans.z';
$originalsize = 52104;
$subsetted = true;
?>

BIN
style/DejaVuSans.ttf Normal file

Binary file not shown.

BIN
style/DejaVuSans.z Normal file

Binary file not shown.

Binary file not shown.

1
vendor/autoload.php vendored
View File

@@ -21,4 +21,5 @@ if (PHP_VERSION_ID < 50600) {
}
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitb3a3dfb766a515d49b7f8665bad574b3::getLoader();

View File

@@ -8,9 +8,24 @@ $baseDir = dirname($vendorDir);
return array(
'Attribute' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
'Datamatrix' => $vendorDir . '/tecnickcom/tcpdf/include/barcodes/datamatrix.php',
'FPDF' => $vendorDir . '/setasign/fpdf/fpdf.php',
'Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
'PDF417' => $vendorDir . '/tecnickcom/tcpdf/include/barcodes/pdf417.php',
'PhpToken' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php',
'QRcode' => $vendorDir . '/tecnickcom/tcpdf/include/barcodes/qrcode.php',
'Stringable' => $vendorDir . '/myclabs/php-enum/stubs/Stringable.php',
'TCPDF' => $vendorDir . '/tecnickcom/tcpdf/tcpdf.php',
'TCPDF2DBarcode' => $vendorDir . '/tecnickcom/tcpdf/tcpdf_barcodes_2d.php',
'TCPDFBarcode' => $vendorDir . '/tecnickcom/tcpdf/tcpdf_barcodes_1d.php',
'TCPDF_COLORS' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_colors.php',
'TCPDF_FILTERS' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_filters.php',
'TCPDF_FONTS' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_fonts.php',
'TCPDF_FONT_DATA' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_font_data.php',
'TCPDF_IMAGES' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_images.php',
'TCPDF_IMPORT' => $vendorDir . '/tecnickcom/tcpdf/tcpdf_import.php',
'TCPDF_PARSER' => $vendorDir . '/tecnickcom/tcpdf/tcpdf_parser.php',
'TCPDF_STATIC' => $vendorDir . '/tecnickcom/tcpdf/include/tcpdf_static.php',
'UnhandledMatchError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
'ValueError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
);

View File

@@ -8,6 +8,7 @@ $baseDir = dirname($vendorDir);
return array(
'voku\\helper\\' => array($vendorDir . '/voku/anti-xss/src/voku/helper'),
'voku\\' => array($vendorDir . '/voku/portable-ascii/src/voku', $vendorDir . '/voku/portable-utf8/src/voku'),
'setasign\\Fpdi\\' => array($vendorDir . '/setasign/fpdi/src'),
'ZipStream\\' => array($vendorDir . '/maennchen/zipstream-php/src'),
'Webklex\\PHPIMAP\\' => array($vendorDir . '/webklex/php-imap/src'),
'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'),
@@ -33,5 +34,6 @@ return array(
'Illuminate\\Contracts\\' => array($vendorDir . '/illuminate/contracts'),
'Doctrine\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib/Doctrine/Inflector'),
'Complex\\' => array($vendorDir . '/markbaker/complex/classes/src'),
'Carbon\\Doctrine\\' => array($vendorDir . '/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine'),
'Carbon\\' => array($vendorDir . '/nesbot/carbon/src/Carbon'),
);

View File

@@ -26,6 +26,10 @@ class ComposerStaticInitb3a3dfb766a515d49b7f8665bad574b3
'voku\\helper\\' => 12,
'voku\\' => 5,
),
's' =>
array (
'setasign\\Fpdi\\' => 14,
),
'Z' =>
array (
'ZipStream\\' => 10,
@@ -74,6 +78,7 @@ class ComposerStaticInitb3a3dfb766a515d49b7f8665bad574b3
'C' =>
array (
'Complex\\' => 8,
'Carbon\\Doctrine\\' => 16,
'Carbon\\' => 7,
),
);
@@ -88,6 +93,10 @@ class ComposerStaticInitb3a3dfb766a515d49b7f8665bad574b3
0 => __DIR__ . '/..' . '/voku/portable-ascii/src/voku',
1 => __DIR__ . '/..' . '/voku/portable-utf8/src/voku',
),
'setasign\\Fpdi\\' =>
array (
0 => __DIR__ . '/..' . '/setasign/fpdi/src',
),
'ZipStream\\' =>
array (
0 => __DIR__ . '/..' . '/maennchen/zipstream-php/src',
@@ -191,6 +200,10 @@ class ComposerStaticInitb3a3dfb766a515d49b7f8665bad574b3
array (
0 => __DIR__ . '/..' . '/markbaker/complex/classes/src',
),
'Carbon\\Doctrine\\' =>
array (
0 => __DIR__ . '/..' . '/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine',
),
'Carbon\\' =>
array (
0 => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon',
@@ -200,9 +213,24 @@ class ComposerStaticInitb3a3dfb766a515d49b7f8665bad574b3
public static $classMap = array (
'Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
'Datamatrix' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/barcodes/datamatrix.php',
'FPDF' => __DIR__ . '/..' . '/setasign/fpdf/fpdf.php',
'Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
'PDF417' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/barcodes/pdf417.php',
'PhpToken' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php',
'QRcode' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/barcodes/qrcode.php',
'Stringable' => __DIR__ . '/..' . '/myclabs/php-enum/stubs/Stringable.php',
'TCPDF' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf.php',
'TCPDF2DBarcode' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf_barcodes_2d.php',
'TCPDFBarcode' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf_barcodes_1d.php',
'TCPDF_COLORS' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_colors.php',
'TCPDF_FILTERS' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_filters.php',
'TCPDF_FONTS' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_fonts.php',
'TCPDF_FONT_DATA' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_font_data.php',
'TCPDF_IMAGES' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_images.php',
'TCPDF_IMPORT' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf_import.php',
'TCPDF_PARSER' => __DIR__ . '/..' . '/tecnickcom/tcpdf/tcpdf_parser.php',
'TCPDF_STATIC' => __DIR__ . '/..' . '/tecnickcom/tcpdf/include/tcpdf_static.php',
'UnhandledMatchError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
'ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
);

View File

@@ -1,5 +1,77 @@
{
"packages": [
{
"name": "carbonphp/carbon-doctrine-types",
"version": "2.1.0",
"version_normalized": "2.1.0.0",
"source": {
"type": "git",
"url": "https://github.com/CarbonPHP/carbon-doctrine-types.git",
"reference": "99f76ffa36cce3b70a4a6abce41dba15ca2e84cb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/99f76ffa36cce3b70a4a6abce41dba15ca2e84cb",
"reference": "99f76ffa36cce3b70a4a6abce41dba15ca2e84cb",
"shasum": ""
},
"require": {
"php": "^7.4 || ^8.0"
},
"conflict": {
"doctrine/dbal": "<3.7.0 || >=4.0.0"
},
"require-dev": {
"doctrine/dbal": "^3.7.0",
"nesbot/carbon": "^2.71.0 || ^3.0.0",
"phpunit/phpunit": "^10.3"
},
"time": "2023-12-11T17:09:12+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"psr-4": {
"Carbon\\Doctrine\\": "src/Carbon/Doctrine/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "KyleKatarn",
"email": "kylekatarnls@gmail.com"
}
],
"description": "Types to use Carbon in Doctrine",
"keywords": [
"carbon",
"date",
"datetime",
"doctrine",
"time"
],
"support": {
"issues": "https://github.com/CarbonPHP/carbon-doctrine-types/issues",
"source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/2.1.0"
},
"funding": [
{
"url": "https://github.com/kylekatarnls",
"type": "github"
},
{
"url": "https://opencollective.com/Carbon",
"type": "open_collective"
},
{
"url": "https://tidelift.com/funding/github/packagist/nesbot/carbon",
"type": "tidelift"
}
],
"install-path": "../carbonphp/carbon-doctrine-types"
},
{
"name": "doctrine/inflector",
"version": "2.1.x-dev",
@@ -644,15 +716,16 @@
"source": {
"type": "git",
"url": "https://github.com/briannesbitt/Carbon.git",
"reference": "98276233188583f2ff845a0f992a235472d9466a"
"reference": "a12dbbaab4d14bc43760f677b0f12047684b84a7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/98276233188583f2ff845a0f992a235472d9466a",
"reference": "98276233188583f2ff845a0f992a235472d9466a",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/a12dbbaab4d14bc43760f677b0f12047684b84a7",
"reference": "a12dbbaab4d14bc43760f677b0f12047684b84a7",
"shasum": ""
},
"require": {
"carbonphp/carbon-doctrine-types": "*",
"ext-json": "*",
"php": "^7.1.8 || ^8.0",
"psr/clock": "^1.0",
@@ -664,8 +737,8 @@
"psr/clock-implementation": "1.0"
},
"require-dev": {
"doctrine/dbal": "^2.0 || ^3.1.4",
"doctrine/orm": "^2.7",
"doctrine/dbal": "^2.0 || ^3.1.4 || ^4.0",
"doctrine/orm": "^2.7 || ^3.0",
"friendsofphp/php-cs-fixer": "^3.0",
"kylekatarnls/multi-tester": "^2.0",
"ondrejmirtes/better-reflection": "*",
@@ -676,7 +749,7 @@
"phpunit/phpunit": "^7.5.20 || ^8.5.26 || ^9.5.20",
"squizlabs/php_codesniffer": "^3.4"
},
"time": "2023-09-25T11:31:05+00:00",
"time": "2023-12-15T21:58:36+00:00",
"default-branch": true,
"bin": [
"bin/carbon"
@@ -754,12 +827,12 @@
"source": {
"type": "git",
"url": "https://github.com/PHPMailer/PHPMailer.git",
"reference": "a1fa2714c447adda7e6b07c4bfa290dfc1a035b2"
"reference": "5372c1694dea54e156443af9c888ccecfa52cb4d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/a1fa2714c447adda7e6b07c4bfa290dfc1a035b2",
"reference": "a1fa2714c447adda7e6b07c4bfa290dfc1a035b2",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/5372c1694dea54e156443af9c888ccecfa52cb4d",
"reference": "5372c1694dea54e156443af9c888ccecfa52cb4d",
"shasum": ""
},
"require": {
@@ -779,6 +852,7 @@
"yoast/phpunit-polyfills": "^1.0.4"
},
"suggest": {
"decomplexity/SendOauth2": "Adapter for using XOAUTH2 authentication",
"ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses",
"ext-openssl": "Needed for secure SMTP sending and DKIM signing",
"greew/oauth2-azure-provider": "Needed for Microsoft Azure XOAUTH2 authentication",
@@ -788,7 +862,7 @@
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)",
"thenetworg/oauth2-azure": "Needed for Microsoft XOAUTH2 authentication"
},
"time": "2023-10-09T11:27:29+00:00",
"time": "2023-12-18T07:46:07+00:00",
"default-branch": true,
"type": "library",
"installation-source": "dist",
@@ -1267,6 +1341,176 @@
},
"install-path": "../psr/simple-cache"
},
{
"name": "setasign/fpdf",
"version": "1.8.6",
"version_normalized": "1.8.6.0",
"source": {
"type": "git",
"url": "https://github.com/Setasign/FPDF.git",
"reference": "0838e0ee4925716fcbbc50ad9e1799b5edfae0a0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Setasign/FPDF/zipball/0838e0ee4925716fcbbc50ad9e1799b5edfae0a0",
"reference": "0838e0ee4925716fcbbc50ad9e1799b5edfae0a0",
"shasum": ""
},
"require": {
"ext-gd": "*",
"ext-zlib": "*"
},
"time": "2023-06-26T14:44:25+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"classmap": [
"fpdf.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Olivier Plathey",
"email": "oliver@fpdf.org",
"homepage": "http://fpdf.org/"
}
],
"description": "FPDF is a PHP class which allows to generate PDF files with pure PHP. F from FPDF stands for Free: you may use it for any kind of usage and modify it to suit your needs.",
"homepage": "http://www.fpdf.org",
"keywords": [
"fpdf",
"pdf"
],
"support": {
"source": "https://github.com/Setasign/FPDF/tree/1.8.6"
},
"install-path": "../setasign/fpdf"
},
{
"name": "setasign/fpdi",
"version": "v2.6.0",
"version_normalized": "2.6.0.0",
"source": {
"type": "git",
"url": "https://github.com/Setasign/FPDI.git",
"reference": "a6db878129ec6c7e141316ee71872923e7f1b7ad"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Setasign/FPDI/zipball/a6db878129ec6c7e141316ee71872923e7f1b7ad",
"reference": "a6db878129ec6c7e141316ee71872923e7f1b7ad",
"shasum": ""
},
"require": {
"ext-zlib": "*",
"php": "^5.6 || ^7.0 || ^8.0"
},
"conflict": {
"setasign/tfpdf": "<1.31"
},
"require-dev": {
"phpunit/phpunit": "~5.7",
"setasign/fpdf": "~1.8.6",
"setasign/tfpdf": "~1.33",
"squizlabs/php_codesniffer": "^3.5",
"tecnickcom/tcpdf": "~6.2"
},
"suggest": {
"setasign/fpdf": "FPDI will extend this class but as it is also possible to use TCPDF or tFPDF as an alternative. There's no fixed dependency configured."
},
"time": "2023-12-11T16:03:32+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"psr-4": {
"setasign\\Fpdi\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jan Slabon",
"email": "jan.slabon@setasign.com",
"homepage": "https://www.setasign.com"
},
{
"name": "Maximilian Kresse",
"email": "maximilian.kresse@setasign.com",
"homepage": "https://www.setasign.com"
}
],
"description": "FPDI is a collection of PHP classes facilitating developers to read pages from existing PDF documents and use them as templates in FPDF. Because it is also possible to use FPDI with TCPDF, there are no fixed dependencies defined. Please see suggestions for packages which evaluates the dependencies automatically.",
"homepage": "https://www.setasign.com/fpdi",
"keywords": [
"fpdf",
"fpdi",
"pdf"
],
"support": {
"issues": "https://github.com/Setasign/FPDI/issues",
"source": "https://github.com/Setasign/FPDI/tree/v2.6.0"
},
"funding": [
{
"url": "https://tidelift.com/funding/github/packagist/setasign/fpdi",
"type": "tidelift"
}
],
"install-path": "../setasign/fpdi"
},
{
"name": "setasign/fpdi-fpdf",
"version": "v2.3.0",
"version_normalized": "2.3.0.0",
"source": {
"type": "git",
"url": "https://github.com/Setasign/FPDI-FPDF.git",
"reference": "f2fdc44e4d5247a3bb55ed2c2c1396ef05c02357"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Setasign/FPDI-FPDF/zipball/f2fdc44e4d5247a3bb55ed2c2c1396ef05c02357",
"reference": "f2fdc44e4d5247a3bb55ed2c2c1396ef05c02357",
"shasum": ""
},
"require": {
"setasign/fpdf": "^1.8.2",
"setasign/fpdi": "^2.3"
},
"time": "2020-02-19T12:21:53+00:00",
"type": "library",
"installation-source": "dist",
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jan Slabon",
"email": "jan.slabon@setasign.com",
"homepage": "https://www.setasign.com"
}
],
"description": "Kind of metadata package for dependencies of the latest versions of FPDI and FPDF.",
"homepage": "https://www.setasign.com/fpdi",
"keywords": [
"fpdf",
"fpdi",
"pdf"
],
"support": {
"source": "https://github.com/Setasign/FPDI-FPDF/tree/v2.3.0"
},
"abandoned": true,
"install-path": "../setasign/fpdi-fpdf"
},
{
"name": "symfony/deprecation-contracts",
"version": "2.5.x-dev",
@@ -1344,12 +1588,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
"reference": "365992c83a836dfe635f1e903ccca43ee03d3dd2"
"reference": "4da1713e88cf9c44bd4bf65f54772681222fcbec"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/365992c83a836dfe635f1e903ccca43ee03d3dd2",
"reference": "365992c83a836dfe635f1e903ccca43ee03d3dd2",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/4da1713e88cf9c44bd4bf65f54772681222fcbec",
"reference": "4da1713e88cf9c44bd4bf65f54772681222fcbec",
"shasum": ""
},
"require": {
@@ -1370,7 +1614,7 @@
"suggest": {
"symfony/mime": "To use the file extension guesser"
},
"time": "2023-08-21T07:23:18+00:00",
"time": "2023-12-27T11:45:35+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -1937,12 +2181,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
"reference": "96015d73801bb59de5a43d71906c5690759f29ea"
"reference": "ba72f72fceddf36f00bd495966b5873f2d17ad8f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/translation/zipball/96015d73801bb59de5a43d71906c5690759f29ea",
"reference": "96015d73801bb59de5a43d71906c5690759f29ea",
"url": "https://api.github.com/repos/symfony/translation/zipball/ba72f72fceddf36f00bd495966b5873f2d17ad8f",
"reference": "ba72f72fceddf36f00bd495966b5873f2d17ad8f",
"shasum": ""
},
"require": {
@@ -1981,7 +2225,7 @@
"symfony/config": "",
"symfony/yaml": ""
},
"time": "2023-10-14T16:25:31+00:00",
"time": "2023-11-03T16:16:43+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -2112,22 +2356,97 @@
"install-path": "../symfony/translation-contracts"
},
{
"name": "tinymce/tinymce",
"version": "dev-master",
"version_normalized": "dev-master",
"name": "tecnickcom/tcpdf",
"version": "dev-main",
"version_normalized": "dev-main",
"source": {
"type": "git",
"url": "https://github.com/tinymce/tinymce-dist.git",
"reference": "02e194ec4d37aab8335332f8ac3e8d2292ba2d47"
"url": "https://github.com/tecnickcom/TCPDF.git",
"reference": "5fce932fcee4371865314ab7f6c0d85423c5c7ce"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/tinymce/tinymce-dist/zipball/02e194ec4d37aab8335332f8ac3e8d2292ba2d47",
"reference": "02e194ec4d37aab8335332f8ac3e8d2292ba2d47",
"url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/5fce932fcee4371865314ab7f6c0d85423c5c7ce",
"reference": "5fce932fcee4371865314ab7f6c0d85423c5c7ce",
"shasum": ""
},
"time": "2023-08-30T11:10:35+00:00",
"require": {
"php": ">=5.3.0"
},
"time": "2023-09-06T15:09:26+00:00",
"default-branch": true,
"type": "library",
"installation-source": "dist",
"autoload": {
"classmap": [
"config",
"include",
"tcpdf.php",
"tcpdf_parser.php",
"tcpdf_import.php",
"tcpdf_barcodes_1d.php",
"tcpdf_barcodes_2d.php",
"include/tcpdf_colors.php",
"include/tcpdf_filters.php",
"include/tcpdf_font_data.php",
"include/tcpdf_fonts.php",
"include/tcpdf_images.php",
"include/tcpdf_static.php",
"include/barcodes/datamatrix.php",
"include/barcodes/pdf417.php",
"include/barcodes/qrcode.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL-3.0-or-later"
],
"authors": [
{
"name": "Nicola Asuni",
"email": "info@tecnick.com",
"role": "lead"
}
],
"description": "TCPDF is a PHP class for generating PDF documents and barcodes.",
"homepage": "http://www.tcpdf.org/",
"keywords": [
"PDFD32000-2008",
"TCPDF",
"barcodes",
"datamatrix",
"pdf",
"pdf417",
"qrcode"
],
"support": {
"issues": "https://github.com/tecnickcom/TCPDF/issues",
"source": "https://github.com/tecnickcom/TCPDF/tree/6.6.5"
},
"funding": [
{
"url": "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&currency_code=GBP&business=paypal@tecnick.com&item_name=donation%20for%20tcpdf%20project",
"type": "custom"
}
],
"install-path": "../tecnickcom/tcpdf"
},
{
"name": "tinymce/tinymce",
"version": "6.8.2",
"version_normalized": "6.8.2.0",
"source": {
"type": "git",
"url": "https://github.com/tinymce/tinymce-dist.git",
"reference": "b0073db409746748af4fc06fbee337bb99f462d9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/tinymce/tinymce-dist/zipball/b0073db409746748af4fc06fbee337bb99f462d9",
"reference": "b0073db409746748af4fc06fbee337bb99f462d9",
"shasum": ""
},
"time": "2023-12-11T03:21:56+00:00",
"type": "component",
"extra": {
"component": {
@@ -2170,7 +2489,7 @@
"wysiwyg"
],
"support": {
"source": "https://github.com/tinymce/tinymce-dist/tree/6.7.0"
"source": "https://github.com/tinymce/tinymce-dist/tree/6.8.2"
},
"install-path": "../tinymce/tinymce"
},

View File

@@ -3,7 +3,7 @@
'name' => '__root__',
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => 'ea29b477f6aeffb4f7f9f09aacbe245f418aa029',
'reference' => '547e4bbb6f0b694ca62552aca7d7bed2b570b1ed',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -13,12 +13,21 @@
'__root__' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => 'ea29b477f6aeffb4f7f9f09aacbe245f418aa029',
'reference' => '547e4bbb6f0b694ca62552aca7d7bed2b570b1ed',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev_requirement' => false,
),
'carbonphp/carbon-doctrine-types' => array(
'pretty_version' => '2.1.0',
'version' => '2.1.0.0',
'reference' => '99f76ffa36cce3b70a4a6abce41dba15ca2e84cb',
'type' => 'library',
'install_path' => __DIR__ . '/../carbonphp/carbon-doctrine-types',
'aliases' => array(),
'dev_requirement' => false,
),
'doctrine/inflector' => array(
'pretty_version' => '2.1.x-dev',
'version' => '2.1.9999999.9999999-dev',
@@ -112,7 +121,7 @@
'nesbot/carbon' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '98276233188583f2ff845a0f992a235472d9466a',
'reference' => 'a12dbbaab4d14bc43760f677b0f12047684b84a7',
'type' => 'library',
'install_path' => __DIR__ . '/../nesbot/carbon',
'aliases' => array(
@@ -123,7 +132,7 @@
'phpmailer/phpmailer' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'a1fa2714c447adda7e6b07c4bfa290dfc1a035b2',
'reference' => '5372c1694dea54e156443af9c888ccecfa52cb4d',
'type' => 'library',
'install_path' => __DIR__ . '/../phpmailer/phpmailer',
'aliases' => array(
@@ -206,6 +215,33 @@
'aliases' => array(),
'dev_requirement' => false,
),
'setasign/fpdf' => array(
'pretty_version' => '1.8.6',
'version' => '1.8.6.0',
'reference' => '0838e0ee4925716fcbbc50ad9e1799b5edfae0a0',
'type' => 'library',
'install_path' => __DIR__ . '/../setasign/fpdf',
'aliases' => array(),
'dev_requirement' => false,
),
'setasign/fpdi' => array(
'pretty_version' => 'v2.6.0',
'version' => '2.6.0.0',
'reference' => 'a6db878129ec6c7e141316ee71872923e7f1b7ad',
'type' => 'library',
'install_path' => __DIR__ . '/../setasign/fpdi',
'aliases' => array(),
'dev_requirement' => false,
),
'setasign/fpdi-fpdf' => array(
'pretty_version' => 'v2.3.0',
'version' => '2.3.0.0',
'reference' => 'f2fdc44e4d5247a3bb55ed2c2c1396ef05c02357',
'type' => 'library',
'install_path' => __DIR__ . '/../setasign/fpdi-fpdf',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/deprecation-contracts' => array(
'pretty_version' => '2.5.x-dev',
'version' => '2.5.9999999.9999999-dev',
@@ -218,7 +254,7 @@
'symfony/http-foundation' => array(
'pretty_version' => '5.4.x-dev',
'version' => '5.4.9999999.9999999-dev',
'reference' => '365992c83a836dfe635f1e903ccca43ee03d3dd2',
'reference' => '4da1713e88cf9c44bd4bf65f54772681222fcbec',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/http-foundation',
'aliases' => array(),
@@ -281,7 +317,7 @@
'symfony/translation' => array(
'pretty_version' => '5.4.x-dev',
'version' => '5.4.9999999.9999999-dev',
'reference' => '96015d73801bb59de5a43d71906c5690759f29ea',
'reference' => 'ba72f72fceddf36f00bd495966b5873f2d17ad8f',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/translation',
'aliases' => array(),
@@ -302,17 +338,26 @@
0 => '2.3',
),
),
'tinymce/tinymce' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '02e194ec4d37aab8335332f8ac3e8d2292ba2d47',
'type' => 'component',
'install_path' => __DIR__ . '/../tinymce/tinymce',
'tecnickcom/tcpdf' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => '5fce932fcee4371865314ab7f6c0d85423c5c7ce',
'type' => 'library',
'install_path' => __DIR__ . '/../tecnickcom/tcpdf',
'aliases' => array(
0 => '9999999-dev',
),
'dev_requirement' => false,
),
'tinymce/tinymce' => array(
'pretty_version' => '6.8.2',
'version' => '6.8.2.0',
'reference' => 'b0073db409746748af4fc06fbee337bb99f462d9',
'type' => 'component',
'install_path' => __DIR__ . '/../tinymce/tinymce',
'aliases' => array(),
'dev_requirement' => false,
),
'voku/anti-xss' => array(
'pretty_version' => '4.1.35',
'version' => '4.1.35.0',

View File

@@ -42,14 +42,15 @@
"require": {
"php": "^7.1.8 || ^8.0",
"ext-json": "*",
"carbonphp/carbon-doctrine-types": "*",
"psr/clock": "^1.0",
"symfony/polyfill-mbstring": "^1.0",
"symfony/polyfill-php80": "^1.16",
"symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0"
},
"require-dev": {
"doctrine/dbal": "^2.0 || ^3.1.4",
"doctrine/orm": "^2.7",
"doctrine/dbal": "^2.0 || ^3.1.4 || ^4.0",
"doctrine/orm": "^2.7 || ^3.0",
"friendsofphp/php-cs-fixer": "^3.0",
"kylekatarnls/multi-tester": "^2.0",
"ondrejmirtes/better-reflection": "*",

View File

@@ -120,24 +120,37 @@ This project exists thanks to all the people who contribute.
Support this project by becoming a sponsor. Your logo will show up here with a link to your website.
<a href="https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme" target="_blank"><img src="https://carbon.nesbot.com/tidelift-brand.png" width="256" height="64"></a><!-- <open-collective-sponsors> -->
<a title="#1 Guide To Online Gambling In Canada" href="https://casinohex.org/canada/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="CasinoHex Canada" src="https://opencollective-production.s3.us-west-1.amazonaws.com/79fdbcc0-a997-11eb-abbc-25e48b63c6dc.jpg" width="85" height="64"></a>
<a title="Casino-portugal.pt" href="https://casino-portugal.pt/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="Casino-portugal.pt" src="https://logo.clearbit.com/casino-portugal.pt" width="64" height="64"></a>
<a title="Slots City® ➢ Лучшее лицензионно казино онлайн и оффлайн на гривны в Украине. 【 Более1500 игровых автоматов и слотов】✅ Официально и Безопасно" href="https://slotscity.ua/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="Slots City" src="https://opencollective-production.s3.us-west-1.amazonaws.com/d7e298c0-7abe-11ed-8553-230872f5e54d.png" width="90" height="64"></a>
<a title="Znajdź najlepsze zakłady bukmacherskie w Polsce w 2023 roku. Probukmacher.pl to Twoje kompendium wiedzy na temat bukmacherów!" href="https://www.probukmacher.pl?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="Probukmacher" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/caf50271-4560-4ffe-a434-ea15239168db/Screenshot_1.png" width="89" height="64"></a>
<a title="Gives a fun for our users" href="https://slotoking.ua/games/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="Игровые автоматы" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/94601d07-3205-4c60-9c2d-9b8194dbefb7/skg-blue.png" width="64" height="64"></a>
<a title="inkedin" href="https://inkedin.com?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="inkedin" src="https://logo.clearbit.com/inkedin.com" width="64" height="64"></a>
<a title="Актуальний та повносправний рейтинг онлайн казино України, ґрунтований на відгуках реальних гравців." href="https://uk.onlinecasino.kyiv.ua/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="Онлайн казино України" src="https://opencollective-production.s3.us-west-1.amazonaws.com/c0b4b090-eef8-11ec-9cb7-0527a205b226.png" width="64" height="64"></a>
<a title="Chudovo - international software development company with representative offices in Kyiv, Cologne, New York, Tallinn and London. It has been working on the market since 2006. Company has domain expertise in video security, logistics, medicine, finance and" href="https://chudovo.com/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="Chudovo" src="https://opencollective-production.s3.us-west-1.amazonaws.com/326c19a0-2e87-11eb-a13a-c99a2a201d11.png" width="424" height="64"></a>
<a title="A self-hosted web radio management suite, including turnkey installer tools and an easy-to-use web app to manage your stations. " href="https://azuracast.com?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="AzuraCast" src="https://opencollective-production.s3.us-west-1.amazonaws.com/3c12ea10-cdfb-11eb-9cf4-3760b386b76d.png" width="64" height="64"></a>
<a title="Triplebyte is the first software engineering job platform that is on the developer&#039;s side. Take our coding quiz!" href="https://triplebyte.com/os/opencollective?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="Triplebyte" src="https://opencollective-production.s3.us-west-1.amazonaws.com/43e4f9d0-30cd-11ea-9c6b-e1142996e8b2.png" width="64" height="64"></a>
<a title="Connect your Collective to GitHub Sponsors: https://docs.opencollective.com/help/collectives/github-sponsors" href="https://github.com/sponsors/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="GitHub Sponsors" src="https://opencollective-production.s3.us-west-1.amazonaws.com/87b1d240-f617-11ea-9960-fd7e8ab20fe4.png" width="73" height="64"></a>
<a title="Salesforce" href="https://engineering.salesforce.com?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank" rel="sponsored"><img alt="Salesforce" src="https://opencollective-production.s3.us-west-1.amazonaws.com/24d34880-df8d-11e9-949c-6bc2037b6bd5.png" width="64" height="64"></a>
<a title="#1 Guide To Online Gambling In Canada" href="https://casinohex.org/canada/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="CasinoHex Canada" src="https://opencollective-production.s3.us-west-1.amazonaws.com/79fdbcc0-a997-11eb-abbc-25e48b63c6dc.jpg" width="85" height="64"></a>
<a title="Casino-portugal.pt" href="https://casino-portugal.pt/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Casino-portugal.pt" src="https://logo.clearbit.com/casino-portugal.pt" width="64" height="64"></a>
<a title="Znajdź najlepsze zakłady bukmacherskie w Polsce w 2023 roku. Probukmacher.pl to Twoje kompendium wiedzy na temat bukmacherów!" href="https://www.probukmacher.pl?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Probukmacher" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/caf50271-4560-4ffe-a434-ea15239168db/Screenshot_1.png" width="89" height="64"></a>
<a title="Gives a fun for our users" href="https://slotoking.ua/games/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Игровые автоматы" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/94601d07-3205-4c60-9c2d-9b8194dbefb7/skg-blue.png" width="64" height="64"></a>
<a title="Онлайн казино 777 Україна" href="https://777.ua/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Онлайн казино" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/7e572d50-1ce8-4d69-ae12-86cc80371373/ok-ua-777.png" width="64" height="64"></a>
<a title="Slots City® ➢ Лучшее лицензионно казино онлайн и оффлайн на гривны в Украине. 【 Более1500 игровых автоматов и слотов】✅ Официально и Безопасно" href="https://slotscity.ua/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Slots City" src="https://opencollective-production.s3.us-west-1.amazonaws.com/d7e298c0-7abe-11ed-8553-230872f5e54d.png" width="90" height="64"></a>
<a title="inkedin" href="https://inkedin.com?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="inkedin" src="https://logo.clearbit.com/inkedin.com" width="64" height="64"></a>
<a title="Актуальний та повносправний рейтинг онлайн казино України, ґрунтований на відгуках реальних гравців." href="https://uk.onlinecasino.in.ua/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Онлайн казино України" src="https://opencollective-production.s3.us-west-1.amazonaws.com/c0b4b090-eef8-11ec-9cb7-0527a205b226.png" width="64" height="64"></a>
<a title="OnlineCasinosSpelen" href="https://onlinecasinosspelen.com?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="OnlineCasinosSpelen" src="https://logo.clearbit.com/onlinecasinosspelen.com" width="64" height="64"></a>
<a title="Best non Gamstop sites in the UK" href="https://nongamstopcasinos.net/gb/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Best non Gamstop sites in the UK" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/34e340b8-e1de-4932-8a76-1b3ce2ec7ee8/logo_white%20bg%20(8).png" width="64" height="64"></a>
<a title="Real Money Pokies" href="https://www.nzfirst.org.nz/real-money-pokies/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Real Money Pokies" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/30d38232-a9d6-4e95-a48c-641fdc4d96fd/NZ_logo%20(6)%20(1)%20(1).jpg" width="64" height="64"></a>
<a title="Non GamStop Bookies UK" href="https://nongamstopbookies.com/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Non GamStop Bookies UK" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/43c5561c-8907-4ef7-a4ee-c6da054788b8/logo-site%20(3).jpg" width="64" height="64"></a>
<a title="Entertainment" href="https://www.nongamstopbets.com/casinos-not-on-gamstop/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Non-GamStop Bets UK" src="https://logo.clearbit.com/nongamstopbets.com" width="64" height="64"></a>
<a title="Chudovo - international software development company with representative offices in Kyiv, Cologne, New York, Tallinn and London. It has been working on the market since 2006. Company has domain expertise in video security, logistics, medicine, finance and" href="https://chudovo.com/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Chudovo" src="https://opencollective-production.s3.us-west-1.amazonaws.com/326c19a0-2e87-11eb-a13a-c99a2a201d11.png" width="84" height="42"></a>
<a title="Entertainment" href="https://casinogap.org/uk/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="UK Casino Gap" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/143f9301-beec-4118-89d5-9a07a01345f3/casinogap-uk.png" width="42" height="42"></a>
<a title="NZ Gaming Portal" href="https://casinodeps.co.nz?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="NZ Casino Deps" src="https://logo.clearbit.com/casinodeps.co.nz" width="42" height="42"></a>
<a title="NonStop Sites" href="https://uk.nonstopcasino.org/non-gamstop-casinos/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="NonStopCasino.org" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/fd7ad905-8752-468f-ad20-582a24cca9d9/non-stop-casino.png" width="42" height="42"></a>
<a title="Siti Non AAMS" href="https://www.outlookindia.com/outlook-spotlight/migliori-siti-non-aams-siti-scommesse-senza-licenza-sicuri-news-294715?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Migliori Siti Non AAMS" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/392810da-6cb6-4938-a3cb-38bd0e1eb7de/migliori-siti-non-aams.png" width="42" height="42"></a>
<a title="List of trusted non GamStop casino reviews" href="https://nongamstopcasinos.org?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="UK NonGamStopCasinos" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/cbda0ee1-26ea-4252-9580-f1f9b317b1f7/nongamstopcasinos-uk.png" width="42" height="42"></a>
<a title="Online TikTok Video Download Tool" href="https://snaptik.pro?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="SnapTik" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/546bcd53-6615-457d-ab21-1db1c52b3af5/logo.jpg" width="42" height="42"></a>
<a title="A self-hosted web radio management suite, including turnkey installer tools and an easy-to-use web app to manage your stations. " href="https://azuracast.com?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="AzuraCast" src="https://opencollective-production.s3.us-west-1.amazonaws.com/3c12ea10-cdfb-11eb-9cf4-3760b386b76d.png" width="42" height="42"></a>
<a title="Triplebyte is the first software engineering job platform that is on the developer&#039;s side. Take our coding quiz!" href="https://triplebyte.com/os/opencollective?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Triplebyte" src="https://opencollective-production.s3.us-west-1.amazonaws.com/43e4f9d0-30cd-11ea-9c6b-e1142996e8b2.png" width="42" height="42"></a>
<a title="Connect your Collective to GitHub Sponsors: https://docs.opencollective.com/help/collectives/github-sponsors" href="https://github.com/sponsors/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="GitHub Sponsors" src="https://opencollective-production.s3.us-west-1.amazonaws.com/87b1d240-f617-11ea-9960-fd7e8ab20fe4.png" width="48" height="42"></a>
<a title="Salesforce" href="https://engineering.salesforce.com?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Salesforce" src="https://opencollective-production.s3.us-west-1.amazonaws.com/24d34880-df8d-11e9-949c-6bc2037b6bd5.png" width="42" height="42"></a>
<!-- </open-collective-sponsors> -->
[[Become a sponsor via OpenCollective](https://opencollective.com/Carbon#sponsor)]
<a href="https://github.com/taylorotwell" target="_blank"><img src="https://avatars.githubusercontent.com/u/463230?s=128&v=4" width="64" height="64"></a>
<a href="https://github.com/usefathom" target="_blank"><img src="https://avatars.githubusercontent.com/u/38684088?s=128&v=4" width="64" height="64"></a>
<a href="https://github.com/codecov" target="_blank"><img src="https://avatars.githubusercontent.com/u/8226205?s=128&v=4" width="64" height="64"></a>
<a href="https://github.com/getsentry" target="_blank"><img src="https://avatars.githubusercontent.com/u/1396951?s=128&v=4" width="64" height="64"></a>
[[Become a sponsor via GitHub](https://github.com/sponsors/kylekatarnls)]

View File

@@ -13,19 +13,44 @@ use Carbon\CarbonImmutable;
require_once __DIR__.'/vendor/autoload.php';
function getMaxHistoryMonthsByAmount($amount): int
{
if ($amount >= 50) {
return 6;
}
if ($amount >= 20) {
return 4;
}
return 2;
}
function getOpenCollectiveSponsors(): string
{
$members = json_decode(file_get_contents('https://opencollective.com/carbon/members/all.json'), true);
$sixMonthsAgo = CarbonImmutable::parse('now - 6 months')->format('Y-m-d h:i');
$customSponsorImages = [
// For consistency and equity among sponsors, as of now, we kindly ask our sponsors
// to provide an image having a width/height ratio between 1/1 and 2/1.
// By default, we'll show the member picture from OpenCollective, and will resize it if bigger
// int(OpenCollective.MemberId) => ImageURL
];
$list = array_filter($members, static function ($member) use ($sixMonthsAgo) {
$members = json_decode(file_get_contents('https://opencollective.com/carbon/members/all.json'), true);
$list = array_filter($members, static function ($member): bool {
return ($member['lastTransactionAmount'] > 3 || $member['isActive']) &&
$member['role'] === 'BACKER' &&
$member['type'] !== 'USER' &&
($member['totalAmountDonated'] > 100 || $member['lastTransactionAt'] > $sixMonthsAgo || $member['isActive'] && $member['lastTransactionAmount'] >= 30);
(
$member['totalAmountDonated'] > 100 ||
$member['lastTransactionAt'] > CarbonImmutable::now()
->subMonthsNoOverflow(getMaxHistoryMonthsByAmount($member['lastTransactionAmount']))
->format('Y-m-d h:i') ||
$member['isActive'] && $member['lastTransactionAmount'] >= 30
);
});
$list = array_map(static function (array $member) {
$list = array_map(static function (array $member): array {
$createdAt = CarbonImmutable::parse($member['createdAt']);
$lastTransactionAt = CarbonImmutable::parse($member['lastTransactionAt']);
@@ -49,7 +74,7 @@ function getOpenCollectiveSponsors(): string
if ($monthlyContribution > 29) {
$status = 'sponsor';
} elseif ($monthlyContribution > 3 || $yearlyContribution > 20) {
} elseif ($monthlyContribution > 4.5 || $yearlyContribution > 29) {
$status = 'backer';
} elseif ($member['totalAmountDonated'] > 0) {
$status = 'helper';
@@ -63,24 +88,24 @@ function getOpenCollectiveSponsors(): string
]);
}, $list);
usort($list, static function (array $a, array $b) {
usort($list, static function (array $a, array $b): int {
return ($b['monthlyContribution'] <=> $a['monthlyContribution'])
?: ($b['totalAmountDonated'] <=> $a['totalAmountDonated']);
});
return implode('', array_map(static function (array $member) {
return implode('', array_map(static function (array $member) use ($customSponsorImages): string {
$href = htmlspecialchars($member['website'] ?? $member['profile']);
$src = $member['image'] ?? (strtr($member['profile'], ['https://opencollective.com/' => 'https://images.opencollective.com/']).'/avatar/256.png');
$src = $customSponsorImages[$member['MemberId'] ?? ''] ?? $member['image'] ?? (strtr($member['profile'], ['https://opencollective.com/' => 'https://images.opencollective.com/']).'/avatar/256.png');
[$x, $y] = @getimagesize($src) ?: [0, 0];
$validImage = ($x && $y);
$src = $validImage ? htmlspecialchars($src) : 'https://opencollective.com/static/images/default-guest-logo.svg';
$height = 64;
$width = $validImage ? round($x * $height / $y) : $height;
$height = $member['status'] === 'sponsor' ? 64 : 42;
$width = min($height * 2, $validImage ? round($x * $height / $y) : $height);
$href .= (strpos($href, '?') === false ? '?' : '&amp;').'utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon';
$title = htmlspecialchars(($member['description'] ?? null) ?: $member['name']);
$alt = htmlspecialchars($member['name']);
return "\n".'<a title="'.$title.'" href="'.$href.'" target="_blank" rel="sponsored">'.
return "\n".'<a title="'.$title.'" href="'.$href.'" target="_blank">'.
'<img alt="'.$alt.'" src="'.$src.'" width="'.$width.'" height="'.$height.'">'.
'</a>';
}, $list))."\n";
@@ -88,7 +113,7 @@ function getOpenCollectiveSponsors(): string
file_put_contents('readme.md', preg_replace_callback(
'/(<!-- <open-collective-sponsors> -->)[\s\S]+(<!-- <\/open-collective-sponsors> -->)/',
static function (array $match) {
static function (array $match): string {
return $match[1].getOpenCollectiveSponsors().$match[2];
},
file_get_contents('readme.md')

View File

@@ -5125,8 +5125,7 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable
* @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock Carbon instance
* @param Closure(): T $callback
*
* @return mixed
* @phpstan-return T
* @return T
*/
public static function withTestNow($testNow, $callback);

View File

@@ -238,6 +238,13 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
*/
public const END_MAX_ATTEMPTS = 10000;
/**
* Default date class of iteration items.
*
* @var string
*/
protected const DEFAULT_DATE_CLASS = Carbon::class;
/**
* The registered macros.
*
@@ -497,15 +504,16 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
$interval = null;
$start = null;
$end = null;
$dateClass = static::DEFAULT_DATE_CLASS;
foreach (explode('/', $iso) as $key => $part) {
if ($key === 0 && preg_match('/^R(\d*|INF)$/', $part, $match)) {
$parsed = \strlen($match[1]) ? (($match[1] !== 'INF') ? (int) $match[1] : INF) : null;
} elseif ($interval === null && $parsed = CarbonInterval::make($part)) {
$interval = $part;
} elseif ($start === null && $parsed = Carbon::make($part)) {
} elseif ($start === null && $parsed = $dateClass::make($part)) {
$start = $part;
} elseif ($end === null && $parsed = Carbon::make(static::addMissingParts($start ?? '', $part))) {
} elseif ($end === null && $parsed = $dateClass::make(static::addMissingParts($start ?? '', $part))) {
$end = $part;
} else {
throw new InvalidPeriodParameterException("Invalid ISO 8601 specification: $iso.");
@@ -701,7 +709,8 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
}
if ($this->startDate === null) {
$this->setStartDate(Carbon::now());
$dateClass = $this->dateClass;
$this->setStartDate($dateClass::now());
}
if ($this->dateInterval === null) {
@@ -1826,7 +1835,9 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
)(...$parameters));
}
if ($this->localStrictModeEnabled ?? Carbon::isStrictModeEnabled()) {
$dateClass = $this->dateClass;
if ($this->localStrictModeEnabled ?? $dateClass::isStrictModeEnabled()) {
throw new UnknownMethodException($method);
}
@@ -2685,7 +2696,9 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
!preg_match('/^R\d/', $value) &&
preg_match('/[a-z\d]/i', $value)
) {
return Carbon::parse($value, $this->tzName);
$dateClass = $this->dateClass;
return $dateClass::parse($value, $this->tzName);
}
}

View File

@@ -13,6 +13,13 @@ namespace Carbon;
class CarbonPeriodImmutable extends CarbonPeriod
{
/**
* Default date class of iteration items.
*
* @var string
*/
protected const DEFAULT_DATE_CLASS = CarbonImmutable::class;
/**
* Date class of iteration items.
*

View File

@@ -1,23 +0,0 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Doctrine;
use Doctrine\DBAL\Platforms\AbstractPlatform;
interface CarbonDoctrineType
{
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform);
public function convertToPHPValue($value, AbstractPlatform $platform);
public function convertToDatabaseValue($value, AbstractPlatform $platform);
}

View File

@@ -1,37 +0,0 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Doctrine;
use Doctrine\DBAL\Platforms\AbstractPlatform;
class CarbonImmutableType extends DateTimeImmutableType implements CarbonDoctrineType
{
/**
* {@inheritdoc}
*
* @return string
*/
public function getName()
{
return 'carbon_immutable';
}
/**
* {@inheritdoc}
*
* @return bool
*/
public function requiresSQLCommentHint(AbstractPlatform $platform)
{
return true;
}
}

View File

@@ -1,37 +0,0 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Doctrine;
use Doctrine\DBAL\Platforms\AbstractPlatform;
class CarbonType extends DateTimeType implements CarbonDoctrineType
{
/**
* {@inheritdoc}
*
* @return string
*/
public function getName()
{
return 'carbon';
}
/**
* {@inheritdoc}
*
* @return bool
*/
public function requiresSQLCommentHint(AbstractPlatform $platform)
{
return true;
}
}

View File

@@ -1,123 +0,0 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Doctrine;
use Carbon\Carbon;
use Carbon\CarbonInterface;
use DateTimeInterface;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Types\ConversionException;
use Exception;
/**
* @template T of CarbonInterface
*/
trait CarbonTypeConverter
{
/**
* @return class-string<T>
*/
protected function getCarbonClassName(): string
{
return Carbon::class;
}
/**
* @return string
*/
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
{
$precision = $fieldDeclaration['precision'] ?: 10;
if ($fieldDeclaration['secondPrecision'] ?? false) {
$precision = 0;
}
if ($precision === 10) {
$precision = DateTimeDefaultPrecision::get();
}
$type = parent::getSQLDeclaration($fieldDeclaration, $platform);
if (!$precision) {
return $type;
}
if (str_contains($type, '(')) {
return preg_replace('/\(\d+\)/', "($precision)", $type);
}
[$before, $after] = explode(' ', "$type ");
return trim("$before($precision) $after");
}
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*
* @return T|null
*/
public function convertToPHPValue($value, AbstractPlatform $platform)
{
$class = $this->getCarbonClassName();
if ($value === null || is_a($value, $class)) {
return $value;
}
if ($value instanceof DateTimeInterface) {
return $class::instance($value);
}
$date = null;
$error = null;
try {
$date = $class::parse($value);
} catch (Exception $exception) {
$error = $exception;
}
if (!$date) {
throw ConversionException::conversionFailedFormat(
$value,
$this->getName(),
'Y-m-d H:i:s.u or any format supported by '.$class.'::parse()',
$error
);
}
return $date;
}
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*
* @return string|null
*/
public function convertToDatabaseValue($value, AbstractPlatform $platform)
{
if ($value === null) {
return $value;
}
if ($value instanceof DateTimeInterface) {
return $value->format('Y-m-d H:i:s.u');
}
throw ConversionException::conversionFailedInvalidType(
$value,
$this->getName(),
['null', 'DateTime', 'Carbon']
);
}
}

View File

@@ -1,37 +0,0 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Doctrine;
class DateTimeDefaultPrecision
{
private static $precision = 6;
/**
* Change the default Doctrine datetime and datetime_immutable precision.
*
* @param int $precision
*/
public static function set(int $precision): void
{
self::$precision = $precision;
}
/**
* Get the default Doctrine datetime and datetime_immutable precision.
*
* @return int
*/
public static function get(): int
{
return self::$precision;
}
}

View File

@@ -1,24 +0,0 @@
<?php
/**
* Thanks to https://github.com/flaushi for his suggestion:
* https://github.com/doctrine/dbal/issues/2873#issuecomment-534956358
*/
namespace Carbon\Doctrine;
use Carbon\CarbonImmutable;
use Doctrine\DBAL\Types\VarDateTimeImmutableType;
class DateTimeImmutableType extends VarDateTimeImmutableType implements CarbonDoctrineType
{
/** @use CarbonTypeConverter<CarbonImmutable> */
use CarbonTypeConverter;
/**
* @return class-string<CarbonImmutable>
*/
protected function getCarbonClassName(): string
{
return CarbonImmutable::class;
}
}

View File

@@ -1,16 +0,0 @@
<?php
/**
* Thanks to https://github.com/flaushi for his suggestion:
* https://github.com/doctrine/dbal/issues/2873#issuecomment-534956358
*/
namespace Carbon\Doctrine;
use Carbon\Carbon;
use Doctrine\DBAL\Types\VarDateTimeType;
class DateTimeType extends VarDateTimeType implements CarbonDoctrineType
{
/** @use CarbonTypeConverter<Carbon> */
use CarbonTypeConverter;
}

View File

@@ -33,33 +33,87 @@
* - Marek Adamický
* - AlterwebStudio
*/
use Carbon\CarbonInterface;
$fromNow = function ($time) {
return 'o '.strtr($time, [
'hodina' => 'hodinu',
'minúta' => 'minútu',
'sekunda' => 'sekundu',
]);
};
$ago = function ($time) {
$replacements = [
'/\bhodina\b/' => 'hodinou',
'/\bminúta\b/' => 'minútou',
'/\bsekunda\b/' => 'sekundou',
'/\bdeň\b/u' => 'dňom',
'/\btýždeň\b/u' => 'týždňom',
'/\bmesiac\b/' => 'mesiacom',
'/\brok\b/' => 'rokom',
];
$replacementsPlural = [
'/\bhodiny\b/' => 'hodinami',
'/\bminúty\b/' => 'minútami',
'/\bsekundy\b/' => 'sekundami',
'/\bdni\b/' => 'dňami',
'/\btýždne\b/' => 'týždňami',
'/\bmesiace\b/' => 'mesiacmi',
'/\broky\b/' => 'rokmi',
];
foreach ($replacements + $replacementsPlural as $pattern => $replacement) {
$time = preg_replace($pattern, $replacement, $time);
}
return "pred $time";
};
return [
'year' => 'rok|:count roky|:count rokov',
'year' => ':count rok|:count roky|:count rokov',
'a_year' => 'rok|:count roky|:count rokov',
'y' => ':count r',
'month' => 'mesiac|:count mesiace|:count mesiacov',
'month' => ':count mesiac|:count mesiace|:count mesiacov',
'a_month' => 'mesiac|:count mesiace|:count mesiacov',
'm' => ':count m',
'week' => 'týždeň|:count týždne|:count týždňov',
'week' => ':count týždeň|:count týždne|:count týždňov',
'a_week' => 'týždeň|:count týždne|:count týždňov',
'w' => ':count t',
'day' => 'deň|:count dni|:count dní',
'day' => ':count deň|:count dni|:count dní',
'a_day' => 'deň|:count dni|:count dní',
'd' => ':count d',
'hour' => 'hodinu|:count hodiny|:count hodín',
'hour' => ':count hodina|:count hodiny|:count hodín',
'a_hour' => 'hodina|:count hodiny|:count hodín',
'h' => ':count h',
'minute' => 'minútu|:count minúty|:count minút',
'minute' => ':count minúta|:count minúty|:count minút',
'a_minute' => 'minúta|:count minúty|:count minút',
'min' => ':count min',
'second' => 'sekundu|:count sekundy|:count sekúnd',
'a_second' => 'pár sekúnd|:count sekundy|:count sekúnd',
'second' => ':count sekunda|:count sekundy|:count sekúnd',
'a_second' => 'sekunda|:count sekundy|:count sekúnd',
's' => ':count s',
'ago' => 'pred :time',
'from_now' => 'o :time',
'after' => ':time po',
'millisecond' => ':count milisekunda|:count milisekundy|:count milisekúnd',
'a_millisecond' => 'milisekunda|:count milisekundy|:count milisekúnd',
'ms' => ':count ms',
'microsecond' => ':count mikrosekunda|:count mikrosekundy|:count mikrosekúnd',
'a_microsecond' => 'mikrosekunda|:count mikrosekundy|:count mikrosekúnd',
'µs' => ':count µs',
'ago' => $ago,
'from_now' => $fromNow,
'before' => ':time pred',
'year_ago' => 'rokom|:count rokmi|:count rokmi',
'month_ago' => 'mesiacom|:count mesiacmi|:count mesiacmi',
'week_ago' => 'týždňom|:count týždňami|:count týždňami',
'day_ago' => 'dňom|:count dňami|:count dňami',
'hour_ago' => 'hodinou|:count hodinami|:count hodinami',
'minute_ago' => 'minútou|:count minútami|:count minútami',
'second_ago' => 'sekundou|:count sekundami|:count sekundami',
'after' => ':time po',
'hour_after' => ':count hodinu|:count hodiny|:count hodín',
'minute_after' => ':count minútu|:count minúty|:count minút',
'second_after' => ':count sekundu|:count sekundy|:count sekúnd',
'hour_before' => ':count hodinu|:count hodiny|:count hodín',
'minute_before' => ':count minútu|:count minúty|:count minút',
'second_before' => ':count sekundu|:count sekundy|:count sekúnd',
'first_day_of_week' => 1,
'day_of_first_week_of_year' => 4,
'list' => [', ', ' a '],
@@ -74,6 +128,24 @@ return [
'LLL' => 'D. M. HH:mm',
'LLLL' => 'dddd D. MMMM YYYY HH:mm',
],
'calendar' => [
'sameDay' => '[dnes o] LT',
'nextDay' => '[zajtra o] LT',
'lastDay' => '[včera o] LT',
'nextWeek' => 'dddd [o] LT',
'lastWeek' => static function (CarbonInterface $date) {
switch ($date->dayOfWeek) {
case 1:
case 2:
case 4:
case 5:
return '[minulý] dddd [o] LT'; //pondelok/utorok/štvrtok/piatok
default:
return '[minulá] dddd [o] LT';
}
},
'sameElse' => 'L',
],
'weekdays' => ['nedeľa', 'pondelok', 'utorok', 'streda', 'štvrtok', 'piatok', 'sobota'],
'weekdays_short' => ['ned', 'pod', 'uto', 'str', 'štv', 'pia', 'sob'],
'weekdays_min' => ['ne', 'po', 'ut', 'st', 'št', 'pi', 'so'],

View File

@@ -70,11 +70,9 @@ abstract class AbstractMacro implements BuiltinMethodReflection
/**
* Macro constructor.
*
* @param string $className
* @phpstan-param class-string $className
*
* @param string $methodName
* @param callable $macro
* @param class-string $className
* @param string $methodName
* @param callable $macro
*/
public function __construct(string $className, string $methodName, $macro)
{

View File

@@ -36,10 +36,8 @@ final class MacroScanner
/**
* Return true if the given pair class-method is a Carbon macro.
*
* @param string $className
* @phpstan-param class-string $className
*
* @param string $methodName
* @param class-string $className
* @param string $methodName
*
* @return bool
*/
@@ -61,10 +59,8 @@ final class MacroScanner
/**
* Return the Macro for a given pair class-method.
*
* @param string $className
* @phpstan-param class-string $className
*
* @param string $methodName
* @param class-string $className
* @param string $methodName
*
* @throws ReflectionException
*

View File

@@ -57,7 +57,6 @@ trait Rounding
'microsecond' => [0, 999999],
]);
$factor = 1;
$initialMonth = $this->month;
if ($normalizedUnit === 'week') {
$normalizedUnit = 'day';
@@ -130,16 +129,13 @@ trait Rounding
$normalizedValue = floor($function(($value - $minimum) / $precision) * $precision + $minimum);
/** @var CarbonInterface $result */
$result = $this->$normalizedUnit($normalizedValue);
$result = $this;
foreach ($changes as $unit => $value) {
$result = $result->$unit($value);
}
return $normalizedUnit === 'month' && $precision <= 1 && abs($result->month - $initialMonth) === 2
// Re-run the change in case an overflow occurred
? $result->$normalizedUnit($normalizedValue)
: $result;
return $result->$normalizedUnit($normalizedValue);
}
/**

View File

@@ -124,8 +124,7 @@ trait Test
* @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock Carbon instance
* @param Closure(): T $callback
*
* @return mixed
* @phpstan-return T
* @return T
*/
public static function withTestNow($testNow, $callback)
{

View File

@@ -66,7 +66,7 @@ class TranslatorImmutable extends Translator
/**
* @codeCoverageIgnore
*/
public function setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory)
public function setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory): void
{
$this->disallowMutation(__METHOD__);

View File

@@ -47,7 +47,7 @@ This software is distributed under the [LGPL 2.1](http://www.gnu.org/licenses/lg
PHPMailer is available on [Packagist](https://packagist.org/packages/phpmailer/phpmailer) (using semantic versioning), and installation via [Composer](https://getcomposer.org) is the recommended way to install PHPMailer. Just add this line to your `composer.json` file:
```json
"phpmailer/phpmailer": "^6.8.1"
"phpmailer/phpmailer": "^6.9.1"
```
or run
@@ -58,7 +58,8 @@ composer require phpmailer/phpmailer
Note that the `vendor` folder and the `vendor/autoload.php` script are generated by Composer; they are not part of PHPMailer.
If you want to use the Gmail XOAUTH2 authentication class, you will also need to add a dependency on the `league/oauth2-client` package in your `composer.json`.
If you want to use XOAUTH2 authentication, you will also need to add a dependency on the `league/oauth2-client` and appropriate service adapters package in your `composer.json`, or take a look at
by @decomplexity's [SendOauth2 wrapper](https://github.com/decomplexity/SendOauth2), especially if you're using Microsoft services.
Alternatively, if you're not using Composer, you
can [download PHPMailer as a zip file](https://github.com/PHPMailer/PHPMailer/archive/master.zip), (note that docs and examples are not included in the zip file), then copy the contents of the PHPMailer folder into one of the `include_path` directories specified in your PHP configuration and load each class file manually:

View File

@@ -1 +1 @@
6.8.1
6.9.1

View File

@@ -47,6 +47,7 @@
"yoast/phpunit-polyfills": "^1.0.4"
},
"suggest": {
"decomplexity/SendOauth2": "Adapter for using XOAUTH2 authentication",
"ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses",
"ext-openssl": "Needed for secure SMTP sending and DKIM signing",
"greew/oauth2-azure-provider": "Needed for Microsoft Azure XOAUTH2 authentication",

View File

@@ -9,6 +9,7 @@
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP fejl: Login mislykkedes.';
$PHPMAILER_LANG['buggy_php'] = 'Din version af PHP er berørt af en fejl, som gør at dine beskeder muligvis vises forkert. For at rette dette kan du skifte til SMTP, slå mail.add_x_header headeren i din php.ini fil fra, skifte til MacOS eller Linux eller opgradere din version af PHP til 7.0.17+ eller 7.1.3+.';
$PHPMAILER_LANG['connect_host'] = 'SMTP fejl: Forbindelse til SMTP serveren kunne ikke oprettes.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fejl: Data blev ikke accepteret.';
$PHPMAILER_LANG['empty_message'] = 'Meddelelsen er uden indhold';

View File

@@ -31,7 +31,7 @@ $PHPMAILER_LANG['recipients_failed'] = 'Erreur SMTP:les destinataires s
$PHPMAILER_LANG['signing'] = 'Erreur de signature: ';
$PHPMAILER_LANG['smtp_code'] = 'Code SMTP: ';
$PHPMAILER_LANG['smtp_code_ex'] = 'Informations supplémentaires SMTP: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'La fonction SMTP connect() a échouée.';
$PHPMAILER_LANG['smtp_connect_failed'] = 'La fonction SMTP connect() a échoué.';
$PHPMAILER_LANG['smtp_detail'] = 'Détails: ';
$PHPMAILER_LANG['smtp_error'] = 'Erreur du serveur SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Impossible dinitialiser ou de réinitialiser une variable: ';

View File

@@ -6,21 +6,28 @@
*/
$PHPMAILER_LANG['authenticate'] = 'Błąd SMTP: Nie można przeprowadzić uwierzytelnienia.';
$PHPMAILER_LANG['buggy_php'] = 'Twoja wersja PHP zawiera błąd, który może powodować uszkodzenie wiadomości. Aby go naprawić, przełącz się na wysyłanie za pomocą SMTP, wyłącz opcję mail.add_x_header w php.ini, przełącz się na MacOS lub Linux lub zaktualizuj PHP do wersji 7.0.17+ lub 7.1.3+.';
$PHPMAILER_LANG['connect_host'] = 'Błąd SMTP: Nie można połączyć się z wybranym hostem.';
$PHPMAILER_LANG['data_not_accepted'] = 'Błąd SMTP: Dane nie zostały przyjęte.';
$PHPMAILER_LANG['empty_message'] = 'Wiadomość jest pusta.';
$PHPMAILER_LANG['encoding'] = 'Błędny sposób kodowania znaków: ';
$PHPMAILER_LANG['execute'] = 'Nie można uruchomić: ';
$PHPMAILER_LANG['extension_missing'] = 'Brakujące rozszerzenie: ';
$PHPMAILER_LANG['file_access'] = 'Brak dostępu do pliku: ';
$PHPMAILER_LANG['file_open'] = 'Nie można otworzyć pliku: ';
$PHPMAILER_LANG['from_failed'] = 'Następujący adres nadawcy jest nieprawidłowy lub nie istnieje: ';
$PHPMAILER_LANG['instantiate'] = 'Nie można wywołać funkcji mail(). Sprawdź konfigurację serwera.';
$PHPMAILER_LANG['invalid_address'] = 'Nie można wysłać wiadomości, ' . 'następujący adres odbiorcy jest nieprawidłowy lub nie istnieje: ';
$PHPMAILER_LANG['invalid_header'] = 'Nieprawidłowa nazwa lub wartość nagłówka';
$PHPMAILER_LANG['invalid_hostentry'] = 'Nieprawidłowy wpis hosta: ';
$PHPMAILER_LANG['invalid_host'] = 'Nieprawidłowy host: ';
$PHPMAILER_LANG['provide_address'] = 'Należy podać prawidłowy adres email odbiorcy.';
$PHPMAILER_LANG['mailer_not_supported'] = 'Wybrana metoda wysyłki wiadomości nie jest obsługiwana.';
$PHPMAILER_LANG['recipients_failed'] = 'Błąd SMTP: Następujący odbiorcy są nieprawidłowi lub nie istnieją: ';
$PHPMAILER_LANG['signing'] = 'Błąd podpisywania wiadomości: ';
$PHPMAILER_LANG['smtp_code'] = 'Kod SMTP: ';
$PHPMAILER_LANG['smtp_code_ex'] = 'Dodatkowe informacje SMTP: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Wywołanie funkcji SMTP Connect() zostało zakończone niepowodzeniem.';
$PHPMAILER_LANG['smtp_detail'] = 'Szczegóły: ';
$PHPMAILER_LANG['smtp_error'] = 'Błąd SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Nie można ustawić lub zmodyfikować zmiennej: ';
$PHPMAILER_LANG['extension_missing'] = 'Brakujące rozszerzenie: ';

View File

@@ -357,6 +357,13 @@ class PHPMailer
*/
public $AuthType = '';
/**
* SMTP SMTPXClient command attibutes
*
* @var array
*/
protected $SMTPXClient = [];
/**
* An implementation of the PHPMailer OAuthTokenProvider interface.
*
@@ -750,7 +757,7 @@ class PHPMailer
*
* @var string
*/
const VERSION = '6.8.1';
const VERSION = '6.9.1';
/**
* Error severity: message only, continue processing.
@@ -2001,6 +2008,38 @@ class PHPMailer
return $this->smtp;
}
/**
* Provide SMTP XCLIENT attributes
*
* @param string $name Attribute name
* @param ?string $value Attribute value
*
* @return bool
*/
public function setSMTPXclientAttribute($name, $value)
{
if (!in_array($name, SMTP::$xclient_allowed_attributes)) {
return false;
}
if (isset($this->SMTPXClient[$name]) && $value === null) {
unset($this->SMTPXClient[$name]);
} elseif ($value !== null) {
$this->SMTPXClient[$name] = $value;
}
return true;
}
/**
* Get SMTP XCLIENT attributes
*
* @return array
*/
public function getSMTPXclientAttributes()
{
return $this->SMTPXClient;
}
/**
* Send mail via SMTP.
* Returns false if there is a bad MAIL FROM, RCPT, or DATA input.
@@ -2029,6 +2068,9 @@ class PHPMailer
} else {
$smtp_from = $this->Sender;
}
if (count($this->SMTPXClient)) {
$this->smtp->xclient($this->SMTPXClient);
}
if (!$this->smtp->mail($smtp_from)) {
$this->setError($this->lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError()));
throw new Exception($this->ErrorInfo, self::STOP_CRITICAL);
@@ -2191,10 +2233,17 @@ class PHPMailer
$this->smtp->hello($hello);
//Automatically enable TLS encryption if:
//* it's not disabled
//* we are not connecting to localhost
//* we have openssl extension
//* we are not already using SSL
//* the server offers STARTTLS
if ($this->SMTPAutoTLS && $sslext && 'ssl' !== $secure && $this->smtp->getServerExt('STARTTLS')) {
if (
$this->SMTPAutoTLS &&
$this->Host !== 'localhost' &&
$sslext &&
$secure !== 'ssl' &&
$this->smtp->getServerExt('STARTTLS')
) {
$tls = true;
}
if ($tls) {
@@ -4051,6 +4100,79 @@ class PHPMailer
$this->CustomHeader = [];
}
/**
* Clear a specific custom header by name or name and value.
* $name value can be overloaded to contain
* both header name and value (name:value).
*
* @param string $name Custom header name
* @param string|null $value Header value
*
* @return bool True if a header was replaced successfully
*/
public function clearCustomHeader($name, $value = null)
{
if (null === $value && strpos($name, ':') !== false) {
//Value passed in as name:value
list($name, $value) = explode(':', $name, 2);
}
$name = trim($name);
$value = (null === $value) ? null : trim($value);
foreach ($this->CustomHeader as $k => $pair) {
if ($pair[0] == $name) {
// We remove the header if the value is not provided or it matches.
if (null === $value || $pair[1] == $value) {
unset($this->CustomHeader[$k]);
}
}
}
return true;
}
/**
* Replace a custom header.
* $name value can be overloaded to contain
* both header name and value (name:value).
*
* @param string $name Custom header name
* @param string|null $value Header value
*
* @return bool True if a header was replaced successfully
* @throws Exception
*/
public function replaceCustomHeader($name, $value = null)
{
if (null === $value && strpos($name, ':') !== false) {
//Value passed in as name:value
list($name, $value) = explode(':', $name, 2);
}
$name = trim($name);
$value = (null === $value) ? '' : trim($value);
$replaced = false;
foreach ($this->CustomHeader as $k => $pair) {
if ($pair[0] == $name) {
if ($replaced) {
unset($this->CustomHeader[$k]);
continue;
}
if (strpbrk($name . $value, "\r\n") !== false) {
if ($this->exceptions) {
throw new Exception($this->lang('invalid_header'));
}
return false;
}
$this->CustomHeader[$k] = [$name, $value];
$replaced = true;
}
}
return true;
}
/**
* Add an error message to the error container.
*

View File

@@ -46,7 +46,7 @@ class POP3
*
* @var string
*/
const VERSION = '6.8.1';
const VERSION = '6.9.1';
/**
* Default POP3 port number.

View File

@@ -35,7 +35,7 @@ class SMTP
*
* @var string
*/
const VERSION = '6.8.1';
const VERSION = '6.9.1';
/**
* SMTP line break constant.
@@ -198,6 +198,18 @@ class SMTP
'Mailjet' => '/[\d]{3} OK queued as (.*)/',
];
/**
* Allowed SMTP XCLIENT attributes.
* Must be allowed by the SMTP server. EHLO response is not checked.
*
* @see https://www.postfix.org/XCLIENT_README.html
*
* @var array
*/
public static $xclient_allowed_attributes = [
'NAME', 'ADDR', 'PORT', 'PROTO', 'HELO', 'LOGIN', 'DESTADDR', 'DESTPORT'
];
/**
* The last transaction ID issued in response to a DATA command,
* if one was detected.
@@ -971,6 +983,25 @@ class SMTP
);
}
/**
* Send SMTP XCLIENT command to server and check its return code.
*
* @return bool True on success
*/
public function xclient(array $vars)
{
$xclient_options = "";
foreach ($vars as $key => $value) {
if (in_array($key, SMTP::$xclient_allowed_attributes)) {
$xclient_options .= " {$key}={$value}";
}
}
if (!$xclient_options) {
return true;
}
return $this->sendCommand('XCLIENT', 'XCLIENT' . $xclient_options, 250);
}
/**
* Send an SMTP RSET command.
* Abort any transaction that is currently in progress.

270
vendor/setasign/fpdf/FAQ.htm vendored Normal file
View File

@@ -0,0 +1,270 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>FAQ</title>
<link type="text/css" rel="stylesheet" href="fpdf.css">
<style type="text/css">
ul {list-style-type:none; margin:0; padding:0}
ul#answers li {margin-top:1.8em}
.question {font-weight:bold; color:#900000}
</style>
</head>
<body>
<h1>FAQ</h1>
<ul>
<li><b>1.</b> <a href='#q1'>What's exactly the license of FPDF? Are there any usage restrictions?</a></li>
<li><b>2.</b> <a href='#q2'>I get the following error when I try to generate a PDF: Some data has already been output, can't send PDF file</a></li>
<li><b>3.</b> <a href='#q3'>Accented letters are replaced by some strange characters like é.</a></li>
<li><b>4.</b> <a href='#q4'>I try to display the Euro symbol but it doesn't work.</a></li>
<li><b>5.</b> <a href='#q5'>I try to display a variable in the Header method but nothing prints.</a></li>
<li><b>6.</b> <a href='#q6'>I have defined the Header and Footer methods in my PDF class but nothing shows.</a></li>
<li><b>7.</b> <a href='#q7'>I can't make line breaks work. I put \n in the string printed by MultiCell but it doesn't work.</a></li>
<li><b>8.</b> <a href='#q8'>I use jQuery to generate the PDF but it doesn't show.</a></li>
<li><b>9.</b> <a href='#q9'>I draw a frame with very precise dimensions, but when printed I notice some differences.</a></li>
<li><b>10.</b> <a href='#q10'>I'd like to use the whole surface of the page, but when printed I always have some margins. How can I get rid of them?</a></li>
<li><b>11.</b> <a href='#q11'>How can I put a background in my PDF?</a></li>
<li><b>12.</b> <a href='#q12'>How can I set a specific header or footer on the first page?</a></li>
<li><b>13.</b> <a href='#q13'>I'd like to use extensions provided by different scripts. How can I combine them?</a></li>
<li><b>14.</b> <a href='#q14'>How can I open the PDF in a new tab?</a></li>
<li><b>15.</b> <a href='#q15'>How can I send the PDF by email?</a></li>
<li><b>16.</b> <a href='#q16'>What's the limit of the file sizes I can generate with FPDF?</a></li>
<li><b>17.</b> <a href='#q17'>Can I modify a PDF with FPDF?</a></li>
<li><b>18.</b> <a href='#q18'>I'd like to make a search engine in PHP and index PDF files. Can I do it with FPDF?</a></li>
<li><b>19.</b> <a href='#q19'>Can I convert an HTML page to PDF with FPDF?</a></li>
<li><b>20.</b> <a href='#q20'>Can I concatenate PDF files with FPDF?</a></li>
</ul>
<ul id='answers'>
<li id='q1'>
<p><b>1.</b> <span class='question'>What's exactly the license of FPDF? Are there any usage restrictions?</span></p>
FPDF is released under a permissive license: there is no usage restriction. You may embed it
freely in your application (commercial or not), with or without modifications.
</li>
<li id='q2'>
<p><b>2.</b> <span class='question'>I get the following error when I try to generate a PDF: Some data has already been output, can't send PDF file</span></p>
You must send nothing to the browser except the PDF itself: no HTML, no space, no carriage return. A common
case is having extra blank at the end of an included script file.<br>
<br>
The message may be followed by this indication:<br>
<br>
(output started at script.php:X)<br>
<br>
which gives you exactly the script and line number responsible for the output. If you don't see it,
try adding this line at the very beginning of your script:
<div class="doc-source">
<pre><code>ob_end_clean();</code></pre>
</div>
</li>
<li id='q3'>
<p><b>3.</b> <span class='question'>Accented letters are replaced by some strange characters like é.</span></p>
Don't use UTF-8 with the standard fonts; they expect text encoded in windows-1252.
You can perform a conversion with iconv:
<div class="doc-source">
<pre><code>$str = iconv('UTF-8', 'windows-1252', $str);</code></pre>
</div>
Or with mbstring:
<div class="doc-source">
<pre><code>$str = mb_convert_encoding($str, 'windows-1252', 'UTF-8');</code></pre>
</div>
In case you need characters outside windows-1252, take a look at tutorial #7 or
<a href="http://www.fpdf.org/?go=script&amp;id=92" target="_blank">tFPDF</a>.
</li>
<li id='q4'>
<p><b>4.</b> <span class='question'>I try to display the Euro symbol but it doesn't work.</span></p>
The standard fonts have the Euro character at position 128. You can define a constant like this
for convenience:
<div class="doc-source">
<pre><code>define('EURO', chr(128));</code></pre>
</div>
</li>
<li id='q5'>
<p><b>5.</b> <span class='question'>I try to display a variable in the Header method but nothing prints.</span></p>
You have to use the <code>global</code> keyword to access global variables, for example:
<div class="doc-source">
<pre><code>function Header()
{
global $title;
$this-&gt;SetFont('Arial', 'B', 15);
$this-&gt;Cell(0, 10, $title, 1, 1, 'C');
}
$title = 'My title';</code></pre>
</div>
Alternatively, you can use an object property:
<div class="doc-source">
<pre><code>function Header()
{
$this-&gt;SetFont('Arial', 'B', 15);
$this-&gt;Cell(0, 10, $this-&gt;title, 1, 1, 'C');
}
$pdf-&gt;title = 'My title';</code></pre>
</div>
</li>
<li id='q6'>
<p><b>6.</b> <span class='question'>I have defined the Header and Footer methods in my PDF class but nothing shows.</span></p>
You have to create an object from the PDF class, not FPDF:
<div class="doc-source">
<pre><code>$pdf = new PDF();</code></pre>
</div>
</li>
<li id='q7'>
<p><b>7.</b> <span class='question'>I can't make line breaks work. I put \n in the string printed by MultiCell but it doesn't work.</span></p>
You have to enclose your string with double quotes, not single ones.
</li>
<li id='q8'>
<p><b>8.</b> <span class='question'>I use jQuery to generate the PDF but it doesn't show.</span></p>
Don't use an AJAX request to retrieve the PDF.
</li>
<li id='q9'>
<p><b>9.</b> <span class='question'>I draw a frame with very precise dimensions, but when printed I notice some differences.</span></p>
To respect dimensions, select "None" for the Page Scaling setting instead of "Shrink to Printable Area" in the print dialog box.
</li>
<li id='q10'>
<p><b>10.</b> <span class='question'>I'd like to use the whole surface of the page, but when printed I always have some margins. How can I get rid of them?</span></p>
Printers have physical margins (different depending on the models); it is therefore impossible to remove
them and print on the whole surface of the paper.
</li>
<li id='q11'>
<p><b>11.</b> <span class='question'>How can I put a background in my PDF?</span></p>
For a picture, call Image() in the Header() method, before any other output. To set a background color, use Rect().
</li>
<li id='q12'>
<p><b>12.</b> <span class='question'>How can I set a specific header or footer on the first page?</span></p>
Just test the page number:
<div class="doc-source">
<pre><code>function Header()
{
if($this-&gt;PageNo()==1)
{
//First page
...
}
else
{
//Other pages
...
}
}</code></pre>
</div>
</li>
<li id='q13'>
<p><b>13.</b> <span class='question'>I'd like to use extensions provided by different scripts. How can I combine them?</span></p>
Use an inheritance chain. If you have two classes, say A in a.php:
<div class="doc-source">
<pre><code>require('fpdf.php');
class A extends FPDF
{
...
}</code></pre>
</div>
and B in b.php:
<div class="doc-source">
<pre><code>require('fpdf.php');
class B extends FPDF
{
...
}</code></pre>
</div>
then make B extend A:
<div class="doc-source">
<pre><code>require('a.php');
class B extends A
{
...
}</code></pre>
</div>
and make your own class extend B:
<div class="doc-source">
<pre><code>require('b.php');
class PDF extends B
{
...
}
$pdf = new PDF();</code></pre>
</div>
</li>
<li id='q14'>
<p><b>14.</b> <span class='question'>How can I open the PDF in a new tab?</span></p>
Just do the same as you would for an HTML page or anything else: add a target="_blank" to your link or form.
</li>
<li id='q15'>
<p><b>15.</b> <span class='question'>How can I send the PDF by email?</span></p>
As for any other file, but an easy way is to use <a href="https://github.com/PHPMailer/PHPMailer" target="_blank">PHPMailer</a> and
its in-memory attachment:
<div class="doc-source">
<pre><code>$mail = new PHPMailer();
...
$doc = $pdf-&gt;Output('S');
$mail-&gt;AddStringAttachment($doc, 'doc.pdf', 'base64', 'application/pdf');
$mail-&gt;Send();</code></pre>
</div>
</li>
<li id='q16'>
<p><b>16.</b> <span class='question'>What's the limit of the file sizes I can generate with FPDF?</span></p>
There is no particular limit. There are some constraints, however:
<br>
<br>
- There is usually a maximum memory size allocated to PHP scripts. For very big documents,
especially with images, the limit may be reached (the file being built in memory). The
parameter is configured in the php.ini file.
<br>
<br>
- The maximum execution time allocated to scripts defaults to 30 seconds. This limit can of course
be easily reached. It is configured in php.ini and may be altered dynamically with set_time_limit().
<br>
<br>
You can work around the memory limit with <a href="http://www.fpdf.org/?go=script&amp;id=76" target="_blank">this script</a>.
</li>
<li id='q17'>
<p><b>17.</b> <span class='question'>Can I modify a PDF with FPDF?</span></p>
It's possible to import pages from an existing PDF document thanks to the
<a href="https://www.setasign.com/products/fpdi/about/" target="_blank">FPDI</a> extension.
Then you can add some content to them.
</li>
<li id='q18'>
<p><b>18.</b> <span class='question'>I'd like to make a search engine in PHP and index PDF files. Can I do it with FPDF?</span></p>
No. But a GPL C utility does exist, pdftotext, which is able to extract the textual content from a PDF.
It's provided with the <a href="https://www.xpdfreader.com" target="_blank">Xpdf</a> package.
</li>
<li id='q19'>
<p><b>19.</b> <span class='question'>Can I convert an HTML page to PDF with FPDF?</span></p>
Not real-world pages. But a GPL C utility does exist, <a href="https://www.msweet.org/htmldoc/" target="_blank">HTMLDOC</a>,
which allows to do it and gives good results.
</li>
<li id='q20'>
<p><b>20.</b> <span class='question'>Can I concatenate PDF files with FPDF?</span></p>
Not directly, but it's possible to use <a href="https://www.setasign.com/products/fpdi/demos/concatenate-fake/" target="_blank">FPDI</a>
to perform that task. Some free command-line tools also exist:
<a href="https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/" target="_blank">pdftk</a> and
<a href="http://thierry.schmit.free.fr/spip/spip.php?article15" target="_blank">mbtPdfAsm</a>.
</li>
</ul>
</body>
</html>

21
vendor/setasign/fpdf/README.md vendored Normal file
View File

@@ -0,0 +1,21 @@
# FPDF
**This repository is only made for cloning official FPDF releases which are available at: http://www.fpdf.org**
**THERE WILL BE NO DEVELOPMENT IN THIS REPOSITORY!**
FPDF is a PHP class which allows to generate PDF files with pure PHP. F from FPDF stands for Free: you may use it for any kind of usage and modify it to suit your needs.
## Installation with [Composer](https://packagist.org/packages/setasign/fpdf)
If you're using Composer to manage dependencies, you can use
$ composer require setasign/fpdf:^1.8
or you can include the following in your composer.json file:
```json
{
"require": {
"setasign/fpdf": "^1.8"
}
}
```

188
vendor/setasign/fpdf/changelog.htm vendored Normal file
View File

@@ -0,0 +1,188 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Changelog</title>
<link type="text/css" rel="stylesheet" href="fpdf.css">
<style type="text/css">
dd {margin:1em 0 1em 1em}
</style>
</head>
<body>
<h1>Changelog</h1>
<dl>
<dt><strong>v1.86</strong> (2023-06-25)</dt>
<dd>
- Added a parameter to AddFont() to specify the directory where to load the font definition file.<br>
- Fixed a bug related to the PDF creation date.<br>
</dd>
<dt><strong>v1.85</strong> (2022-11-10)</dt>
<dd>
- Removed deprecation notices on PHP 8.2.<br>
- Removed notices when passing null values instead of strings.<br>
- The FPDF_VERSION constant was replaced by a class constant.<br>
- The creation date of the PDF now includes the timezone.<br>
- The content-type is now always application/pdf, even for downloads.<br>
</dd>
<dt><strong>v1.84</strong> (2021-08-28)</dt>
<dd>
- Fixed an issue related to annotations.<br>
</dd>
<dt><strong>v1.83</strong> (2021-04-18)</dt>
<dd>
- Fixed an issue related to annotations.<br>
</dd>
<dt><strong>v1.82</strong> (2019-12-07)</dt>
<dd>
- Removed a deprecation notice on PHP 7.4.<br>
</dd>
<dt><strong>v1.81</strong> (2015-12-20)</dt>
<dd>
- Added GetPageWidth() and GetPageHeight().<br>
- Fixed a bug in SetXY().<br>
</dd>
<dt><strong>v1.8</strong> (2015-11-29)</dt>
<dd>
- PHP 5.1.0 or higher is now required.<br>
- The MakeFont utility now subsets fonts, which can greatly reduce font sizes.<br>
- Added ToUnicode CMaps to improve text extraction.<br>
- Added a parameter to AddPage() to rotate the page.<br>
- Added a parameter to SetY() to indicate whether the x position should be reset or not.<br>
- Added a parameter to Output() to specify the encoding of the name, and special characters are now properly encoded. Additionally the order of the first two parameters was reversed to be more logical (however the old order is still supported for compatibility).<br>
- The Error() method now throws an exception.<br>
- Adding contents before the first AddPage() or after Close() now raises an error.<br>
- Outputting text with no font selected now raises an error.<br>
</dd>
<dt><strong>v1.7</strong> (2011-06-18)</dt>
<dd>
- The MakeFont utility has been completely rewritten and doesn't depend on ttf2pt1 anymore.<br>
- Alpha channel is now supported for PNGs.<br>
- When inserting an image, it's now possible to specify its resolution.<br>
- Default resolution for images was increased from 72 to 96 dpi.<br>
- When inserting a GIF image, no temporary file is used anymore if the PHP version is 5.1 or higher.<br>
- When output buffering is enabled and the PDF is about to be sent, the buffer is now cleared if it contains only a UTF-8 BOM and/or whitespace (instead of throwing an error).<br>
- Symbol and ZapfDingbats fonts now support underline style.<br>
- Custom page sizes are now checked to ensure that width is smaller than height.<br>
- Standard font files were changed to use the same format as user fonts.<br>
- A bug in the embedding of Type1 fonts was fixed.<br>
- A bug related to SetDisplayMode() and the current locale was fixed.<br>
- A display issue occurring with the Adobe Reader X plug-in was fixed.<br>
- An issue related to transparency with some versions of Adobe Reader was fixed.<br>
- The Content-Length header was removed because it caused an issue when the HTTP server applies compression.<br>
</dd>
<dt><strong>v1.6</strong> (2008-08-03)</dt>
<dd>
- PHP 4.3.10 or higher is now required.<br>
- GIF image support.<br>
- Images can now trigger page breaks.<br>
- Possibility to have different page formats in a single document.<br>
- Document properties (author, creator, keywords, subject and title) can now be specified in UTF-8.<br>
- Fixed a bug: when a PNG was inserted through a URL, an error sometimes occurred.<br>
- An automatic page break in Header() doesn't cause an infinite loop any more.<br>
- Removed some warning messages appearing with recent PHP versions.<br>
- Added HTTP headers to reduce problems with IE.<br>
</dd>
<dt><strong>v1.53</strong> (2004-12-31)</dt>
<dd>
- When the font subdirectory is in the same directory as fpdf.php, it's no longer necessary to define the FPDF_FONTPATH constant.<br>
- The array $HTTP_SERVER_VARS is no longer used. It could cause trouble on PHP5-based configurations with the register_long_arrays option disabled.<br>
- Fixed a problem related to Type1 font embedding which caused trouble to some PDF processors.<br>
- The file name sent to the browser could not contain a space character.<br>
- The Cell() method could not print the number 0 (you had to pass the string '0').<br>
</dd>
<dt><strong>v1.52</strong> (2003-12-30)</dt>
<dd>
- Image() now displays the image at 72 dpi if no dimension is given.<br>
- Output() takes a string as second parameter to indicate destination.<br>
- Open() is now called automatically by AddPage().<br>
- Inserting remote JPEG images doesn't generate an error any longer.<br>
- Decimal separator is forced to dot in the constructor.<br>
- Added several encodings (Turkish, Thai, Hebrew, Ukrainian and Vietnamese).<br>
- The last line of a right-aligned MultiCell() was not correctly aligned if it was terminated by a carriage return.<br>
- No more error message about already sent headers when outputting the PDF to the standard output from the command line.<br>
- The underlining was going too far for text containing characters \, ( or ).<br>
- $HTTP_ENV_VARS has been replaced by $HTTP_SERVER_VARS.<br>
</dd>
<dt><strong>v1.51</strong> (2002-08-03)</dt>
<dd>
- Type1 font support.<br>
- Added Baltic encoding.<br>
- The class now works internally in points with the origin at the bottom in order to avoid two bugs occurring with Acrobat 5:<br>&nbsp;&nbsp;* The line thickness was too large when printed on Windows 98 SE and ME.<br>&nbsp;&nbsp;* TrueType fonts didn't appear immediately inside the plug-in (a substitution font was used), one had to cause a window refresh to make them show up.<br>
- It's no longer necessary to set the decimal separator as dot to produce valid documents.<br>
- The clickable area in a cell was always on the left independently from the text alignment.<br>
- JPEG images in CMYK mode appeared in inverted colors.<br>
- Transparent PNG images in grayscale or true color mode were incorrectly handled.<br>
- Adding new fonts now works correctly even with the magic_quotes_runtime option set to on.<br>
</dd>
<dt><strong>v1.5</strong> (2002-05-28)</dt>
<dd>
- TrueType font (AddFont()) and encoding support (Western and Eastern Europe, Cyrillic and Greek).<br>
- Added Write() method.<br>
- Added underlined style.<br>
- Internal and external link support (AddLink(), SetLink(), Link()).<br>
- Added right margin management and methods SetRightMargin(), SetTopMargin().<br>
- Modification of SetDisplayMode() to select page layout.<br>
- The border parameter of MultiCell() now lets choose borders to draw as Cell().<br>
- When a document contains no page, Close() now calls AddPage() instead of causing a fatal error.<br>
</dd>
<dt><strong>v1.41</strong> (2002-03-13)</dt>
<dd>
- Fixed SetDisplayMode() which no longer worked (the PDF viewer used its default display).<br>
</dd>
<dt><strong>v1.4</strong> (2002-03-02)</dt>
<dd>
- PHP3 is no longer supported.<br>
- Page compression (SetCompression()).<br>
- Choice of page format and possibility to change orientation inside document.<br>
- Added AcceptPageBreak() method.<br>
- Ability to print the total number of pages (AliasNbPages()).<br>
- Choice of cell borders to draw.<br>
- New mode for Cell(): the current position can now move under the cell.<br>
- Ability to include an image by specifying height only (width is calculated automatically).<br>
- Fixed a bug: when a justified line triggered a page break, the footer inherited the corresponding word spacing.<br>
</dd>
<dt><strong>v1.31</strong> (2002-01-12)</dt>
<dd>
- Fixed a bug in drawing frame with MultiCell(): the last line always started from the left margin.<br>
- Removed Expires HTTP header (gives trouble in some situations).<br>
- Added Content-disposition HTTP header (seems to help in some situations).<br>
</dd>
<dt><strong>v1.3</strong> (2001-12-03)</dt>
<dd>
- Line break and text justification support (MultiCell()).<br>
- Color support (SetDrawColor(), SetFillColor(), SetTextColor()). Possibility to draw filled rectangles and paint cell background.<br>
- A cell whose width is declared null extends up to the right margin of the page.<br>
- Line width is now retained from page to page and defaults to 0.2 mm.<br>
- Added SetXY() method.<br>
- Fixed a passing by reference done in a deprecated manner for PHP4.<br>
</dd>
<dt><strong>v1.2</strong> (2001-11-11)</dt>
<dd>
- Added font metric files and GetStringWidth() method.<br>
- Centering and right-aligning text in cells.<br>
- Display mode control (SetDisplayMode()).<br>
- Added methods to set document properties (SetAuthor(), SetCreator(), SetKeywords(), SetSubject(), SetTitle()).<br>
- Possibility to force PDF download by browser.<br>
- Added SetX() and GetX() methods.<br>
- During automatic page break, current abscissa is now retained.<br>
</dd>
<dt><strong>v1.11</strong> (2001-10-20)</dt>
<dd>
- PNG support doesn't require PHP4/zlib any more. Data are now put directly into PDF without any decompression/recompression stage.<br>
- Image insertion now works correctly even with magic_quotes_runtime option set to on.<br>
</dd>
<dt><strong>v1.1</strong> (2001-10-07)</dt>
<dd>
- JPEG and PNG image support.<br>
</dd>
<dt><strong>v1.01</strong> (2001-10-03)</dt>
<dd>
- Fixed a bug involving page break: in case when Header() doesn't specify a font, the one from previous page was not restored and produced an incorrect document.<br>
</dd>
<dt><strong>v1.0</strong> (2001-09-17)</dt>
<dd>
- First version.<br>
</dd>
</dl>
</body>
</html>

24
vendor/setasign/fpdf/composer.json vendored Normal file
View File

@@ -0,0 +1,24 @@
{
"name": "setasign/fpdf",
"homepage": "http://www.fpdf.org",
"description": "FPDF is a PHP class which allows to generate PDF files with pure PHP. F from FPDF stands for Free: you may use it for any kind of usage and modify it to suit your needs.",
"type": "library",
"keywords": ["pdf", "fpdf"],
"license": "MIT",
"authors": [
{
"name": "Olivier Plathey",
"email": "oliver@fpdf.org",
"homepage": "http://fpdf.org/"
}
],
"autoload": {
"classmap": [
"fpdf.php"
]
},
"require": {
"ext-zlib": "*",
"ext-gd": "*"
}
}

View File

@@ -0,0 +1,63 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>__construct</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>__construct</h1>
<code>__construct([<b>string</b> orientation [, <b>string</b> unit [, <b>mixed</b> size]]])</code>
<h2>Description</h2>
This is the class constructor. It allows to set up the page size, the orientation and the
unit of measure used in all methods (except for font sizes).
<h2>Parameters</h2>
<dl class="param">
<dt><code>orientation</code></dt>
<dd>
Default page orientation. Possible values are (case insensitive):
<ul>
<li><code>P</code> or <code>Portrait</code></li>
<li><code>L</code> or <code>Landscape</code></li>
</ul>
Default value is <code>P</code>.
</dd>
<dt><code>unit</code></dt>
<dd>
User unit. Possible values are:
<ul>
<li><code>pt</code>: point</li>
<li><code>mm</code>: millimeter</li>
<li><code>cm</code>: centimeter</li>
<li><code>in</code>: inch</li>
</ul>
A point equals 1/72 of inch, that is to say about 0.35 mm (an inch being 2.54 cm). This
is a very common unit in typography; font sizes are expressed in that unit.
<br>
<br>
Default value is <code>mm</code>.
</dd>
<dt><code>size</code></dt>
<dd>
The size used for pages. It can be either one of the following values (case insensitive):
<ul>
<li><code>A3</code></li>
<li><code>A4</code></li>
<li><code>A5</code></li>
<li><code>Letter</code></li>
<li><code>Legal</code></li>
</ul>
or an array containing the width and the height (expressed in the unit given by <code>unit</code>).<br>
<br>
Default value is <code>A4</code>.
</dd>
</dl>
<h2>Example</h2>
Document with a custom 100x150 mm page size:
<div class="doc-source">
<pre><code>$pdf = new FPDF('P', 'mm', array(100,150));</code></pre>
</div>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

View File

@@ -0,0 +1,63 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>AcceptPageBreak</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>AcceptPageBreak</h1>
<code><b>boolean</b> AcceptPageBreak()</code>
<h2>Description</h2>
Whenever a page break condition is met, the method is called, and the break is issued or not
depending on the returned value. The default implementation returns a value according to the
mode selected by SetAutoPageBreak().
<br>
This method is called automatically and should not be called directly by the application.
<h2>Example</h2>
The method is overriden in an inherited class in order to obtain a 3 column layout:
<div class="doc-source">
<pre><code>class PDF extends FPDF
{
protected $col = 0;
function SetCol($col)
{
// Move position to a column
$this-&gt;col = $col;
$x = 10 + $col*65;
$this-&gt;SetLeftMargin($x);
$this-&gt;SetX($x);
}
function AcceptPageBreak()
{
if($this-&gt;col&lt;2)
{
// Go to next column
$this-&gt;SetCol($this-&gt;col+1);
$this-&gt;SetY(10);
return false;
}
else
{
// Go back to first column and issue page break
$this-&gt;SetCol(0);
return true;
}
}
}
$pdf = new PDF();
$pdf-&gt;AddPage();
$pdf-&gt;SetFont('Arial', '', 12);
for($i=1;$i&lt;=300;$i++)
$pdf-&gt;Cell(0, 5, "Line $i", 0, 1);
$pdf-&gt;Output();</code></pre>
</div>
<h2>See also</h2>
<a href="setautopagebreak.htm">SetAutoPageBreak</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

67
vendor/setasign/fpdf/doc/addfont.htm vendored Normal file
View File

@@ -0,0 +1,67 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>AddFont</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>AddFont</h1>
<code>AddFont(<b>string</b> family [, <b>string</b> style [, <b>string</b> file [, <b>string</b> dir]]])</code>
<h2>Description</h2>
Imports a TrueType, OpenType or Type1 font and makes it available. It is necessary to generate a font
definition file first with the MakeFont utility.
<br>
<br>
The definition file (and the font file itself in case of embedding) must be present in:
<ul>
<li>The directory indicated by the 4th parameter (if that parameter is set)</li>
<li>The directory indicated by the <code>FPDF_FONTPATH</code> constant (if that constant is defined)</li>
<li>The <code>font</code> directory located in the same directory as <code>fpdf.php</code></li>
</ul>
If the file is not found, the error "Could not include font definition file" is raised.
<h2>Parameters</h2>
<dl class="param">
<dt><code>family</code></dt>
<dd>
Font family. The name can be chosen arbitrarily. If it is a standard family name, it will
override the corresponding font.
</dd>
<dt><code>style</code></dt>
<dd>
Font style. Possible values are (case insensitive):
<ul>
<li>empty string: regular</li>
<li><code>B</code>: bold</li>
<li><code>I</code>: italic</li>
<li><code>BI</code> or <code>IB</code>: bold italic</li>
</ul>
The default value is regular.
</dd>
<dt><code>file</code></dt>
<dd>
The name of the font definition file.
<br>
By default, it is built from the family and style, in lower case with no space.
</dd>
<dt><code>dir</code></dt>
<dd>
The directory where to load the definition file.
<br>
If not specified, the default directory will be used.
</dd>
</dl>
<h2>Example</h2>
<div class="doc-source">
<pre><code>$pdf-&gt;AddFont('Comic', 'I');</code></pre>
</div>
is equivalent to:
<div class="doc-source">
<pre><code>$pdf-&gt;AddFont('Comic', 'I', 'comici.php');</code></pre>
</div>
<h2>See also</h2>
<a href="setfont.htm">SetFont</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

26
vendor/setasign/fpdf/doc/addlink.htm vendored Normal file
View File

@@ -0,0 +1,26 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>AddLink</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>AddLink</h1>
<code><b>int</b> AddLink()</code>
<h2>Description</h2>
Creates a new internal link and returns its identifier. An internal link is a clickable area
which directs to another place within the document.
<br>
The identifier can then be passed to Cell(), Write(), Image() or Link(). The destination is
defined with SetLink().
<h2>See also</h2>
<a href="cell.htm">Cell</a>,
<a href="write.htm">Write</a>,
<a href="image.htm">Image</a>,
<a href="link.htm">Link</a>,
<a href="setlink.htm">SetLink</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

61
vendor/setasign/fpdf/doc/addpage.htm vendored Normal file
View File

@@ -0,0 +1,61 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>AddPage</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>AddPage</h1>
<code>AddPage([<b>string</b> orientation [, <b>mixed</b> size [, <b>int</b> rotation]]])</code>
<h2>Description</h2>
Adds a new page to the document. If a page is already present, the Footer() method is called
first to output the footer. Then the page is added, the current position set to the top-left
corner according to the left and top margins, and Header() is called to display the header.
<br>
The font which was set before calling is automatically restored. There is no need to call
SetFont() again if you want to continue with the same font. The same is true for colors and
line width.
<br>
The origin of the coordinate system is at the top-left corner and increasing ordinates go
downwards.
<h2>Parameters</h2>
<dl class="param">
<dt><code>orientation</code></dt>
<dd>
Page orientation. Possible values are (case insensitive):
<ul>
<li><code>P</code> or <code>Portrait</code></li>
<li><code>L</code> or <code>Landscape</code></li>
</ul>
The default value is the one passed to the constructor.
</dd>
<dt><code>size</code></dt>
<dd>
Page size. It can be either one of the following values (case insensitive):
<ul>
<li><code>A3</code></li>
<li><code>A4</code></li>
<li><code>A5</code></li>
<li><code>Letter</code></li>
<li><code>Legal</code></li>
</ul>
or an array containing the width and the height (expressed in user unit).<br>
<br>
The default value is the one passed to the constructor.
</dd>
<dt><code>rotation</code></dt>
<dd>
Angle by which to rotate the page. It must be a multiple of 90; positive values
mean clockwise rotation. The default value is <code>0</code>.
</dd>
</dl>
<h2>See also</h2>
<a href="__construct.htm">__construct</a>,
<a href="header.htm">Header</a>,
<a href="footer.htm">Footer</a>,
<a href="setmargins.htm">SetMargins</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

View File

@@ -0,0 +1,45 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>AliasNbPages</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>AliasNbPages</h1>
<code>AliasNbPages([<b>string</b> alias])</code>
<h2>Description</h2>
Defines an alias for the total number of pages. It will be substituted as the document is
closed.
<h2>Parameters</h2>
<dl class="param">
<dt><code>alias</code></dt>
<dd>
The alias. Default value: <code>{nb}</code>.
</dd>
</dl>
<h2>Example</h2>
<div class="doc-source">
<pre><code>class PDF extends FPDF
{
function Footer()
{
// Go to 1.5 cm from bottom
$this-&gt;SetY(-15);
// Select Arial italic 8
$this-&gt;SetFont('Arial', 'I', 8);
// Print current and total page numbers
$this-&gt;Cell(0, 10, 'Page '.$this-&gt;PageNo().'/{nb}', 0, 0, 'C');
}
}
$pdf = new PDF();
$pdf-&gt;AliasNbPages();</code></pre>
</div>
<h2>See also</h2>
<a href="pageno.htm">PageNo</a>,
<a href="footer.htm">Footer</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

104
vendor/setasign/fpdf/doc/cell.htm vendored Normal file
View File

@@ -0,0 +1,104 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Cell</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>Cell</h1>
<code>Cell(<b>float</b> w [, <b>float</b> h [, <b>string</b> txt [, <b>mixed</b> border [, <b>int</b> ln [, <b>string</b> align [, <b>boolean</b> fill [, <b>mixed</b> link]]]]]]])</code>
<h2>Description</h2>
Prints a cell (rectangular area) with optional borders, background color and character string.
The upper-left corner of the cell corresponds to the current position. The text can be aligned
or centered. After the call, the current position moves to the right or to the next line. It is
possible to put a link on the text.
<br>
If automatic page breaking is enabled and the cell goes beyond the limit, a page break is
done before outputting.
<h2>Parameters</h2>
<dl class="param">
<dt><code>w</code></dt>
<dd>
Cell width. If <code>0</code>, the cell extends up to the right margin.
</dd>
<dt><code>h</code></dt>
<dd>
Cell height.
Default value: <code>0</code>.
</dd>
<dt><code>txt</code></dt>
<dd>
String to print.
Default value: empty string.
</dd>
<dt><code>border</code></dt>
<dd>
Indicates if borders must be drawn around the cell. The value can be either a number:
<ul>
<li><code>0</code>: no border</li>
<li><code>1</code>: frame</li>
</ul>
or a string containing some or all of the following characters (in any order):
<ul>
<li><code>L</code>: left</li>
<li><code>T</code>: top</li>
<li><code>R</code>: right</li>
<li><code>B</code>: bottom</li>
</ul>
Default value: <code>0</code>.
</dd>
<dt><code>ln</code></dt>
<dd>
Indicates where the current position should go after the call. Possible values are:
<ul>
<li><code>0</code>: to the right</li>
<li><code>1</code>: to the beginning of the next line</li>
<li><code>2</code>: below</li>
</ul>
Putting <code>1</code> is equivalent to putting <code>0</code> and calling Ln() just after.
Default value: <code>0</code>.
</dd>
<dt><code>align</code></dt>
<dd>
Allows to center or align the text. Possible values are:
<ul>
<li><code>L</code> or empty string: left align (default value)</li>
<li><code>C</code>: center</li>
<li><code>R</code>: right align</li>
</ul>
</dd>
<dt><code>fill</code></dt>
<dd>
Indicates if the cell background must be painted (<code>true</code>) or transparent (<code>false</code>).
Default value: <code>false</code>.
</dd>
<dt><code>link</code></dt>
<dd>
URL or identifier returned by AddLink().
</dd>
</dl>
<h2>Example</h2>
<div class="doc-source">
<pre><code>// Set font
$pdf-&gt;SetFont('Arial', 'B', 16);
// Move to 8 cm to the right
$pdf-&gt;Cell(80);
// Centered text in a framed 20*10 mm cell and line break
$pdf-&gt;Cell(20, 10, 'Title', 1, 1, 'C');</code></pre>
</div>
<h2>See also</h2>
<a href="setfont.htm">SetFont</a>,
<a href="setdrawcolor.htm">SetDrawColor</a>,
<a href="setfillcolor.htm">SetFillColor</a>,
<a href="settextcolor.htm">SetTextColor</a>,
<a href="setlinewidth.htm">SetLineWidth</a>,
<a href="addlink.htm">AddLink</a>,
<a href="ln.htm">Ln</a>,
<a href="multicell.htm">MultiCell</a>,
<a href="write.htm">Write</a>,
<a href="setautopagebreak.htm">SetAutoPageBreak</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

21
vendor/setasign/fpdf/doc/close.htm vendored Normal file
View File

@@ -0,0 +1,21 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Close</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>Close</h1>
<code>Close()</code>
<h2>Description</h2>
Terminates the PDF document. It is not necessary to call this method explicitly because Output()
does it automatically.
<br>
If the document contains no page, AddPage() is called to prevent from getting an invalid document.
<h2>See also</h2>
<a href="output.htm">Output</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

26
vendor/setasign/fpdf/doc/error.htm vendored Normal file
View File

@@ -0,0 +1,26 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Error</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>Error</h1>
<code>Error(<b>string</b> msg)</code>
<h2>Description</h2>
This method is automatically called in case of a fatal error; it simply throws an exception
with the provided message.<br>
An inherited class may override it to customize the error handling but the method should
never return, otherwise the resulting document would probably be invalid.
<h2>Parameters</h2>
<dl class="param">
<dt><code>msg</code></dt>
<dd>
The error message.
</dd>
</dl>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

35
vendor/setasign/fpdf/doc/footer.htm vendored Normal file
View File

@@ -0,0 +1,35 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Footer</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>Footer</h1>
<code>Footer()</code>
<h2>Description</h2>
This method is used to render the page footer. It is automatically called by AddPage() and
Close() and should not be called directly by the application. The implementation in FPDF is
empty, so you have to subclass it and override the method if you want a specific processing.
<h2>Example</h2>
<div class="doc-source">
<pre><code>class PDF extends FPDF
{
function Footer()
{
// Go to 1.5 cm from bottom
$this-&gt;SetY(-15);
// Select Arial italic 8
$this-&gt;SetFont('Arial', 'I', 8);
// Print centered page number
$this-&gt;Cell(0, 10, 'Page '.$this-&gt;PageNo(), 0, 0, 'C');
}
}</code></pre>
</div>
<h2>See also</h2>
<a href="header.htm">Header</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GetPageHeight</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>GetPageHeight</h1>
<code><b>float</b> GetPageHeight()</code>
<h2>Description</h2>
Returns the current page height.
<h2>See also</h2>
<a href="getpagewidth.htm">GetPageWidth</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GetPageWidth</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>GetPageWidth</h1>
<code><b>float</b> GetPageWidth()</code>
<h2>Description</h2>
Returns the current page width.
<h2>See also</h2>
<a href="getpageheight.htm">GetPageHeight</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

View File

@@ -0,0 +1,23 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GetStringWidth</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>GetStringWidth</h1>
<code><b>float</b> GetStringWidth(<b>string</b> s)</code>
<h2>Description</h2>
Returns the length of a string in user unit. A font must be selected.
<h2>Parameters</h2>
<dl class="param">
<dt><code>s</code></dt>
<dd>
The string whose length is to be computed.
</dd>
</dl>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

20
vendor/setasign/fpdf/doc/getx.htm vendored Normal file
View File

@@ -0,0 +1,20 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GetX</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>GetX</h1>
<code><b>float</b> GetX()</code>
<h2>Description</h2>
Returns the abscissa of the current position.
<h2>See also</h2>
<a href="setx.htm">SetX</a>,
<a href="gety.htm">GetY</a>,
<a href="sety.htm">SetY</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

20
vendor/setasign/fpdf/doc/gety.htm vendored Normal file
View File

@@ -0,0 +1,20 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GetY</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>GetY</h1>
<code><b>float</b> GetY()</code>
<h2>Description</h2>
Returns the ordinate of the current position.
<h2>See also</h2>
<a href="sety.htm">SetY</a>,
<a href="getx.htm">GetX</a>,
<a href="setx.htm">SetX</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

37
vendor/setasign/fpdf/doc/header.htm vendored Normal file
View File

@@ -0,0 +1,37 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Header</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>Header</h1>
<code>Header()</code>
<h2>Description</h2>
This method is used to render the page header. It is automatically called by AddPage() and
should not be called directly by the application. The implementation in FPDF is empty, so
you have to subclass it and override the method if you want a specific processing.
<h2>Example</h2>
<div class="doc-source">
<pre><code>class PDF extends FPDF
{
function Header()
{
// Select Arial bold 15
$this-&gt;SetFont('Arial', 'B', 15);
// Move to the right
$this-&gt;Cell(80);
// Framed title
$this-&gt;Cell(30, 10, 'Title', 1, 0, 'C');
// Line break
$this-&gt;Ln(20);
}
}</code></pre>
</div>
<h2>See also</h2>
<a href="footer.htm">Footer</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

99
vendor/setasign/fpdf/doc/image.htm vendored Normal file
View File

@@ -0,0 +1,99 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Image</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>Image</h1>
<code>Image(<b>string</b> file [, <b>float</b> x [, <b>float</b> y [, <b>float</b> w [, <b>float</b> h [, <b>string</b> type [, <b>mixed</b> link]]]]]])</code>
<h2>Description</h2>
Puts an image. The size it will take on the page can be specified in different ways:
<ul>
<li>explicit width and height (expressed in user unit or dpi)</li>
<li>one explicit dimension, the other being calculated automatically in order to keep the original proportions</li>
<li>no explicit dimension, in which case the image is put at 96 dpi</li>
</ul>
Supported formats are JPEG, PNG and GIF. The GD extension is required for GIF.
<br>
<br>
For JPEGs, all flavors are allowed:
<ul>
<li>gray scales</li>
<li>true colors (24 bits)</li>
<li>CMYK (32 bits)</li>
</ul>
For PNGs, are allowed:
<ul>
<li>gray scales on at most 8 bits (256 levels)</li>
<li>indexed colors</li>
<li>true colors (24 bits)</li>
</ul>
For GIFs: in case of an animated GIF, only the first frame is displayed.<br>
<br>
Transparency is supported.<br>
<br>
The format can be specified explicitly or inferred from the file extension.<br>
<br>
It is possible to put a link on the image.<br>
<br>
Remark: if an image is used several times, only one copy is embedded in the file.
<h2>Parameters</h2>
<dl class="param">
<dt><code>file</code></dt>
<dd>
Path or URL of the image.
</dd>
<dt><code>x</code></dt>
<dd>
Abscissa of the upper-left corner. If not specified or equal to <code>null</code>, the current abscissa
is used.
</dd>
<dt><code>y</code></dt>
<dd>
Ordinate of the upper-left corner. If not specified or equal to <code>null</code>, the current ordinate
is used; moreover, a page break is triggered first if necessary (in case automatic page breaking is enabled)
and, after the call, the current ordinate is moved to the bottom of the image.
</dd>
<dt><code>w</code></dt>
<dd>
Width of the image in the page. There are three cases:
<ul>
<li>If the value is positive, it represents the width in user unit</li>
<li>If the value is negative, the absolute value represents the horizontal resolution in dpi</li>
<li>If the value is not specified or equal to zero, it is automatically calculated</li>
</ul>
</dd>
<dt><code>h</code></dt>
<dd>
Height of the image in the page. There are three cases:
<ul>
<li>If the value is positive, it represents the height in user unit</li>
<li>If the value is negative, the absolute value represents the vertical resolution in dpi</li>
<li>If the value is not specified or equal to zero, it is automatically calculated</li>
</ul>
</dd>
<dt><code>type</code></dt>
<dd>
Image format. Possible values are (case insensitive): <code>JPG</code>, <code>JPEG</code>, <code>PNG</code> and <code>GIF</code>.
If not specified, the type is inferred from the file extension.
</dd>
<dt><code>link</code></dt>
<dd>
URL or identifier returned by AddLink().
</dd>
</dl>
<h2>Example</h2>
<div class="doc-source">
<pre><code>// Insert a logo in the top-left corner at 300 dpi
$pdf-&gt;Image('logo.png', 10, 10, -300);
// Insert a dynamic image from a URL
$pdf-&gt;Image('http://chart.googleapis.com/chart?cht=p3&amp;chd=t:60,40&amp;chs=250x100&amp;chl=Hello|World', 60, 30, 90, 0, 'PNG');</code></pre>
</div>
<h2>See also</h2>
<a href="addlink.htm">AddLink</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

59
vendor/setasign/fpdf/doc/index.htm vendored Normal file
View File

@@ -0,0 +1,59 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Documentation</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>Documentation</h1>
<a href="__construct.htm">__construct</a> - constructor<br>
<a href="acceptpagebreak.htm">AcceptPageBreak</a> - accept or not automatic page break<br>
<a href="addfont.htm">AddFont</a> - add a new font<br>
<a href="addlink.htm">AddLink</a> - create an internal link<br>
<a href="addpage.htm">AddPage</a> - add a new page<br>
<a href="aliasnbpages.htm">AliasNbPages</a> - define an alias for number of pages<br>
<a href="cell.htm">Cell</a> - print a cell<br>
<a href="close.htm">Close</a> - terminate the document<br>
<a href="error.htm">Error</a> - fatal error<br>
<a href="footer.htm">Footer</a> - page footer<br>
<a href="getpageheight.htm">GetPageHeight</a> - get current page height<br>
<a href="getpagewidth.htm">GetPageWidth</a> - get current page width<br>
<a href="getstringwidth.htm">GetStringWidth</a> - compute string length<br>
<a href="getx.htm">GetX</a> - get current x position<br>
<a href="gety.htm">GetY</a> - get current y position<br>
<a href="header.htm">Header</a> - page header<br>
<a href="image.htm">Image</a> - output an image<br>
<a href="line.htm">Line</a> - draw a line<br>
<a href="link.htm">Link</a> - put a link<br>
<a href="ln.htm">Ln</a> - line break<br>
<a href="multicell.htm">MultiCell</a> - print text with line breaks<br>
<a href="output.htm">Output</a> - save or send the document<br>
<a href="pageno.htm">PageNo</a> - page number<br>
<a href="rect.htm">Rect</a> - draw a rectangle<br>
<a href="setauthor.htm">SetAuthor</a> - set the document author<br>
<a href="setautopagebreak.htm">SetAutoPageBreak</a> - set the automatic page breaking mode<br>
<a href="setcompression.htm">SetCompression</a> - turn compression on or off<br>
<a href="setcreator.htm">SetCreator</a> - set document creator<br>
<a href="setdisplaymode.htm">SetDisplayMode</a> - set display mode<br>
<a href="setdrawcolor.htm">SetDrawColor</a> - set drawing color<br>
<a href="setfillcolor.htm">SetFillColor</a> - set filling color<br>
<a href="setfont.htm">SetFont</a> - set font<br>
<a href="setfontsize.htm">SetFontSize</a> - set font size<br>
<a href="setkeywords.htm">SetKeywords</a> - associate keywords with document<br>
<a href="setleftmargin.htm">SetLeftMargin</a> - set left margin<br>
<a href="setlinewidth.htm">SetLineWidth</a> - set line width<br>
<a href="setlink.htm">SetLink</a> - set internal link destination<br>
<a href="setmargins.htm">SetMargins</a> - set margins<br>
<a href="setrightmargin.htm">SetRightMargin</a> - set right margin<br>
<a href="setsubject.htm">SetSubject</a> - set document subject<br>
<a href="settextcolor.htm">SetTextColor</a> - set text color<br>
<a href="settitle.htm">SetTitle</a> - set document title<br>
<a href="settopmargin.htm">SetTopMargin</a> - set top margin<br>
<a href="setx.htm">SetX</a> - set current x position<br>
<a href="setxy.htm">SetXY</a> - set current x and y positions<br>
<a href="sety.htm">SetY</a> - set current y position and optionally reset x<br>
<a href="text.htm">Text</a> - print a string<br>
<a href="write.htm">Write</a> - print flowing text<br>
</body>
</html>

38
vendor/setasign/fpdf/doc/line.htm vendored Normal file
View File

@@ -0,0 +1,38 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Line</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>Line</h1>
<code>Line(<b>float</b> x1, <b>float</b> y1, <b>float</b> x2, <b>float</b> y2)</code>
<h2>Description</h2>
Draws a line between two points.
<h2>Parameters</h2>
<dl class="param">
<dt><code>x1</code></dt>
<dd>
Abscissa of first point.
</dd>
<dt><code>y1</code></dt>
<dd>
Ordinate of first point.
</dd>
<dt><code>x2</code></dt>
<dd>
Abscissa of second point.
</dd>
<dt><code>y2</code></dt>
<dd>
Ordinate of second point.
</dd>
</dl>
<h2>See also</h2>
<a href="setlinewidth.htm">SetLineWidth</a>,
<a href="setdrawcolor.htm">SetDrawColor</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

46
vendor/setasign/fpdf/doc/link.htm vendored Normal file
View File

@@ -0,0 +1,46 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Link</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>Link</h1>
<code>Link(<b>float</b> x, <b>float</b> y, <b>float</b> w, <b>float</b> h, <b>mixed</b> link)</code>
<h2>Description</h2>
Puts a link on a rectangular area of the page. Text or image links are generally put via Cell(),
Write() or Image(), but this method can be useful for instance to define a clickable area inside
an image.
<h2>Parameters</h2>
<dl class="param">
<dt><code>x</code></dt>
<dd>
Abscissa of the upper-left corner of the rectangle.
</dd>
<dt><code>y</code></dt>
<dd>
Ordinate of the upper-left corner of the rectangle.
</dd>
<dt><code>w</code></dt>
<dd>
Width of the rectangle.
</dd>
<dt><code>h</code></dt>
<dd>
Height of the rectangle.
</dd>
<dt><code>link</code></dt>
<dd>
URL or identifier returned by AddLink().
</dd>
</dl>
<h2>See also</h2>
<a href="addlink.htm">AddLink</a>,
<a href="cell.htm">Cell</a>,
<a href="write.htm">Write</a>,
<a href="image.htm">Image</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

28
vendor/setasign/fpdf/doc/ln.htm vendored Normal file
View File

@@ -0,0 +1,28 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Ln</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>Ln</h1>
<code>Ln([<b>float</b> h])</code>
<h2>Description</h2>
Performs a line break. The current abscissa goes back to the left margin and the ordinate
increases by the amount passed in parameter.
<h2>Parameters</h2>
<dl class="param">
<dt><code>h</code></dt>
<dd>
The height of the break.
<br>
By default, the value equals the height of the last printed cell.
</dd>
</dl>
<h2>See also</h2>
<a href="cell.htm">Cell</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

76
vendor/setasign/fpdf/doc/multicell.htm vendored Normal file
View File

@@ -0,0 +1,76 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>MultiCell</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>MultiCell</h1>
<code>MultiCell(<b>float</b> w, <b>float</b> h, <b>string</b> txt [, <b>mixed</b> border [, <b>string</b> align [, <b>boolean</b> fill]]])</code>
<h2>Description</h2>
This method allows printing text with line breaks. They can be automatic (as soon as the
text reaches the right border of the cell) or explicit (via the \n character). As many cells
as necessary are output, one below the other.
<br>
Text can be aligned, centered or justified. The cell block can be framed and the background
painted.
<h2>Parameters</h2>
<dl class="param">
<dt><code>w</code></dt>
<dd>
Width of cells. If <code>0</code>, they extend up to the right margin of the page.
</dd>
<dt><code>h</code></dt>
<dd>
Height of cells.
</dd>
<dt><code>txt</code></dt>
<dd>
String to print.
</dd>
<dt><code>border</code></dt>
<dd>
Indicates if borders must be drawn around the cell block. The value can be either a number:
<ul>
<li><code>0</code>: no border</li>
<li><code>1</code>: frame</li>
</ul>
or a string containing some or all of the following characters (in any order):
<ul>
<li><code>L</code>: left</li>
<li><code>T</code>: top</li>
<li><code>R</code>: right</li>
<li><code>B</code>: bottom</li>
</ul>
Default value: <code>0</code>.
</dd>
<dt><code>align</code></dt>
<dd>
Sets the text alignment. Possible values are:
<ul>
<li><code>L</code>: left alignment</li>
<li><code>C</code>: center</li>
<li><code>R</code>: right alignment</li>
<li><code>J</code>: justification (default value)</li>
</ul>
</dd>
<dt><code>fill</code></dt>
<dd>
Indicates if the cell background must be painted (<code>true</code>) or transparent (<code>false</code>).
Default value: <code>false</code>.
</dd>
</dl>
<h2>See also</h2>
<a href="setfont.htm">SetFont</a>,
<a href="setdrawcolor.htm">SetDrawColor</a>,
<a href="setfillcolor.htm">SetFillColor</a>,
<a href="settextcolor.htm">SetTextColor</a>,
<a href="setlinewidth.htm">SetLineWidth</a>,
<a href="cell.htm">Cell</a>,
<a href="write.htm">Write</a>,
<a href="setautopagebreak.htm">SetAutoPageBreak</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

55
vendor/setasign/fpdf/doc/output.htm vendored Normal file
View File

@@ -0,0 +1,55 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Output</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>Output</h1>
<code><b>string</b> Output([<b>string</b> dest [, <b>string</b> name [, <b>boolean</b> isUTF8]]])</code>
<h2>Description</h2>
Send the document to a given destination: browser, file or string. In the case of a browser, the
PDF viewer may be used or a download may be forced.
<br>
The method first calls Close() if necessary to terminate the document.
<h2>Parameters</h2>
<dl class="param">
<dt><code>dest</code></dt>
<dd>
Destination where to send the document. It can be one of the following:
<ul>
<li><code>I</code>: send the file inline to the browser. The PDF viewer is used if available.</li>
<li><code>D</code>: send to the browser and force a file download with the name given by <code>name</code>.</li>
<li><code>F</code>: save to a local file with the name given by <code>name</code> (may include a path).</li>
<li><code>S</code>: return the document as a string.</li>
</ul>
The default value is <code>I</code>.
</dd>
<dt><code>name</code></dt>
<dd>
The name of the file. It is ignored in case of destination <code>S</code>.<br>
The default value is <code>doc.pdf</code>.
</dd>
<dt><code>isUTF8</code></dt>
<dd>
Indicates if <code>name</code> is encoded in ISO-8859-1 (<code>false</code>) or UTF-8 (<code>true</code>).
Only used for destinations <code>I</code> and <code>D</code>.<br>
The default value is <code>false</code>.
</dd>
</dl>
<h2>Example</h2>
Save the document to a local directory:
<div class="doc-source">
<pre><code>$pdf-&gt;Output('F', 'reports/report.pdf');</code></pre>
</div>
Force a download:
<div class="doc-source">
<pre><code>$pdf-&gt;Output('D', 'report.pdf');</code></pre>
</div>
<h2>See also</h2>
<a href="close.htm">Close</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

18
vendor/setasign/fpdf/doc/pageno.htm vendored Normal file
View File

@@ -0,0 +1,18 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>PageNo</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>PageNo</h1>
<code><b>int</b> PageNo()</code>
<h2>Description</h2>
Returns the current page number.
<h2>See also</h2>
<a href="aliasnbpages.htm">AliasNbPages</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

48
vendor/setasign/fpdf/doc/rect.htm vendored Normal file
View File

@@ -0,0 +1,48 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Rect</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>Rect</h1>
<code>Rect(<b>float</b> x, <b>float</b> y, <b>float</b> w, <b>float</b> h [, <b>string</b> style])</code>
<h2>Description</h2>
Outputs a rectangle. It can be drawn (border only), filled (with no border) or both.
<h2>Parameters</h2>
<dl class="param">
<dt><code>x</code></dt>
<dd>
Abscissa of upper-left corner.
</dd>
<dt><code>y</code></dt>
<dd>
Ordinate of upper-left corner.
</dd>
<dt><code>w</code></dt>
<dd>
Width.
</dd>
<dt><code>h</code></dt>
<dd>
Height.
</dd>
<dt><code>style</code></dt>
<dd>
Style of rendering. Possible values are:
<ul>
<li><code>D</code> or empty string: draw. This is the default value.</li>
<li><code>F</code>: fill</li>
<li><code>DF</code> or <code>FD</code>: draw and fill</li>
</ul>
</dd>
</dl>
<h2>See also</h2>
<a href="setlinewidth.htm">SetLineWidth</a>,
<a href="setdrawcolor.htm">SetDrawColor</a>,
<a href="setfillcolor.htm">SetFillColor</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

33
vendor/setasign/fpdf/doc/setauthor.htm vendored Normal file
View File

@@ -0,0 +1,33 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SetAuthor</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>SetAuthor</h1>
<code>SetAuthor(<b>string</b> author [, <b>boolean</b> isUTF8])</code>
<h2>Description</h2>
Defines the author of the document.
<h2>Parameters</h2>
<dl class="param">
<dt><code>author</code></dt>
<dd>
The name of the author.
</dd>
<dt><code>isUTF8</code></dt>
<dd>
Indicates if the string is encoded in ISO-8859-1 (<code>false</code>) or UTF-8 (<code>true</code>).<br>
Default value: <code>false</code>.
</dd>
</dl>
<h2>See also</h2>
<a href="setcreator.htm">SetCreator</a>,
<a href="setkeywords.htm">SetKeywords</a>,
<a href="setsubject.htm">SetSubject</a>,
<a href="settitle.htm">SetTitle</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

View File

@@ -0,0 +1,33 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SetAutoPageBreak</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>SetAutoPageBreak</h1>
<code>SetAutoPageBreak(<b>boolean</b> auto [, <b>float</b> margin])</code>
<h2>Description</h2>
Enables or disables the automatic page breaking mode. When enabling, the second parameter is
the distance from the bottom of the page that defines the triggering limit. By default, the
mode is on and the margin is 2 cm.
<h2>Parameters</h2>
<dl class="param">
<dt><code>auto</code></dt>
<dd>
Boolean indicating if mode should be on or off.
</dd>
<dt><code>margin</code></dt>
<dd>
Distance from the bottom of the page.
</dd>
</dl>
<h2>See also</h2>
<a href="cell.htm">Cell</a>,
<a href="multicell.htm">MultiCell</a>,
<a href="acceptpagebreak.htm">AcceptPageBreak</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

View File

@@ -0,0 +1,31 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SetCompression</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>SetCompression</h1>
<code>SetCompression(<b>boolean</b> compress)</code>
<h2>Description</h2>
Activates or deactivates page compression. When activated, the internal representation of
each page is compressed, which leads to a compression ratio of about 2 for the resulting
document.
<br>
Compression is on by default.
<br>
<br>
<strong>Note:</strong> the Zlib extension is required for this feature. If not present, compression
will be turned off.
<h2>Parameters</h2>
<dl class="param">
<dt><code>compress</code></dt>
<dd>
Boolean indicating if compression must be enabled.
</dd>
</dl>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

34
vendor/setasign/fpdf/doc/setcreator.htm vendored Normal file
View File

@@ -0,0 +1,34 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SetCreator</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>SetCreator</h1>
<code>SetCreator(<b>string</b> creator [, <b>boolean</b> isUTF8])</code>
<h2>Description</h2>
Defines the creator of the document. This is typically the name of the application that
generates the PDF.
<h2>Parameters</h2>
<dl class="param">
<dt><code>creator</code></dt>
<dd>
The name of the creator.
</dd>
<dt><code>isUTF8</code></dt>
<dd>
Indicates if the string is encoded in ISO-8859-1 (<code>false</code>) or UTF-8 (<code>true</code>).<br>
Default value: <code>false</code>.
</dd>
</dl>
<h2>See also</h2>
<a href="setauthor.htm">SetAuthor</a>,
<a href="setkeywords.htm">SetKeywords</a>,
<a href="setsubject.htm">SetSubject</a>,
<a href="settitle.htm">SetTitle</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

View File

@@ -0,0 +1,45 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SetDisplayMode</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>SetDisplayMode</h1>
<code>SetDisplayMode(<b>mixed</b> zoom [, <b>string</b> layout])</code>
<h2>Description</h2>
Defines the way the document is to be displayed by the viewer. The zoom level can be set: pages can be
displayed entirely on screen, occupy the full width of the window, use real size, be scaled by a
specific zooming factor or use viewer default (configured in the Preferences menu of Adobe Reader).
The page layout can be specified too: single at once, continuous display, two columns or viewer
default.
<h2>Parameters</h2>
<dl class="param">
<dt><code>zoom</code></dt>
<dd>
The zoom to use. It can be one of the following string values:
<ul>
<li><code>fullpage</code>: displays the entire page on screen</li>
<li><code>fullwidth</code>: uses maximum width of window</li>
<li><code>real</code>: uses real size (equivalent to 100% zoom)</li>
<li><code>default</code>: uses viewer default mode</li>
</ul>
or a number indicating the zooming factor to use.
</dd>
<dt><code>layout</code></dt>
<dd>
The page layout. Possible values are:
<ul>
<li><code>single</code>: displays one page at once</li>
<li><code>continuous</code>: displays pages continuously</li>
<li><code>two</code>: displays two pages on two columns</li>
<li><code>default</code>: uses viewer default mode</li>
</ul>
Default value is <code>default</code>.
</dd>
</dl>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

View File

@@ -0,0 +1,41 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SetDrawColor</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>SetDrawColor</h1>
<code>SetDrawColor(<b>int</b> r [, <b>int</b> g, <b>int</b> b])</code>
<h2>Description</h2>
Defines the color used for all drawing operations (lines, rectangles and cell borders). It
can be expressed in RGB components or gray scale. The method can be called before the first
page is created and the value is retained from page to page.
<h2>Parameters</h2>
<dl class="param">
<dt><code>r</code></dt>
<dd>
If <code>g</code> et <code>b</code> are given, red component; if not, indicates the gray level.
Value between 0 and 255.
</dd>
<dt><code>g</code></dt>
<dd>
Green component (between 0 and 255).
</dd>
<dt><code>b</code></dt>
<dd>
Blue component (between 0 and 255).
</dd>
</dl>
<h2>See also</h2>
<a href="setfillcolor.htm">SetFillColor</a>,
<a href="settextcolor.htm">SetTextColor</a>,
<a href="line.htm">Line</a>,
<a href="rect.htm">Rect</a>,
<a href="cell.htm">Cell</a>,
<a href="multicell.htm">MultiCell</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

View File

@@ -0,0 +1,40 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SetFillColor</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>SetFillColor</h1>
<code>SetFillColor(<b>int</b> r [, <b>int</b> g, <b>int</b> b])</code>
<h2>Description</h2>
Defines the color used for all filling operations (filled rectangles and cell backgrounds).
It can be expressed in RGB components or gray scale. The method can be called before the first
page is created and the value is retained from page to page.
<h2>Parameters</h2>
<dl class="param">
<dt><code>r</code></dt>
<dd>
If <code>g</code> and <code>b</code> are given, red component; if not, indicates the gray level.
Value between 0 and 255.
</dd>
<dt><code>g</code></dt>
<dd>
Green component (between 0 and 255).
</dd>
<dt><code>b</code></dt>
<dd>
Blue component (between 0 and 255).
</dd>
</dl>
<h2>See also</h2>
<a href="setdrawcolor.htm">SetDrawColor</a>,
<a href="settextcolor.htm">SetTextColor</a>,
<a href="rect.htm">Rect</a>,
<a href="cell.htm">Cell</a>,
<a href="multicell.htm">MultiCell</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show More