diff --git a/lib/MPDF/composer.lock b/lib/MPDF/composer.lock
index 52264c0..c80b530 100644
--- a/lib/MPDF/composer.lock
+++ b/lib/MPDF/composer.lock
@@ -8,16 +8,16 @@
"packages": [
{
"name": "mpdf/mpdf",
- "version": "v8.0.3",
+ "version": "v8.0.7",
"source": {
"type": "git",
"url": "https://github.com/mpdf/mpdf.git",
- "reference": "6dd4285aff21f013554ff752046bb44ab1240f5f"
+ "reference": "7daf07f15334ed59a276bd52131dcca48794cdbd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/mpdf/mpdf/zipball/6dd4285aff21f013554ff752046bb44ab1240f5f",
- "reference": "6dd4285aff21f013554ff752046bb44ab1240f5f",
+ "url": "https://api.github.com/repos/mpdf/mpdf/zipball/7daf07f15334ed59a276bd52131dcca48794cdbd",
+ "reference": "7daf07f15334ed59a276bd52131dcca48794cdbd",
"shasum": ""
},
"require": {
@@ -25,7 +25,7 @@
"ext-mbstring": "*",
"myclabs/deep-copy": "^1.7",
"paragonie/random_compat": "^1.4|^2.0|9.99.99",
- "php": "^5.6 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0",
+ "php": "^5.6 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0",
"psr/log": "^1.0",
"setasign/fpdi": "^2.1"
},
@@ -73,24 +73,30 @@
"php",
"utf-8"
],
- "time": "2019-10-25T17:54:07+00:00"
+ "funding": [
+ {
+ "url": "https://www.paypal.me/mpdf",
+ "type": "custom"
+ }
+ ],
+ "time": "2020-07-15T09:48:00+00:00"
},
{
"name": "myclabs/deep-copy",
- "version": "1.9.3",
+ "version": "1.10.1",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
- "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea"
+ "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea",
- "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea",
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/969b211f9a51aa1f6c01d1d2aef56d3bd91598e5",
+ "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5",
"shasum": ""
},
"require": {
- "php": "^7.1"
+ "php": "^7.1 || ^8.0"
},
"replace": {
"myclabs/deep-copy": "self.version"
@@ -121,7 +127,13 @@
"object",
"object graph"
],
- "time": "2019-08-09T12:45:53+00:00"
+ "funding": [
+ {
+ "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-06-29T13:22:24+00:00"
},
{
"name": "paragonie/random_compat",
@@ -170,16 +182,16 @@
},
{
"name": "psr/log",
- "version": "1.1.2",
+ "version": "1.1.3",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
- "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801"
+ "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801",
- "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801",
+ "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc",
+ "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc",
"shasum": ""
},
"require": {
@@ -213,37 +225,38 @@
"psr",
"psr-3"
],
- "time": "2019-11-01T11:05:21+00:00"
+ "time": "2020-03-23T09:12:05+00:00"
},
{
"name": "setasign/fpdi",
- "version": "v2.2.0",
+ "version": "v2.3.4",
"source": {
"type": "git",
"url": "https://github.com/Setasign/FPDI.git",
- "reference": "3c266002f8044f61b17329f7cd702d44d73f0f7f"
+ "reference": "2b5fb811c04f937ef257ef3f798cebeded33c136"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Setasign/FPDI/zipball/3c266002f8044f61b17329f7cd702d44d73f0f7f",
- "reference": "3c266002f8044f61b17329f7cd702d44d73f0f7f",
+ "url": "https://api.github.com/repos/Setasign/FPDI/zipball/2b5fb811c04f937ef257ef3f798cebeded33c136",
+ "reference": "2b5fb811c04f937ef257ef3f798cebeded33c136",
"shasum": ""
},
"require": {
"ext-zlib": "*",
"php": "^5.6 || ^7.0"
},
+ "conflict": {
+ "setasign/tfpdf": "<1.31"
+ },
"require-dev": {
"phpunit/phpunit": "~5.7",
"setasign/fpdf": "~1.8",
- "setasign/tfpdf": "1.25",
+ "setasign/tfpdf": "1.31",
+ "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.",
- "setasign/fpdi-fpdf": "Use this package to automatically evaluate dependencies to FPDF.",
- "setasign/fpdi-tcpdf": "Use this package to automatically evaluate dependencies to TCPDF.",
- "setasign/fpdi-tfpdf": "Use this package to automatically evaluate dependencies to tFPDF."
+ "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": {
@@ -274,7 +287,13 @@
"fpdi",
"pdf"
],
- "time": "2019-01-30T14:11:19+00:00"
+ "funding": [
+ {
+ "url": "https://tidelift.com/funding/github/packagist/setasign/fpdi",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-08-27T06:55:47+00:00"
}
],
"packages-dev": [],
@@ -284,5 +303,6 @@
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
- "platform-dev": []
+ "platform-dev": [],
+ "plugin-api-version": "1.1.0"
}
diff --git a/lib/MPDF/vendor/composer/ClassLoader.php b/lib/MPDF/vendor/composer/ClassLoader.php
index fce8549..03b9bb9 100644
--- a/lib/MPDF/vendor/composer/ClassLoader.php
+++ b/lib/MPDF/vendor/composer/ClassLoader.php
@@ -60,7 +60,7 @@ class ClassLoader
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
- return call_user_func_array('array_merge', $this->prefixesPsr0);
+ return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
}
return array();
diff --git a/lib/MPDF/vendor/composer/autoload_real.php b/lib/MPDF/vendor/composer/autoload_real.php
index 78cb1ab..1058c92 100644
--- a/lib/MPDF/vendor/composer/autoload_real.php
+++ b/lib/MPDF/vendor/composer/autoload_real.php
@@ -13,6 +13,9 @@ class ComposerAutoloaderInit464b8cc4726849d52f4325e9114ac125
}
}
+ /**
+ * @return \Composer\Autoload\ClassLoader
+ */
public static function getLoader()
{
if (null !== self::$loader) {
diff --git a/lib/MPDF/vendor/composer/installed.json b/lib/MPDF/vendor/composer/installed.json
index 25093fe..1fb9990 100644
--- a/lib/MPDF/vendor/composer/installed.json
+++ b/lib/MPDF/vendor/composer/installed.json
@@ -1,17 +1,17 @@
[
{
"name": "mpdf/mpdf",
- "version": "v8.0.3",
- "version_normalized": "8.0.3.0",
+ "version": "v8.0.7",
+ "version_normalized": "8.0.7.0",
"source": {
"type": "git",
"url": "https://github.com/mpdf/mpdf.git",
- "reference": "6dd4285aff21f013554ff752046bb44ab1240f5f"
+ "reference": "7daf07f15334ed59a276bd52131dcca48794cdbd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/mpdf/mpdf/zipball/6dd4285aff21f013554ff752046bb44ab1240f5f",
- "reference": "6dd4285aff21f013554ff752046bb44ab1240f5f",
+ "url": "https://api.github.com/repos/mpdf/mpdf/zipball/7daf07f15334ed59a276bd52131dcca48794cdbd",
+ "reference": "7daf07f15334ed59a276bd52131dcca48794cdbd",
"shasum": ""
},
"require": {
@@ -19,7 +19,7 @@
"ext-mbstring": "*",
"myclabs/deep-copy": "^1.7",
"paragonie/random_compat": "^1.4|^2.0|9.99.99",
- "php": "^5.6 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0",
+ "php": "^5.6 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0",
"psr/log": "^1.0",
"setasign/fpdi": "^2.1"
},
@@ -35,7 +35,7 @@
"ext-xml": "Needed mainly for SVG manipulation",
"ext-zlib": "Needed for compression of embedded resources, such as fonts"
},
- "time": "2019-10-25T17:54:07+00:00",
+ "time": "2020-07-15T09:48:00+00:00",
"type": "library",
"extra": {
"branch-alias": {
@@ -68,25 +68,31 @@
"pdf",
"php",
"utf-8"
+ ],
+ "funding": [
+ {
+ "url": "https://www.paypal.me/mpdf",
+ "type": "custom"
+ }
]
},
{
"name": "myclabs/deep-copy",
- "version": "1.9.3",
- "version_normalized": "1.9.3.0",
+ "version": "1.10.1",
+ "version_normalized": "1.10.1.0",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
- "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea"
+ "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea",
- "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea",
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/969b211f9a51aa1f6c01d1d2aef56d3bd91598e5",
+ "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5",
"shasum": ""
},
"require": {
- "php": "^7.1"
+ "php": "^7.1 || ^8.0"
},
"replace": {
"myclabs/deep-copy": "self.version"
@@ -96,7 +102,7 @@
"doctrine/common": "^2.6",
"phpunit/phpunit": "^7.1"
},
- "time": "2019-08-09T12:45:53+00:00",
+ "time": "2020-06-29T13:22:24+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -118,6 +124,12 @@
"duplicate",
"object",
"object graph"
+ ],
+ "funding": [
+ {
+ "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
+ "type": "tidelift"
+ }
]
},
{
@@ -169,23 +181,23 @@
},
{
"name": "psr/log",
- "version": "1.1.2",
- "version_normalized": "1.1.2.0",
+ "version": "1.1.3",
+ "version_normalized": "1.1.3.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
- "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801"
+ "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801",
- "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801",
+ "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc",
+ "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
- "time": "2019-11-01T11:05:21+00:00",
+ "time": "2020-03-23T09:12:05+00:00",
"type": "library",
"extra": {
"branch-alias": {
@@ -218,36 +230,37 @@
},
{
"name": "setasign/fpdi",
- "version": "v2.2.0",
- "version_normalized": "2.2.0.0",
+ "version": "v2.3.4",
+ "version_normalized": "2.3.4.0",
"source": {
"type": "git",
"url": "https://github.com/Setasign/FPDI.git",
- "reference": "3c266002f8044f61b17329f7cd702d44d73f0f7f"
+ "reference": "2b5fb811c04f937ef257ef3f798cebeded33c136"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Setasign/FPDI/zipball/3c266002f8044f61b17329f7cd702d44d73f0f7f",
- "reference": "3c266002f8044f61b17329f7cd702d44d73f0f7f",
+ "url": "https://api.github.com/repos/Setasign/FPDI/zipball/2b5fb811c04f937ef257ef3f798cebeded33c136",
+ "reference": "2b5fb811c04f937ef257ef3f798cebeded33c136",
"shasum": ""
},
"require": {
"ext-zlib": "*",
"php": "^5.6 || ^7.0"
},
+ "conflict": {
+ "setasign/tfpdf": "<1.31"
+ },
"require-dev": {
"phpunit/phpunit": "~5.7",
"setasign/fpdf": "~1.8",
- "setasign/tfpdf": "1.25",
+ "setasign/tfpdf": "1.31",
+ "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.",
- "setasign/fpdi-fpdf": "Use this package to automatically evaluate dependencies to FPDF.",
- "setasign/fpdi-tcpdf": "Use this package to automatically evaluate dependencies to TCPDF.",
- "setasign/fpdi-tfpdf": "Use this package to automatically evaluate dependencies to tFPDF."
+ "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": "2019-01-30T14:11:19+00:00",
+ "time": "2020-08-27T06:55:47+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -277,6 +290,12 @@
"fpdf",
"fpdi",
"pdf"
+ ],
+ "funding": [
+ {
+ "url": "https://tidelift.com/funding/github/packagist/setasign/fpdi",
+ "type": "tidelift"
+ }
]
}
]
diff --git a/lib/MPDF/vendor/mpdf/mpdf/.github/CONTRIBUTING.md b/lib/MPDF/vendor/mpdf/mpdf/.github/CONTRIBUTING.md
new file mode 100644
index 0000000..35e0e60
--- /dev/null
+++ b/lib/MPDF/vendor/mpdf/mpdf/.github/CONTRIBUTING.md
@@ -0,0 +1,36 @@
+Contributing
+============
+
+Issue tracker
+-------------
+
+The Issue tracker serves mainly as a place to report bugs and request new features.
+Please do not abuse it as a general questions or troubleshooting location.
+
+For these questions you can always use the
+[mpdf tag](https://stackoverflow.com/questions/tagged/mpdf) at [Stack Overflow](https://stackoverflow.com/).
+
+* Please provide a small example in php/html that reproduces your situation
+* Please report one feature or one bug per issue
+* Failing to provide necessary information or not using the issue template may cause the issue to be closed without consideration.
+
+Pull requests
+-------------
+
+Pull requests should be always based on the default [development](https://github.com/mpdf/mpdf/tree/development)
+branch except for backports to older versions.
+
+Some guidelines:
+
+* Use an aptly named feature branch for the Pull request.
+
+* Only files and lines affecting the scope of the Pull request must be affected.
+
+* Make small, *atomic* commits that keep the smallest possible related code changes together.
+
+* Code should be accompanied by a unit test testing expected behaviour.
+
+* To be incorporated, the PR must contain a change in the CHANGELOG.md file describing itself
+
+When updating a PR, do not create a new one, just `git push --force` to your former feature branch, the PR will
+update itself.
diff --git a/lib/MPDF/vendor/mpdf/mpdf/.github/FUNDING.yml b/lib/MPDF/vendor/mpdf/mpdf/.github/FUNDING.yml
new file mode 100644
index 0000000..4760137
--- /dev/null
+++ b/lib/MPDF/vendor/mpdf/mpdf/.github/FUNDING.yml
@@ -0,0 +1 @@
+custom: https://www.paypal.me/mpdf
diff --git a/lib/MPDF/vendor/mpdf/mpdf/.github/ISSUE_TEMPLATE.md b/lib/MPDF/vendor/mpdf/mpdf/.github/ISSUE_TEMPLATE.md
new file mode 100644
index 0000000..4aca9f8
--- /dev/null
+++ b/lib/MPDF/vendor/mpdf/mpdf/.github/ISSUE_TEMPLATE.md
@@ -0,0 +1,22 @@
+> Please use https://stackoverflow.com/questions/tagged/mpdf for all your general questions or troubleshooting!
+> For contributing here, please see the guideline: https://github.com/mpdf/mpdf/blob/development/.github/CONTRIBUTING.md
+>
+> *Warning*: Failing to provide necessary information may cause the issue to be closed without consideration
+
+### I found this bug / would like to have this new functionality
+
+### This is mPDF and PHP version and environment (server/fpm/cli etc) I am using
+
+### This is a PHP code snippet I use
+
+```
+=7.0` is supported on PHP `^5.6 || ~7.0.0 || ~7.1.0 || ~7.2.0`
- `PHP 7.3` is supported since `mPDF v7.1.7`
-- `PHP 7.4` is supported in `development` branch, official release will be out with stable PHP
+- `PHP 7.4` is supported since `mPDF v8.0.4`
PHP `mbstring` and `gd` extensions have to be loaded.
diff --git a/lib/MPDF/vendor/mpdf/mpdf/composer.json b/lib/MPDF/vendor/mpdf/mpdf/composer.json
index 83e954b..425d955 100644
--- a/lib/MPDF/vendor/mpdf/mpdf/composer.json
+++ b/lib/MPDF/vendor/mpdf/mpdf/composer.json
@@ -31,7 +31,7 @@
"require": {
- "php": "^5.6 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0",
+ "php": "^5.6 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0",
"ext-gd": "*",
"ext-mbstring": "*",
diff --git a/lib/MPDF/vendor/mpdf/mpdf/src/Barcode.php b/lib/MPDF/vendor/mpdf/mpdf/src/Barcode.php
index 924e160..97054b4 100644
--- a/lib/MPDF/vendor/mpdf/mpdf/src/Barcode.php
+++ b/lib/MPDF/vendor/mpdf/mpdf/src/Barcode.php
@@ -96,6 +96,9 @@ class Barcode
case 'C128C': // CODE 128 C
return new Barcode\Code128($code, 'C');
+ case 'C128RAW': // CODE 128 RAW -- code is a space separated list of codes with startcode but without checkdigit,stop,end ex: "105 12 34"
+ return new Barcode\Code128($code, 'RAW');
+
case 'EAN128A': // EAN 128 A
return new Barcode\Code128($code, 'A', true);
diff --git a/lib/MPDF/vendor/mpdf/mpdf/src/Barcode/Code128.php b/lib/MPDF/vendor/mpdf/mpdf/src/Barcode/Code128.php
index 33b38df..e12f4d8 100644
--- a/lib/MPDF/vendor/mpdf/mpdf/src/Barcode/Code128.php
+++ b/lib/MPDF/vendor/mpdf/mpdf/src/Barcode/Code128.php
@@ -148,6 +148,36 @@ class Code128 extends \Mpdf\Barcode\AbstractBarcode implements \Mpdf\Barcode\Bar
];
switch (strtoupper($type)) {
+ case 'RAW':
+ $newCode='';
+ $startid = false;
+ foreach (explode(" ", $code) as $v) {
+ if (is_numeric($v) && round($v, 0) == $v) {
+ if ($v>=0 && $v<=105) {
+ if ($startid===false) {
+ $startid=$v;
+ } else {
+ $newCode.=chr($v);
+ }
+ } else {
+ throw new \Mpdf\Barcode\BarcodeException('Invalid CODE128RAW barcode value. 0-105 needed');
+ }
+ } else {
+ //double spaces generates empty $v any other is not allowed
+ if ($v!='') {
+ throw new \Mpdf\Barcode\BarcodeException('Invalid CODE128RAW barcode value. 0-105 needed');
+ }
+ }
+ }
+ if ($startid<103 || $startid>105) {
+ throw new \Mpdf\Barcode\BarcodeException('Invalid CODE128RAW startid value. Must 103,104 or 105 (for A,B or C)');
+ }
+ $keys='';
+ for ($i = 0; $i <= 105; ++$i) {
+ $keys .= chr($i);
+ }
+ $code=$newCode;
+ break;
case 'A':
$startid = 103;
$keys = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_';
@@ -172,6 +202,9 @@ class Code128 extends \Mpdf\Barcode\AbstractBarcode implements \Mpdf\Barcode\Bar
$newCode = '';
$hclen = (strlen($code) / 2);
for ($i = 0; $i < $hclen; ++$i) {
+ if ($code[2 * $i]<"0" || $code[2 * $i]>"9" || $code[2 * $i + 1]<"0" || $code[2 * $i + 1]>"9") {
+ throw new \Mpdf\Barcode\BarcodeException(sprintf('Invalid character "%s" in CODE128C barcode value', $code[$i]));
+ }
$newCode .= chr((int) ($code[2 * $i] . $code[2 * $i + 1]));
}
$code = $newCode;
@@ -192,6 +225,9 @@ class Code128 extends \Mpdf\Barcode\AbstractBarcode implements \Mpdf\Barcode\Bar
if ($ean && $i == 0) {
$sum += 102;
} else {
+ if (strpos($keys, $code[$i]) === false) {
+ throw new \Mpdf\Barcode\BarcodeException(sprintf('Invalid character "%s" in CODE128'.$type.' barcode value', $code[$i]));
+ }
$sum += (strpos($keys, $code[$i]) * ($i + 1));
}
}
diff --git a/lib/MPDF/vendor/mpdf/mpdf/src/Cache.php b/lib/MPDF/vendor/mpdf/mpdf/src/Cache.php
index 7356131..bc6bc91 100644
--- a/lib/MPDF/vendor/mpdf/mpdf/src/Cache.php
+++ b/lib/MPDF/vendor/mpdf/mpdf/src/Cache.php
@@ -70,9 +70,11 @@ class Cache
public function write($filename, $data)
{
- $path = $this->getFilePath($filename);
+ $tempFile = tempnam($this->basePath, 'cache_tmp_');
+ file_put_contents($tempFile, $data);
- file_put_contents($path, $data);
+ $path = $this->getFilePath($filename);
+ rename($tempFile, $path);
return $path;
}
diff --git a/lib/MPDF/vendor/mpdf/mpdf/src/Config/ConfigVariables.php b/lib/MPDF/vendor/mpdf/mpdf/src/Config/ConfigVariables.php
index 3302893..f151caa 100644
--- a/lib/MPDF/vendor/mpdf/mpdf/src/Config/ConfigVariables.php
+++ b/lib/MPDF/vendor/mpdf/mpdf/src/Config/ConfigVariables.php
@@ -514,6 +514,9 @@ class ConfigVariables
'curlTimeout' => 5,
'curlProxy' => null,
'curlProxyAuth' => null,
+ 'curlUserAgent' => 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0.1',
+
+ 'exposeVersion' => true,
];
}
diff --git a/lib/MPDF/vendor/mpdf/mpdf/src/Conversion/DecToOther.php b/lib/MPDF/vendor/mpdf/mpdf/src/Conversion/DecToOther.php
index 254c6fa..1eafb2c 100644
--- a/lib/MPDF/vendor/mpdf/mpdf/src/Conversion/DecToOther.php
+++ b/lib/MPDF/vendor/mpdf/mpdf/src/Conversion/DecToOther.php
@@ -60,6 +60,7 @@ class DecToOther
'khmer' => 0x17E0,
'cambodian' => 0x17E0,
'lao' => 0x0ED0,
+ 'myanmar' => 0x1040
];
return isset($codePages[$script]) ? $codePages[$script] : 0;
diff --git a/lib/MPDF/vendor/mpdf/mpdf/src/CssManager.php b/lib/MPDF/vendor/mpdf/mpdf/src/CssManager.php
index 0e14b1e..22a34bd 100644
--- a/lib/MPDF/vendor/mpdf/mpdf/src/CssManager.php
+++ b/lib/MPDF/vendor/mpdf/mpdf/src/CssManager.php
@@ -1117,37 +1117,57 @@ class CssManager
{
$sh = [];
$c = preg_match_all('/(rgba|rgb|device-cmyka|cmyka|device-cmyk|cmyk|hsla|hsl)\(.*?\)/', $v, $x); // mPDF 5.6.05
+
for ($i = 0; $i < $c; $i++) {
- $col = preg_replace('/,/', '*', $x[0][$i]);
+ $col = preg_replace('/,\s/', '*', $x[0][$i]);
$v = str_replace($x[0][$i], $col, $v);
}
+
$ss = explode(',', $v);
+
foreach ($ss as $s) {
+
$new = ['blur' => 0];
$p = explode(' ', trim($s));
+
if (isset($p[0])) {
$new['x'] = $this->sizeConverter->convert(trim($p[0]), $this->mpdf->FontSize, $this->mpdf->FontSize, false);
}
+
if (isset($p[1])) {
$new['y'] = $this->sizeConverter->convert(trim($p[1]), $this->mpdf->FontSize, $this->mpdf->FontSize, false);
}
+
if (isset($p[2])) {
+
if (preg_match('/^\s*[\.\-0-9]/', $p[2])) {
- $new['blur'] = $this->sizeConverter->convert(trim($p[2]), $this->mpdf->blk[$this->mpdf->blklvl]['inner_width'], $this->mpdf->FontSize, false);
+
+ $new['blur'] = $this->sizeConverter->convert(
+ trim($p[2]),
+ isset($this->mpdf->blk[$this->mpdf->blklvl]['inner_width']) ? $this->mpdf->blk[$this->mpdf->blklvl]['inner_width'] : 0,
+ $this->mpdf->FontSize,
+ false
+ );
+
} else {
$new['col'] = $this->colorConverter->convert(preg_replace('/\*/', ',', $p[2]), $this->mpdf->PDFAXwarnings);
}
+
if (isset($p[3])) {
$new['col'] = $this->colorConverter->convert(preg_replace('/\*/', ',', $p[3]), $this->mpdf->PDFAXwarnings);
}
}
+
if (!isset($new['col']) || !$new['col']) {
$new['col'] = $this->colorConverter->convert('#888888', $this->mpdf->PDFAXwarnings);
}
+
if (isset($new['y'])) {
array_unshift($sh, $new);
}
+
}
+
return $sh;
}
diff --git a/lib/MPDF/vendor/mpdf/mpdf/src/Exception/FontException.php b/lib/MPDF/vendor/mpdf/mpdf/src/Exception/FontException.php
new file mode 100644
index 0000000..d00d763
--- /dev/null
+++ b/lib/MPDF/vendor/mpdf/mpdf/src/Exception/FontException.php
@@ -0,0 +1,8 @@
+tempFilename($filename), 'wb');
- fwrite($handle, $data);
- fclose($handle);
+ return $this->cache->write($filename, $data);
}
public function jsonWrite($filename, $data)
diff --git a/lib/MPDF/vendor/mpdf/mpdf/src/Image/Svg.php b/lib/MPDF/vendor/mpdf/mpdf/src/Image/Svg.php
index f514700..dfcc685 100644
--- a/lib/MPDF/vendor/mpdf/mpdf/src/Image/Svg.php
+++ b/lib/MPDF/vendor/mpdf/mpdf/src/Image/Svg.php
@@ -2824,6 +2824,91 @@ class Svg
$this->svg_string .= $content;
}
+ /**
+ * SVGs made with Adobe Illustrator use a style tag and classes instead of inline styles
+ * See: https://github.com/mpdf/mpdf/issues/450
+ *
+ * This function brutally copies the styles inline
+ * ( Currently only looks for classes as a selector )
+ *
+ * @param string $data svg contents
+ * @return string svg contents
+ * @author Antonio Norman - softcodex.ch
+ */
+ function mergeStyles($data)
+ {
+ $xml = new \DOMDocument();
+ if (!$xml->loadXML($data, LIBXML_NOERROR)) {
+ return $data;
+ }
+
+ // Check it's an SVG
+ $svgNode = $xml->getElementsByTagName('svg');
+ if ($svgNode->length === 0) {
+ return $data;
+ }
+
+ // Find the style node
+ $styles = [];
+ /** @var $styleNode \DOMNode */
+ foreach ($svgNode->item(0)->getElementsByTagName('style') as $styleNode) {
+
+ preg_match_all('/(\.[^{]+)\s*\{\s*([^}]+)\s*}/m', $styleNode->nodeValue, $matches, PREG_SET_ORDER);
+ foreach ($matches as $cssBlock) {
+ $css = preg_replace('/\s{2,}/', ' ', $cssBlock[2]); // Clean spaces or new lines
+ $selector = trim($cssBlock[1]);
+
+ $styles[$selector] = isset($styles[$cssBlock[1]]) ?
+ $styles[$selector] . ' ' . $css : // Append if the selector is already defined
+ $css;
+ }
+ }
+
+ if (empty($styles)) {
+ return $data;
+ }
+
+ // Recursively loop the nodes inserting the styles inline
+ $setStylesInline = function (\DOMNode $xml) use ($styles, &$setStylesInline) {
+ // Apply the styles to the elements
+ foreach ($xml->childNodes as $node) {
+
+ if ($node->hasChildNodes()) {
+ $setStylesInline($node);
+ }
+
+ if (!$node instanceof \DOMElement) {
+ continue;
+ }
+
+ // Check the node has the a class with a style
+ if (!$node->hasAttribute('class')) {
+ continue;
+ }
+
+ // Allow for class=" class1 class2 "
+ $classes = explode(' ', $node->getAttribute('class'));
+
+ foreach ($classes as $class) {
+
+ $class = '.' . trim($class);
+ if (!empty($class) && isset($styles[$class])) {
+
+ $style = $node->hasAttribute('style') ?
+ $styles[$class] . ' ' . $node->getAttribute('style') :
+ $styles[$class];
+
+ $node->setAttribute('style', $style);
+ }
+ }
+ }
+ };
+
+ $setStylesInline($xml);
+
+ return $xml->saveXML();
+ }
+
/**
* analise le svg et renvoie aux fonctions precedente our le traitement
*/
@@ -2835,6 +2920,8 @@ class Svg
// Converts < to < when not a tag
$data = preg_replace('/<([^!?\/a-zA-Z_:])/i', '<\\1', $data); // mPDF 5.7.4
+ $data = $this->mergeStyles($data);
+
if ($this->mpdf->svgAutoFont) {
$data = $this->markScriptToLang($data);
}
diff --git a/lib/MPDF/vendor/mpdf/mpdf/src/Mpdf.php b/lib/MPDF/vendor/mpdf/mpdf/src/Mpdf.php
index 3e65aa7..49d92fa 100644
--- a/lib/MPDF/vendor/mpdf/mpdf/src/Mpdf.php
+++ b/lib/MPDF/vendor/mpdf/mpdf/src/Mpdf.php
@@ -39,7 +39,7 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
use Strict;
use FpdiTrait;
- const VERSION = '8.0.3';
+ const VERSION = '8.0.7';
const SCALE = 72 / 25.4;
@@ -719,6 +719,15 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
*/
var $curlProxyAuth;
+ /**
+ * Set the User-Agent header in the HTTP requests sent by cURL.
+ *
+ * @see https://curl.haxx.se/libcurl/c/CURLOPT_USERAGENT.html
+ *
+ * @var string User Agent header
+ */
+ var $curlUserAgent;
+
// Private properties FROM FPDF
var $DisplayPreferences;
var $flowingBlockAttr;
@@ -815,6 +824,8 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
var $outerblocktags;
var $innerblocktags;
+ public $exposeVersion;
+
/**
* @var string
*/
@@ -1070,8 +1081,8 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$this->tableBackgrounds = [];
$this->uniqstr = '20110230'; // mPDF 5.7.2
- $this->kt_y00 = '';
- $this->kt_p00 = '';
+ $this->kt_y00 = 0;
+ $this->kt_p00 = 0;
$this->BMPonly = [];
$this->page = 0;
$this->n = 2;
@@ -5788,28 +5799,49 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
return $s;
}
- function MultiCell($w, $h, $txt, $border = 0, $align = '', $fill = 0, $link = '', $directionality = 'ltr', $encoded = false, $OTLdata = false, $maxrows = false)
- {
+ function MultiCell(
+ $w,
+ $h,
+ $txt,
+ $border = 0,
+ $align = '',
+ $fill = 0,
+ $link = '',
+ $directionality = 'ltr',
+ $encoded = false,
+ $OTLdata = false,
+ $maxrows = false
+ ) {
// maxrows is called from mpdfform->TEXTAREA
- // Parameter (pre-)encoded - When called internally from form::textarea - mb_encoding already done and OTL - but not reverse RTL
+ // Parameter (pre-)encoded - When called internally from form::textarea -
+ // mb_encoding already done and OTL - but not reverse RTL
if (!$encoded) {
+
$txt = $this->purify_utf8_text($txt);
+
if ($this->text_input_as_HTML) {
$txt = $this->all_entities_to_utf8($txt);
}
+
if ($this->usingCoreFont) {
$txt = mb_convert_encoding($txt, $this->mb_enc, 'UTF-8');
}
+
if (preg_match("/([" . $this->pregRTLchars . "])/u", $txt)) {
$this->biDirectional = true;
- } // *OTL*
+ }
+
/* -- OTL -- */
- $OTLdata = [];
+ if (!is_array($OTLdata)) {
+ unset($OTLdata);
+ }
+
// Use OTL OpenType Table Layout - GSUB & GPOS
if (isset($this->CurrentFont['useOTL']) && $this->CurrentFont['useOTL']) {
$txt = $this->otl->applyOTL($txt, $this->CurrentFont['useOTL']);
$OTLdata = $this->otl->OTLdata;
}
+
if ($directionality == 'rtl' || $this->biDirectional) {
if (!isset($OTLdata)) {
$unicode = $this->UTF8StringToArray($txt, false);
@@ -5819,17 +5851,20 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
}
/* -- END OTL -- */
}
+
if (!$align) {
$align = $this->defaultAlign;
}
// Output text with automatic or explicit line breaks
$cw = &$this->CurrentFont['cw'];
+
if ($w == 0) {
$w = $this->w - $this->rMargin - $this->x;
}
$wmax = ($w - ($this->cMarginL + $this->cMarginR));
+
if ($this->usingCoreFont) {
$s = str_replace("\r", '', $txt);
$nb = strlen($s);
@@ -5843,8 +5878,11 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$nb--;
}
}
+
$b = 0;
+
if ($border) {
+
if ($border == 1) {
$border = 'LTRB';
$b = 'LRT';
@@ -5860,6 +5898,7 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$b = is_int(strpos($border, 'T')) ? $b2 . 'T' : $b2;
}
}
+
$sep = -1;
$i = 0;
$j = 0;
@@ -5871,19 +5910,25 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$start_y = $this->y;
if (!$this->usingCoreFont) {
+
$inclCursive = false;
+
if (preg_match("/([" . $this->pregCURSchars . "])/u", $s)) {
$inclCursive = true;
}
+
while ($i < $nb) {
+
// Get next character
$c = mb_substr($s, $i, 1, $this->mb_enc);
- if ($c == "\n") {
- // Explicit line break
+
+ if ($c === "\n") { // Explicit line break
+
// WORD SPACING
$this->ResetSpacing();
$tmp = rtrim(mb_substr($s, $j, $i - $j, $this->mb_enc));
$tmpOTLdata = false;
+
/* -- OTL -- */
if (isset($OTLdata)) {
$tmpOTLdata = $this->otl->sliceOTLdata($OTLdata, $j, $i - $j);
@@ -5891,21 +5936,27 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$this->magic_reverse_dir($tmp, $directionality, $tmpOTLdata);
}
/* -- END OTL -- */
+
$this->Cell($w, $h, $tmp, $b, 2, $align, $fill, $link, 0, 0, 0, 'M', 0, false, $tmpOTLdata);
+
if ($maxrows != false && isset($this->form) && ($this->y - $start_y) / $h > $maxrows) {
return false;
}
+
$i++;
$sep = -1;
$j = $i;
$l = 0;
$ns = 0;
$nl++;
+
if ($border and $nl == 2) {
$b = $b2;
}
+
continue;
}
+
if ($c == " ") {
$sep = $i;
$ls = $l;
@@ -5915,15 +5966,19 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$l += $this->GetCharWidthNonCore($c);
if ($l > $wmax) {
+
// Automatic line break
if ($sep == -1) { // Only one word
+
if ($i == $j) {
$i++;
}
+
// WORD SPACING
$this->ResetSpacing();
$tmp = rtrim(mb_substr($s, $j, $i - $j, $this->mb_enc));
$tmpOTLdata = false;
+
/* -- OTL -- */
if (isset($OTLdata)) {
$tmpOTLdata = $this->otl->sliceOTLdata($OTLdata, $j, $i - $j);
@@ -5931,27 +5986,35 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$this->magic_reverse_dir($tmp, $directionality, $tmpOTLdata);
}
/* -- END OTL -- */
+
$this->Cell($w, $h, $tmp, $b, 2, $align, $fill, $link, 0, 0, 0, 'M', 0, false, $tmpOTLdata);
+
} else {
+
$tmp = rtrim(mb_substr($s, $j, $sep - $j, $this->mb_enc));
$tmpOTLdata = false;
+
/* -- OTL -- */
if (isset($OTLdata)) {
$tmpOTLdata = $this->otl->sliceOTLdata($OTLdata, $j, $sep - $j);
$this->otl->trimOTLdata($tmpOTLdata, false, true);
}
/* -- END OTL -- */
- if ($align == 'J') {
- //////////////////////////////////////////
+
+ if ($align === 'J') {
+
// JUSTIFY J using Unicode fonts (Word spacing doesn't work)
// WORD SPACING UNICODE
// Change NON_BREAKING SPACE to spaces so they are 'spaced' properly
+
$tmp = str_replace(chr(194) . chr(160), chr(32), $tmp);
$len_ligne = $this->GetStringWidth($tmp, false, $tmpOTLdata);
$nb_carac = mb_strlen($tmp, $this->mb_enc);
$nb_spaces = mb_substr_count($tmp, ' ', $this->mb_enc);
+
// Take off number of Marks
// Use GPOS OTL
+
if (isset($this->CurrentFont['useOTL']) && ($this->CurrentFont['useOTL'])) {
if (isset($tmpOTLdata['group']) && $tmpOTLdata['group']) {
$nb_carac -= substr_count($tmpOTLdata['group'], 'M');
@@ -5960,118 +6023,153 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
list($charspacing, $ws, $kashida) = $this->GetJspacing($nb_carac, $nb_spaces, ((($wmax) - $len_ligne) * Mpdf::SCALE), $inclCursive, $tmpOTLdata);
$this->SetSpacing($charspacing, $ws);
- //////////////////////////////////////////
}
+
if (isset($OTLdata)) {
$this->magic_reverse_dir($tmp, $directionality, $tmpOTLdata);
}
+
$this->Cell($w, $h, $tmp, $b, 2, $align, $fill, $link, 0, 0, 0, 'M', 0, false, $tmpOTLdata);
+
$i = $sep + 1;
}
+
if ($maxrows != false && isset($this->form) && ($this->y - $start_y) / $h > $maxrows) {
return false;
}
+
$sep = -1;
$j = $i;
$l = 0;
$ns = 0;
$nl++;
+
if ($border and $nl == 2) {
$b = $b2;
}
+
} else {
$i++;
}
}
+
// Last chunk
// WORD SPACING
$this->ResetSpacing();
+
} else {
+
while ($i < $nb) {
+
// Get next character
$c = $s[$i];
- if ($c == "\n") {
+ if ($c === "\n") {
+
// Explicit line break
// WORD SPACING
+
$this->ResetSpacing();
$this->Cell($w, $h, substr($s, $j, $i - $j), $b, 2, $align, $fill, $link);
+
if ($maxrows != false && isset($this->form) && ($this->y - $start_y) / $h > $maxrows) {
return false;
}
+
$i++;
$sep = -1;
$j = $i;
$l = 0;
$ns = 0;
$nl++;
+
if ($border and $nl == 2) {
$b = $b2;
}
+
continue;
}
- if ($c == " ") {
+
+ if ($c === ' ') {
$sep = $i;
$ls = $l;
$ns++;
}
$l += $this->GetCharWidthCore($c);
+
if ($l > $wmax) {
+
// Automatic line break
if ($sep == -1) {
+
if ($i == $j) {
$i++;
}
+
// WORD SPACING
$this->ResetSpacing();
$this->Cell($w, $h, substr($s, $j, $i - $j), $b, 2, $align, $fill, $link);
+
} else {
- if ($align == 'J') {
+
+ if ($align === 'J') {
+
$tmp = rtrim(substr($s, $j, $sep - $j));
- //////////////////////////////////////////
+
// JUSTIFY J using Unicode fonts (Word spacing doesn't work)
// WORD SPACING NON_UNICODE/CJK
// Change NON_BREAKING SPACE to spaces so they are 'spaced' properly
+
$tmp = str_replace(chr(160), chr(32), $tmp);
$len_ligne = $this->GetStringWidth($tmp);
$nb_carac = strlen($tmp);
$nb_spaces = substr_count($tmp, ' ');
$tmpOTLdata = [];
+
list($charspacing, $ws, $kashida) = $this->GetJspacing($nb_carac, $nb_spaces, ((($wmax) - $len_ligne) * Mpdf::SCALE), false, $tmpOTLdata);
$this->SetSpacing($charspacing, $ws);
- //////////////////////////////////////////
}
+
$this->Cell($w, $h, substr($s, $j, $sep - $j), $b, 2, $align, $fill, $link);
$i = $sep + 1;
}
+
if ($maxrows != false && isset($this->form) && ($this->y - $start_y) / $h > $maxrows) {
return false;
}
+
$sep = -1;
$j = $i;
$l = 0;
$ns = 0;
$nl++;
+
if ($border and $nl == 2) {
$b = $b2;
}
+
} else {
$i++;
}
}
+
// Last chunk
// WORD SPACING
$this->ResetSpacing();
}
+
// Last chunk
if ($border and is_int(strpos($border, 'B'))) {
$b .= 'B';
}
+
if (!$this->usingCoreFont) {
+
$tmp = rtrim(mb_substr($s, $j, $i - $j, $this->mb_enc));
$tmpOTLdata = false;
+
/* -- OTL -- */
if (isset($OTLdata)) {
$tmpOTLdata = $this->otl->sliceOTLdata($OTLdata, $j, $i - $j);
@@ -6079,10 +6177,12 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$this->magic_reverse_dir($tmp, $directionality, $tmpOTLdata);
}
/* -- END OTL -- */
+
$this->Cell($w, $h, $tmp, $b, 2, $align, $fill, $link, 0, 0, 0, 'M', 0, false, $tmpOTLdata);
} else {
$this->Cell($w, $h, substr($s, $j, $i - $j), $b, 2, $align, $fill, $link);
}
+
$this->x = $this->lMargin;
}
@@ -7303,8 +7403,8 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
} elseif ($objattr['btype'] === 'QR') {
- if (!class_exists('Mpdf\QrCode\QrCode')) {
- throw new \Mpdf\MpdfException('Class Mpdf\QrCode\QrCode does not exists. Install the package from Packagist with "composer require mpdf/qrcode"');
+ if (!class_exists('Mpdf\QrCode\QrCode') || !class_exists('Mpdf\QrCode\Output\Mpdf')) {
+ throw new \Mpdf\MpdfException('Mpdf\QrCode package was not found. Install the package from Packagist with "composer require mpdf/qrcode"');
}
$barcodeContent = str_replace('\r\n', "\r\n", $objattr['code']);
@@ -9428,7 +9528,7 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
header('Content-disposition: inline; filename="' . $name . '"');
header('Cache-Control: public, must-revalidate, max-age=0');
header('Pragma: public');
- header('X-Generator: mPDF ' . static::VERSION);
+ header('X-Generator: mPDF' . ($this->exposeVersion ? (' ' . static::VERSION) : ''));
header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
}
@@ -9447,7 +9547,7 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
header('Content-Transfer-Encoding: binary');
header('Cache-Control: public, must-revalidate, max-age=0');
header('Pragma: public');
- header('X-Generator: mPDF ' . static::VERSION);
+ header('X-Generator: mPDF' . ($this->exposeVersion ? (' ' . static::VERSION) : ''));
header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Content-Type: application/pdf');
@@ -11325,7 +11425,10 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
return;
}
- if (preg_match('@^(mailto|tel|fax):.*@i', $path)) {
+ // Skip schemes not supported by installed stream wrappers
+ $wrappers = stream_get_wrappers();
+ $pattern = sprintf('@^(?!%s)[a-z0-9\.\-+]+:.*@i', implode('|', $wrappers));
+ if (preg_match($pattern, $path)) {
return;
}
@@ -11512,7 +11615,7 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$ppgno = $decToHebrew->convert($ppgno, $reverse);
- } elseif (preg_match('/(arabic-indic|bengali|devanagari|gujarati|gurmukhi|kannada|malayalam|oriya|persian|tamil|telugu|thai|urdu|cambodian|khmer|lao)/i', $lowertype, $m)) {
+ } elseif (preg_match('/(arabic-indic|bengali|devanagari|gujarati|gurmukhi|kannada|malayalam|oriya|persian|tamil|telugu|thai|urdu|cambodian|khmer|lao|myanmar)/i', $lowertype, $m)) {
$cp = $decToOther->getCodePage($m[1]);
$ppgno = $decToOther->convert($ppgno, $cp, $checkfont);
@@ -12374,7 +12477,9 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$lContent = (isset($arr['L']['content']) ? $arr['L']['content'] : '');
$cContent = (isset($arr['C']['content']) ? $arr['C']['content'] : '');
$rContent = (isset($arr['R']['content']) ? $arr['R']['content'] : '');
+
list($lw, $cw, $rw) = $this->_shareHeaderFooterWidth($lContent, $cContent, $rContent);
+
if ($hf == 'H') {
$valign = 'bottom';
$vpadding = '0 0 ' . $this->header_line_spacing . 'em 0';
@@ -12382,6 +12487,7 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$valign = 'top';
$vpadding = '' . $this->footer_line_spacing . 'em 0 0 0';
}
+
if ($this->directionality == 'rtl') { // table columns get reversed so need different text-alignment
$talignL = 'right';
$talignR = 'left';
@@ -12389,22 +12495,29 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$talignL = 'left';
$talignR = 'right';
}
+
$html = '
';
$html .= '';
$html .= '' . $lContent . ' | ';
$html .= '' . $cContent . ' | ';
$html .= '' . $rContent . ' | ';
$html .= '
';
+
return $html;
}
@@ -12885,7 +13010,7 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$this->SetFont('arial', '', 7.5, true, true);
$this->x = $this->page_box['outer_width_LR'] + 1.5;
$this->y = 1;
- $this->Cell($headerpgwidth, $this->FontSize, $hd, 0, 0, 'L', 0, '', 0, 0, 0, 'M');
+ $this->Cell(0, $this->FontSize, $hd, 0, 0, 'L', 0, '', 0, 0, 0, 'M');
$this->SetFont($this->default_font, '', $this->original_default_font_size);
}
}
@@ -14663,7 +14788,7 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$prop[1] = $tmp;
}
} else {
- return [];
+ return ['w' => 0, 's' => 0];
}
// Size
$bsize = $this->sizeConverter->convert($prop[0], $refw, $this->FontSize, false);
@@ -17942,7 +18067,8 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
// Set font size first so that e.g. MARGIN 0.83em works on font size for this element
if (isset($arrayaux['FONT-SIZE'])) {
$v = $arrayaux['FONT-SIZE'];
- if (is_numeric($v[0]) || ($v[0] === '.')) {
+ $firstLetter = substr($v, 0, 1);
+ if (is_numeric($firstLetter) || ($firstLetter === '.')) {
if ($type == 'BLOCK' && $this->blklvl > 0 && isset($this->blk[$this->blklvl - 1]['InlineProperties']) && isset($this->blk[$this->blklvl - 1]['InlineProperties']['size'])) {
$mmsize = $this->sizeConverter->convert($v, $this->blk[$this->blklvl - 1]['InlineProperties']['size']);
} elseif ($type == 'TABLECELL') {
@@ -26316,7 +26442,7 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface
$rlm = $arrcode['quietR'] / $k; // Right Quiet margin
$tlm = $blm = $arrcode['quietTB'] / $k;
$height = 1; // Overrides
- } elseif (in_array($btype, ['C128A', 'C128B', 'C128C', 'EAN128A', 'EAN128B', 'EAN128C', 'C39', 'C39+', 'C39E', 'C39E+', 'S25', 'S25+', 'I25', 'I25+', 'I25B', 'I25B+', 'C93', 'MSI', 'MSI+', 'CODABAR', 'CODE11'])) {
+ } elseif (in_array($btype, ['C128A', 'C128B', 'C128C', 'C128RAW', 'EAN128A', 'EAN128B', 'EAN128C', 'C39', 'C39+', 'C39E', 'C39E+', 'S25', 'S25+', 'I25', 'I25+', 'I25B', 'I25B+', 'C93', 'MSI', 'MSI+', 'CODABAR', 'CODE11'])) {
$llm = $arrcode['lightmL'] * $xres; // Left Quiet margin
$rlm = $arrcode['lightmR'] * $xres; // Right Quiet margin
$tlm = $blm = $arrcode['lightTB'] * $xres * $height;
diff --git a/lib/MPDF/vendor/mpdf/mpdf/src/OtlDump.php b/lib/MPDF/vendor/mpdf/mpdf/src/OtlDump.php
index 024c54d..8943e3f 100644
--- a/lib/MPDF/vendor/mpdf/mpdf/src/OtlDump.php
+++ b/lib/MPDF/vendor/mpdf/mpdf/src/OtlDump.php
@@ -178,7 +178,7 @@ class OtlDump
$this->fh = fopen($file, 'rb');
if (!$this->fh) {
- throw new \Mpdf\MpdfException(sprintf('Unable to open file "%s"', $file));
+ throw new \Mpdf\Exception\FontException(sprintf('Unable to open file "%s"', $file));
}
$this->_pos = 0;
@@ -196,21 +196,21 @@ class OtlDump
$this->panose = [];
if ($version == 0x4F54544F) {
- throw new \Mpdf\MpdfException("Postscript outlines are not supported");
+ throw new \Mpdf\Exception\FontException("Postscript outlines are not supported");
}
if ($version == 0x74746366 && !$TTCfontID) {
- throw new \Mpdf\MpdfException("TTCfontID for a TrueType Collection has to be defined in ttfontdata configuration key (" . $file . ")");
+ throw new \Mpdf\Exception\FontException("TTCfontID for a TrueType Collection has to be defined in ttfontdata configuration key (" . $file . ")");
}
if (!in_array($version, [0x00010000, 0x74727565]) && !$TTCfontID) {
- throw new \Mpdf\MpdfException("Not a TrueType font: version=" . $version);
+ throw new \Mpdf\Exception\FontException("Not a TrueType font: version=" . $version);
}
if ($TTCfontID > 0) {
$this->version = $version = $this->read_ulong(); // TTC Header version now
if (!in_array($version, [0x00010000, 0x00020000])) {
- throw new \Mpdf\MpdfException("Error parsing TrueType Collection: version=" . $version . " - " . $file);
+ throw new \Mpdf\Exception\FontException("Error parsing TrueType Collection: version=" . $version . " - " . $file);
}
$this->numTTCFonts = $this->read_ulong();
for ($i = 1; $i <= $this->numTTCFonts; $i++) {
@@ -259,7 +259,7 @@ class OtlDump
}
$xchecksum = $t['checksum'];
if ($xchecksum != $checksum) {
- throw new \Mpdf\MpdfException(sprintf('TTF file "%s": invalid checksum %s table: %s (expected %s)', $this->filename, dechex($checksum[0]) . dechex($checksum[1]), $t['tag'], dechex($xchecksum[0]) . dechex($xchecksum[1])));
+ throw new \Mpdf\Exception\FontException(sprintf('TTF file "%s": invalid checksum %s table: %s (expected %s)', $this->filename, dechex($checksum[0]) . dechex($checksum[1]), $t['tag'], dechex($xchecksum[0]) . dechex($xchecksum[1])));
}
}
}
@@ -473,7 +473,7 @@ class OtlDump
$name_offset = $this->seek_table("name");
$format = $this->read_ushort();
if ($format != 0 && $format != 1) {
- throw new \Mpdf\MpdfException("Unknown name table format " . $format);
+ throw new \Mpdf\Exception\FontException("Error loading font: Unknown name table format " . $format);
}
$numRecords = $this->read_ushort();
$string_data_offset = $name_offset + $this->read_ushort();
@@ -495,7 +495,7 @@ class OtlDump
$opos = $this->_pos;
$this->seek($string_data_offset + $offset);
if ($length % 2 != 0) {
- throw new \Mpdf\MpdfException("PostScript name is UTF-16BE string of odd length");
+ throw new \Mpdf\Exception\FontException("Error loading font: PostScript name is UTF-16BE string of odd length");
}
$length /= 2;
$N = '';
@@ -536,14 +536,14 @@ class OtlDump
}
}
if (!$psName) {
- throw new \Mpdf\MpdfException("Could not find PostScript font name: " . $this->filename);
+ throw new \Mpdf\Exception\FontException("Error loading font: Could not find PostScript font name: " . $this->filename);
}
if ($debug) {
for ($i = 0; $i < count($psName); $i++) {
$c = $psName[$i];
$oc = ord($c);
if ($oc > 126 || strpos(' [](){}<>/%', $c) !== false) {
- throw new \Mpdf\MpdfException("psName=" . $psName . " contains invalid character " . $c . " ie U+" . ord(c));
+ throw new \Mpdf\Exception\FontException("psName=" . $psName . " contains invalid character " . $c . " ie U+" . ord(c));
}
}
}
@@ -581,14 +581,14 @@ class OtlDump
$ver_maj = $this->read_ushort();
$ver_min = $this->read_ushort();
if ($ver_maj != 1) {
- throw new \Mpdf\MpdfException('Unknown head table version ' . $ver_maj . '.' . $ver_min);
+ throw new \Mpdf\Exception\FontException('Error loading font: Unknown head table version ' . $ver_maj . '.' . $ver_min);
}
$this->fontRevision = $this->read_ushort() . $this->read_ushort();
$this->skip(4);
$magic = $this->read_ulong();
if ($magic != 0x5F0F3CF5) {
- throw new \Mpdf\MpdfException('Invalid head table magic ' . $magic);
+ throw new \Mpdf\Exception\FontException('Error loading font: Invalid head table magic ' . $magic);
}
$this->skip(2);
} else {
@@ -606,7 +606,7 @@ class OtlDump
$indexToLocFormat = $this->read_ushort();
$glyphDataFormat = $this->read_ushort();
if ($glyphDataFormat != 0) {
- throw new \Mpdf\MpdfException('Unknown glyph data format ' . $glyphDataFormat);
+ throw new \Mpdf\Exception\FontException('Error loading font: Unknown glyph data format ' . $glyphDataFormat);
}
///////////////////////////////////
@@ -635,7 +635,7 @@ class OtlDump
if ($fsType == 0x0002 || ($fsType & 0x0300) != 0) {
global $overrideTTFFontRestriction;
if (!$overrideTTFFontRestriction) {
- throw new \Mpdf\MpdfException('ERROR - Font file ' . $this->filename . ' cannot be embedded due to copyright restrictions.');
+ throw new \Mpdf\Exception\FontException('Font file ' . $this->filename . ' cannot be embedded due to copyright restrictions.');
}
$this->restrictedUse = true;
}
@@ -685,7 +685,7 @@ class OtlDump
$ver_maj = $this->read_ushort();
$ver_min = $this->read_ushort();
if ($ver_maj < 1 || $ver_maj > 4) {
- throw new \Mpdf\MpdfException('Unknown post table version ' . $ver_maj);
+ throw new \Mpdf\Exception\FontException('Error loading font: Unknown post table version ' . $ver_maj);
}
} else {
$this->skip(4);
@@ -715,7 +715,7 @@ class OtlDump
$ver_maj = $this->read_ushort();
$ver_min = $this->read_ushort();
if ($ver_maj != 1) {
- throw new \Mpdf\MpdfException('Unknown hhea table version ' . $ver_maj);
+ throw new \Mpdf\Exception\FontException(sprintf('Error loading font: Unknown hhea table version %s', $ver_maj));
}
$this->skip(28);
} else {
@@ -723,11 +723,11 @@ class OtlDump
}
$metricDataFormat = $this->read_ushort();
if ($metricDataFormat != 0) {
- throw new \Mpdf\MpdfException('Unknown horizontal metric data format ' . $metricDataFormat);
+ throw new \Mpdf\Exception\FontException('Error loading font: Unknown horizontal metric data format ' . $metricDataFormat);
}
$numberOfHMetrics = $this->read_ushort();
if ($numberOfHMetrics == 0) {
- throw new \Mpdf\MpdfException('Number of horizontal metrics is 0');
+ throw new \Mpdf\Exception\FontException('Error loading font: Number of horizontal metrics is 0');
}
///////////////////////////////////
@@ -738,7 +738,7 @@ class OtlDump
$ver_maj = $this->read_ushort();
$ver_min = $this->read_ushort();
if ($ver_maj != 1) {
- throw new \Mpdf\MpdfException('Unknown maxp table version ' . $ver_maj);
+ throw new \Mpdf\Exception\FontException('Error loading font: Unknown maxp table version ' . $ver_maj);
}
} else {
$this->skip(4);
@@ -781,7 +781,7 @@ class OtlDump
}
if (!$unicode_cmap_offset) {
- throw new \Mpdf\MpdfException('Font (' . $this->filename . ') does not have cmap for Unicode (platform 3, encoding 1, format 4, or platform 0, any encoding, format 4)');
+ throw new \Mpdf\Exception\FontException('Font (' . $this->filename . ') does not have cmap for Unicode (platform 3, encoding 1, format 4, or platform 0, any encoding, format 4)');
}
$sipset = false;
@@ -858,7 +858,7 @@ class OtlDump
$bctr++;
}
} else {
- throw new \Mpdf\MpdfException($names[1] . " : WARNING - The font does not have enough space to map all (unmapped) included glyphs into Private Use Area U+E000 - U+F8FF");
+ throw new \Mpdf\Exception\FontException(sprintf('Font "%s" does not have cmap for Unicode (platform 3, encoding 1, format 4, or platform 0, any encoding, format 4)', $this->filename));
}
}
$glyphToChar[$gid][] = $bctr;
@@ -1568,7 +1568,7 @@ $MarkAttachmentType = ' . var_export($this->MarkAttachmentType, true) . ';
}
}
} else {
- throw new \Mpdf\MpdfException("GPOS Lookup Type " . $Lookup[$i]['Type'] . ", Format " . $SubstFormat . " not supported (ttfontsuni.php).");
+ throw new \Mpdf\Exception\FontException("GPOS Lookup Type " . $Lookup[$i]['Type'] . ", Format " . $SubstFormat . " not supported (ttfontsuni.php).");
}
}
} // LookupType 6: Chaining Contextual Substitution Subtable
@@ -1625,7 +1625,7 @@ $MarkAttachmentType = ' . var_export($this->MarkAttachmentType, true) . ';
}
}
} else {
- throw new \Mpdf\MpdfException("Lookup Type " . $Lookup[$i]['Type'] . " not supported.");
+ throw new \Mpdf\Exception\FontException("Lookup Type " . $Lookup[$i]['Type'] . " not supported.");
}
}
}
@@ -1807,7 +1807,7 @@ $MarkAttachmentType = ' . var_export($this->MarkAttachmentType, true) . ';
$glyphs = $this->_getCoverage();
$Lookup[$i]['Subtable'][$c]['CoverageInputGlyphs'][] = implode("|", $glyphs);
}
- throw new \Mpdf\MpdfException("Lookup Type 5, SubstFormat 3 not tested. Please report this with the name of font used - " . $this->fontkey);
+ throw new \Mpdf\Exception\FontException("Lookup Type 5, SubstFormat 3 not tested. Please report this with the name of font used - " . $this->fontkey);
}
}
}
@@ -2728,7 +2728,7 @@ $MarkAttachmentType = ' . var_export($this->MarkAttachmentType, true) . ';
// Flag & 0x0010 = UseMarkFilteringSet
if ($flag & 0x0010) {
- throw new \Mpdf\MpdfException("This font " . $this->fontkey . " contains MarkGlyphSets");
+ throw new \Mpdf\Exception\FontException("This font " . $this->fontkey . " contains MarkGlyphSets");
$str = "Mark Glyph Set: ";
$str .= $this->MarkGlyphSets[$MarkFilteringSet];
}
@@ -3757,21 +3757,21 @@ $MarkAttachmentType = ' . var_export($this->MarkAttachmentType, true) . ';
// Format 1:
//===========
if ($PosFormat == 1) {
- throw new \Mpdf\MpdfException("GPOS Lookup Type " . $Type . " Format " . $PosFormat . " not YET TESTED.");
+ throw new \Mpdf\Exception\FontException("GPOS Lookup Type " . $Type . " Format " . $PosFormat . " not YET TESTED.");
} //===========
// Format 2:
//===========
else {
if ($PosFormat == 2) {
- throw new \Mpdf\MpdfException("GPOS Lookup Type " . $Type . " Format " . $PosFormat . " not YET TESTED.");
+ throw new \Mpdf\Exception\FontException("GPOS Lookup Type " . $Type . " Format " . $PosFormat . " not YET TESTED.");
} //===========
// Format 3:
//===========
else {
if ($PosFormat == 3) {
- throw new \Mpdf\MpdfException("GPOS Lookup Type " . $Type . " Format " . $PosFormat . " not YET TESTED.");
+ throw new \Mpdf\Exception\FontException("GPOS Lookup Type " . $Type . " Format " . $PosFormat . " not YET TESTED.");
} else {
- throw new \Mpdf\MpdfException("GPOS Lookup Type " . $Type . ", Format " . $PosFormat . " not supported.");
+ throw new \Mpdf\Exception\FontException("GPOS Lookup Type " . $Type . ", Format " . $PosFormat . " not supported.");
}
}
}
@@ -3785,7 +3785,7 @@ $MarkAttachmentType = ' . var_export($this->MarkAttachmentType, true) . ';
// Format 1:
//===========
if ($PosFormat == 1) {
- throw new \Mpdf\MpdfException("GPOS Lookup Type " . $Type . " Format " . $PosFormat . " not TESTED YET.");
+ throw new \Mpdf\Exception\FontException("GPOS Lookup Type " . $Type . " Format " . $PosFormat . " not TESTED YET.");
} //===========
// Format 2:
//===========
@@ -3794,7 +3794,7 @@ $MarkAttachmentType = ' . var_export($this->MarkAttachmentType, true) . ';
$html .= 'GPOS Lookup Type 8: Format 2 not yet supported in OTL dump
';
continue;
/* NB When developing - cf. GSUB 6.2 */
- throw new \Mpdf\MpdfException("GPOS Lookup Type " . $Type . " Format " . $PosFormat . " not TESTED YET.");
+ throw new \Mpdf\Exception\FontException("GPOS Lookup Type " . $Type . " Format " . $PosFormat . " not TESTED YET.");
} //===========
// Format 3:
//===========
@@ -4179,7 +4179,7 @@ $MarkAttachmentType = ' . var_export($this->MarkAttachmentType, true) . ';
$this->glyphPos[] = ($arr[$n + 1]);
}
} else {
- throw new \Mpdf\MpdfException('Unknown location table format ' . $indexToLocFormat);
+ throw new \Mpdf\Exception\FontException('Unknown location table format ' . $indexToLocFormat);
}
}
}
diff --git a/lib/MPDF/vendor/mpdf/mpdf/src/RemoteContentFetcher.php b/lib/MPDF/vendor/mpdf/mpdf/src/RemoteContentFetcher.php
index f1547ec..c2d74a8 100644
--- a/lib/MPDF/vendor/mpdf/mpdf/src/RemoteContentFetcher.php
+++ b/lib/MPDF/vendor/mpdf/mpdf/src/RemoteContentFetcher.php
@@ -31,7 +31,7 @@ class RemoteContentFetcher implements \Psr\Log\LoggerAwareInterface
$ch = curl_init($url);
- curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0.1'); // mPDF 5.7.4
+ curl_setopt($ch, CURLOPT_USERAGENT, $this->mpdf->curlUserAgent);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_NOBODY, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
diff --git a/lib/MPDF/vendor/mpdf/mpdf/src/TTFontFile.php b/lib/MPDF/vendor/mpdf/mpdf/src/TTFontFile.php
index 0834ff0..fb5ad1e 100644
--- a/lib/MPDF/vendor/mpdf/mpdf/src/TTFontFile.php
+++ b/lib/MPDF/vendor/mpdf/mpdf/src/TTFontFile.php
@@ -228,7 +228,7 @@ class TTFontFile
$this->fh = fopen($file, 'rb');
if (!$this->fh) {
- throw new \Mpdf\MpdfException(sprintf('Unable to open font file "%s"', $file));
+ throw new \Mpdf\Exception\FontException(sprintf('Unable to open font file "%s"', $file));
}
$this->_pos = 0;
@@ -265,21 +265,21 @@ class TTFontFile
$this->panose = [];
if ($version === 0x4F54544F) {
- throw new \Mpdf\MpdfException('Postscript outlines are not supported');
+ throw new \Mpdf\Exception\FontException('Postscript outlines are not supported');
}
if ($version === 0x74746366 && !$TTCfontID) {
- throw new \Mpdf\MpdfException(sprintf('TTCfontID for a TrueType Collection is not defined in mPDF "fontdata" configuration (%s)', $file));
+ throw new \Mpdf\Exception\FontException(sprintf('TTCfontID for a TrueType Collection is not defined in mPDF "fontdata" configuration (%s)', $file));
}
if (!in_array($version, [0x00010000, 0x74727565], true) && !$TTCfontID) {
- throw new \Mpdf\MpdfException(sprintf('Not a TrueType font: version=%s)', $version));
+ throw new \Mpdf\Exception\FontException(sprintf('Not a TrueType font: version=%s)', $version));
}
if ($TTCfontID > 0) {
$this->version = $version = $this->read_ulong(); // TTC Header version now
if (!in_array($version, [0x00010000, 0x00020000], true)) {
- throw new \Mpdf\MpdfException(sprintf('Error parsing TrueType Collection: version=%s - (%s)', $version, $file));
+ throw new \Mpdf\Exception\FontException(sprintf('Error parsing TrueType Collection: version=%s - (%s)', $version, $file));
}
$this->numTTCFonts = $this->read_ulong();
for ($i = 1; $i <= $this->numTTCFonts; $i++) {
@@ -332,7 +332,7 @@ class TTFontFile
}
$xchecksum = $t['checksum'];
if ($xchecksum != $checksum) {
- throw new \Mpdf\MpdfException(sprintf('TTF file "%s": invalid checksum %s table: %s (expected %s)', $this->filename, dechex($checksum[0]) . dechex($checksum[1]), $t['tag'], dechex($xchecksum[0]) . dechex($xchecksum[1])));
+ throw new \Mpdf\Exception\FontException(sprintf('TTF file "%s": invalid checksum %s table: %s (expected %s)', $this->filename, dechex($checksum[0]) . dechex($checksum[1]), $t['tag'], dechex($xchecksum[0]) . dechex($xchecksum[1])));
}
}
}
@@ -548,7 +548,7 @@ class TTFontFile
$this->fh = fopen($file, 'rb');
if (!$this->fh) {
- throw new \Mpdf\MpdfException(sprintf('Unable to open file "%s"', $file));
+ throw new \Mpdf\Exception\FontException(sprintf('Unable to open file "%s"', $file));
}
$this->_pos = 0;
@@ -563,7 +563,7 @@ class TTFontFile
if ($TTCfontID > 0) {
$this->version = $version = $this->read_ulong(); // TTC Header version now
if (!in_array($version, [0x00010000, 0x00020000], true)) {
- throw new \Mpdf\MpdfException(sprintf("Error parsing TrueType Collection: version=%s (%s)", $version, $file));
+ throw new \Mpdf\Exception\FontException(sprintf("Error parsing TrueType Collection: version=%s (%s)", $version, $file));
}
$this->numTTCFonts = $this->read_ulong();
for ($i = 1; $i <= $this->numTTCFonts; $i++) {
@@ -616,7 +616,7 @@ class TTFontFile
$bctr++;
} // Avoid overwriting a glyph already mapped in PUA
if ($bctr > 0xF8FF) {
- throw new \Mpdf\MpdfException(sprintf('Font "%s" cannot map all included glyphs into Private Use Area U+E000-U+F8FF; cannot use useOTL on this font', $file));
+ throw new \Mpdf\Exception\FontException(sprintf('Font "%s" cannot map all included glyphs into Private Use Area U+E000-U+F8FF; cannot use useOTL on this font', $file));
}
$glyphToChar[$gid][] = $bctr;
$charToGlyph[$bctr] = $gid;
@@ -636,7 +636,7 @@ class TTFontFile
$this->fh = fopen($file, 'rb');
if (!$this->fh) {
- throw new \Mpdf\MpdfException(sprintf('Unable to open file "%s"', $file));
+ throw new \Mpdf\Exception\FontException(sprintf('Unable to open file "%s"', $file));
}
$this->numTTCFonts = 0;
@@ -645,10 +645,10 @@ class TTFontFile
if ($version === 0x74746366) {
$this->version = $version = $this->read_ulong(); // TTC Header version now
if (!in_array($version, [0x00010000, 0x00020000], true)) {
- throw new \Mpdf\MpdfException(sprintf("Error parsing TrueType Collection: version=%s (%s)", $version, $file));
+ throw new \Mpdf\Exception\FontException(sprintf("Error parsing TrueType Collection: version=%s (%s)", $version, $file));
}
} else {
- throw new \Mpdf\MpdfException(sprintf("Not a TrueType Collection: version=%s (%s)", $version, $file));
+ throw new \Mpdf\Exception\FontException(sprintf("Not a TrueType Collection: version=%s (%s)", $version, $file));
}
$this->numTTCFonts = $this->read_ulong();
@@ -664,7 +664,7 @@ class TTFontFile
$name_offset = $this->seek_table("name");
$format = $this->read_ushort();
if ($format != 0 && $format != 1) {
- throw new \Mpdf\MpdfException("Unknown name table format " . $format);
+ throw new \Mpdf\Exception\FontException("Error loading font: Unknown name table format $format for font $this->filename");
}
$numRecords = $this->read_ushort();
@@ -691,7 +691,7 @@ class TTFontFile
$opos = $this->_pos;
$this->seek($string_data_offset + $offset);
if ($length % 2 != 0) {
- throw new \Mpdf\MpdfException("PostScript name is UTF-16BE string of odd length");
+ throw new \Mpdf\Exception\FontException("Error loading font: PostScript name is UTF-16BE string of odd length for font $this->filename");
}
$length /= 2;
$N = '';
@@ -728,7 +728,7 @@ class TTFontFile
}
if (!$psName) {
- throw new \Mpdf\MpdfException("Could not find PostScript font name: " . $this->filename);
+ throw new \Mpdf\Exception\FontException("Error loading font: Could not find PostScript font name '$this->filename'");
}
// CHECK IF psName valid (PadaukBook contains illegal characters in Name ID 6 i.e. Postscript Name)
@@ -738,7 +738,7 @@ class TTFontFile
$c = $psName[$i];
$oc = ord($c);
if ($oc > 126 || strpos(' [](){}<>/%', $c) !== false) {
- //throw new \Mpdf\MpdfException("psName=".$psName." contains invalid character ".$c." ie U+".ord(c));
+ //throw new \Mpdf\Exception\FontException("psName=".$psName." contains invalid character ".$c." ie U+".ord(c));
$psNameInvalid = true;
break;
}
@@ -780,14 +780,14 @@ class TTFontFile
$ver_maj = $this->read_ushort();
$ver_min = $this->read_ushort();
if ($ver_maj != 1) {
- throw new \Mpdf\MpdfException('Unknown head table version ' . $ver_maj . '.' . $ver_min);
+ throw new \Mpdf\Exception\FontException('Error loading font: Unknown head table version ' . $ver_maj . '.' . $ver_min);
}
$this->fontRevision = $this->read_ushort() . $this->read_ushort();
$this->skip(4);
$magic = $this->read_ulong();
if ($magic !== 0x5F0F3CF5) {
- throw new \Mpdf\MpdfException('Invalid head table magic ' . $magic);
+ throw new \Mpdf\Exception\FontException('Error loading font: Invalid head table magic ' . $magic);
}
$this->skip(2);
} else {
@@ -806,7 +806,7 @@ class TTFontFile
$indexToLocFormat = $this->read_ushort();
$glyphDataFormat = $this->read_ushort();
if ($glyphDataFormat != 0) {
- throw new \Mpdf\MpdfException(sprintf('Unknown glyph data format %s', $glyphDataFormat));
+ throw new \Mpdf\Exception\FontException(sprintf('Error loading font: Unknown glyph data format %s', $glyphDataFormat));
}
// hhea metrics table
@@ -938,7 +938,7 @@ class TTFontFile
if ($debug) {
$ver_maj = $this->read_ushort();
if ($ver_maj < 1 || $ver_maj > 4) {
- throw new \Mpdf\MpdfException(sprintf('Unknown post table version %s', $ver_maj));
+ throw new \Mpdf\Exception\FontException(sprintf('Error loading font: Unknown post table version %s', $ver_maj));
}
} else {
$this->skip(4);
@@ -966,7 +966,7 @@ class TTFontFile
if ($debug) {
$ver_maj = $this->read_ushort();
if ($ver_maj != 1) {
- throw new \Mpdf\MpdfException(sprintf('Unknown hhea table version %s', $ver_maj));
+ throw new \Mpdf\Exception\FontException(sprintf('Error loading font: Unknown hhea table version %s', $ver_maj));
}
$this->skip(28);
} else {
@@ -976,13 +976,13 @@ class TTFontFile
$metricDataFormat = $this->read_ushort();
if ($metricDataFormat != 0) {
- throw new \Mpdf\MpdfException(sprintf('Unknown horizontal metric data format "%s"', $metricDataFormat));
+ throw new \Mpdf\Exception\FontException(sprintf('Error loading font: Unknown horizontal metric data format "%s"', $metricDataFormat));
}
$numberOfHMetrics = $this->read_ushort();
if ($numberOfHMetrics == 0) {
- throw new \Mpdf\MpdfException('Number of horizontal metrics is 0');
+ throw new \Mpdf\Exception\FontException('Error loading font: Number of horizontal metrics is 0');
}
// maxp - Maximum profile table
@@ -990,7 +990,7 @@ class TTFontFile
if ($debug) {
$ver_maj = $this->read_ushort();
if ($ver_maj != 1) {
- throw new \Mpdf\MpdfException(sprintf('Unknown maxp table version ', $ver_maj));
+ throw new \Mpdf\Exception\FontException(sprintf('Error loading font: Unknown maxp table version %s', $ver_maj));
}
} else {
$this->skip(4);
@@ -1028,7 +1028,7 @@ class TTFontFile
}
if (!$unicode_cmap_offset) {
- throw new \Mpdf\MpdfException(sprintf('Font "%s" does not have cmap for Unicode (platform 3, encoding 1, format 4, or platform 0, any encoding, format 4)', $this->filename));
+ throw new \Mpdf\Exception\FontException(sprintf('Font "%s" does not have cmap for Unicode (platform 3, encoding 1, format 4, or platform 0, any encoding, format 4)', $this->filename));
}
$sipset = false;
@@ -1108,7 +1108,7 @@ class TTFontFile
$bctr++;
}
} else {
- throw new \Mpdf\MpdfException(sprintf('The font "%s" does not have enough space to map all (unmapped) included glyphs into Private Use Area U+E000-U+F8FF', $names[1]));
+ throw new \Mpdf\Exception\FontException(sprintf('The font "%s" does not have enough space to map all (unmapped) included glyphs into Private Use Area U+E000-U+F8FF', $names[1]));
}
}
@@ -1340,7 +1340,7 @@ class TTFontFile
$this->MarkGlyphSets = [];
}
} else {
- throw new \Mpdf\MpdfException(sprintf('Unable to set font "%s" to use OTL as it does not include OTL tables (or at least not a GDEF table).', $this->filename));
+ throw new \Mpdf\Exception\FontException(sprintf('Unable to set font "%s" to use OTL as it does not include OTL tables (or at least not a GDEF table).', $this->filename));
}
$GSUB_offset = 0;
@@ -1779,7 +1779,7 @@ class TTFontFile
}
}
} else {
- throw new \Mpdf\MpdfException("GPOS Lookup Type " . $Lookup[$i]['Type'] . ", Format " . $SubstFormat . " not supported (ttfontsuni.php).");
+ throw new \Mpdf\Exception\FontException("GPOS Lookup Type " . $Lookup[$i]['Type'] . ", Format " . $SubstFormat . " not supported (ttfontsuni.php).");
}
} // LookupType 6: Chaining Contextual Substitution Subtable
elseif ($Lookup[$i]['Type'] == 6) {
@@ -1831,7 +1831,7 @@ class TTFontFile
}
}
} else {
- throw new \Mpdf\MpdfException(sprintf('Lookup Type "%s" not supported.', $Lookup[$i]['Type']));
+ throw new \Mpdf\Exception\FontException(sprintf('Lookup Type "%s" not supported.', $Lookup[$i]['Type']));
}
}
}
@@ -1995,7 +1995,7 @@ class TTFontFile
$glyphs = $this->_getCoverage();
$Lookup[$i]['Subtable'][$c]['CoverageInputGlyphs'][] = implode("|", $glyphs);
}
- throw new \Mpdf\MpdfException("Lookup Type 5, SubstFormat 3 not tested. Please report this with the name of font used - " . $this->fontkey);
+ throw new \Mpdf\Exception\FontException("Lookup Type 5, SubstFormat 3 not tested. Please report this with the name of font used - " . $this->fontkey);
}
} // LookupType 6: Chaining Contextual Substitution Subtable
elseif ($Lookup[$i]['Type'] == 6) {
@@ -2960,7 +2960,7 @@ class TTFontFile
// Flag & 0x0010 = UseMarkFilteringSet
if ($flag & 0x0010) {
- throw new \Mpdf\MpdfException("This font " . $this->fontkey . " contains MarkGlyphSets - Not tested yet");
+ throw new \Mpdf\Exception\FontException("This font " . $this->fontkey . " contains MarkGlyphSets - Not tested yet");
$str = $this->MarkGlyphSets[$MarkFilteringSet];
}
@@ -3449,7 +3449,7 @@ class TTFontFile
$this->fh = fopen($file, 'rb');
if (!$this->fh) {
- throw new \Mpdf\MpdfException(sprintf('Unable to open file %s', $file));
+ throw new \Mpdf\Exception\FontException(sprintf('Unable to open file %s', $file));
}
$this->_pos = 0;
@@ -3470,7 +3470,7 @@ class TTFontFile
if ($TTCfontID > 0) {
$this->version = $version = $this->read_ulong(); // TTC Header version now
if (!in_array($version, [0x00010000, 0x00020000], true)) {
- throw new \Mpdf\MpdfException(sprintf('Error parsing TrueType Collection: version=%s - %s', $version, $file));
+ throw new \Mpdf\Exception\FontException(sprintf('Error parsing TrueType Collection: version=%s - %s', $version, $file));
}
$this->numTTCFonts = $this->read_ulong();
for ($i = 1; $i <= $this->numTTCFonts; $i++) {
@@ -3519,7 +3519,7 @@ class TTFontFile
}
if (!$unicode_cmap_offset) {
- throw new \Mpdf\MpdfException(sprintf('Font "%s" does not have Unicode cmap (platform 3, encoding 1, format 4, or platform 0 [any encoding] format 4)', $this->filename));
+ throw new \Mpdf\Exception\FontException(sprintf('Font "%s" does not have Unicode cmap (platform 3, encoding 1, format 4, or platform 0 [any encoding] format 4)', $this->filename));
}
$glyphToChar = [];
@@ -3535,7 +3535,7 @@ class TTFontFile
$bctr++;
} // Avoid overwriting a glyph already mapped in PUA
if ($bctr > 0xF8FF) {
- throw new \Mpdf\MpdfException($file . " : WARNING - Font cannot map all included glyphs into Private Use Area U+E000 - U+F8FF; cannot use useOTL on this font");
+ throw new \Mpdf\Exception\FontException($file . " : WARNING - Font cannot map all included glyphs into Private Use Area U+E000 - U+F8FF; cannot use useOTL on this font");
}
$glyphToChar[$gid][] = $bctr;
$charToGlyph[$bctr] = $gid;
@@ -3940,7 +3940,7 @@ class TTFontFile
$this->fh = fopen($file, 'rb');
if (!$this->fh) {
- throw new \Mpdf\MpdfException(sprintf('Unable to open file "%s"', $file));
+ throw new \Mpdf\Exception\FontException(sprintf('Unable to open file "%s"', $file));
}
$this->filename = $file;
@@ -3962,7 +3962,7 @@ class TTFontFile
if ($TTCfontID > 0) {
$this->version = $version = $this->read_ulong(); // TTC Header version now
if (!in_array($version, [0x00010000, 0x00020000])) {
- throw new \Mpdf\MpdfException("ERROR - Error parsing TrueType Collection: version=" . $version . " - " . $file);
+ throw new \Mpdf\Exception\FontException("ERROR - Error parsing TrueType Collection: version=" . $version . " - " . $file);
}
$this->numTTCFonts = $this->read_ulong();
for ($i = 1; $i <= $this->numTTCFonts; $i++) {
@@ -4021,7 +4021,7 @@ class TTFontFile
}
if (!$unicode_cmap_offset) {
- throw new \Mpdf\MpdfException(sprintf('Font "%s" does not have cmap for Unicode (platform 3, encoding 1, format 4, or platform 0, any encoding, format 4)', $file));
+ throw new \Mpdf\Exception\FontException(sprintf('Font "%s" does not have cmap for Unicode (platform 3, encoding 1, format 4, or platform 0, any encoding, format 4)', $file));
}
// Format 12 CMAP does characters above Unicode BMP i.e. some HKCS characters U+20000 and above
@@ -4627,7 +4627,7 @@ class TTFontFile
$this->glyphPos[] = ($arr[$n + 1]);
}
} else {
- throw new \Mpdf\MpdfException('Unknown location table format ' . $indexToLocFormat);
+ throw new \Mpdf\Exception\FontException('Unknown location table format ' . $indexToLocFormat);
}
}
@@ -4753,7 +4753,7 @@ class TTFontFile
$this->fh = fopen($file, 'rb');
if (!$this->fh) {
- throw new \Mpdf\MpdfException(sprintf('Unable to open file "%s"', $file));
+ throw new \Mpdf\Exception\FontException(sprintf('Unable to open file "%s"', $file));
}
$this->_pos = 0;
@@ -4774,7 +4774,7 @@ class TTFontFile
if ($TTCfontID > 0) {
$this->version = $version = $this->read_ulong(); // TTC Header version now
if (!in_array($version, [0x00010000, 0x00020000], true)) {
- throw new \Mpdf\MpdfException(sprintf('Error parsing TrueType Collection: version=%s - %s', $version, $file));
+ throw new \Mpdf\Exception\FontException(sprintf('Error parsing TrueType Collection: version=%s - %s', $version, $file));
}
$this->numTTCFonts = $this->read_ulong();
for ($i = 1; $i <= $this->numTTCFonts; $i++) {
@@ -4821,7 +4821,7 @@ class TTFontFile
}
if (!$unicode_cmap_offset) {
- throw new \Mpdf\MpdfException(sprintf('Font "%s" does not have cmap for Unicode (platform 3, encoding 1, format 4, or platform 0, any encoding, format 4)', $this->filename));
+ throw new \Mpdf\Exception\FontException(sprintf('Font "%s" does not have cmap for Unicode (platform 3, encoding 1, format 4, or platform 0, any encoding, format 4)', $this->filename));
}
$glyphToChar = [];
@@ -4836,7 +4836,7 @@ class TTFontFile
$bctr++;
} // Avoid overwriting a glyph already mapped in PUA (6,400)
if ($bctr > 0xF8FF) {
- throw new \Mpdf\MpdfException("Problem. Trying to repackage TF file; not enough space for unmapped glyphs");
+ throw new \Mpdf\Exception\FontException("Problem. Trying to repackage TF file; not enough space for unmapped glyphs");
}
$glyphToChar[$gid][] = $bctr;
$charToGlyph[$bctr] = $gid;
diff --git a/lib/MPDF/vendor/mpdf/mpdf/src/Tag/BarCode.php b/lib/MPDF/vendor/mpdf/mpdf/src/Tag/BarCode.php
index e80fe59..65edb2a 100644
--- a/lib/MPDF/vendor/mpdf/mpdf/src/Tag/BarCode.php
+++ b/lib/MPDF/vendor/mpdf/mpdf/src/Tag/BarCode.php
@@ -151,7 +151,7 @@ class BarCode extends Tag
}
if (isset($properties['VERTICAL-ALIGN'])) {
- $objattr['vertical-align'] = self::ALIGN[strtolower($properties['VERTICAL-ALIGN'])];
+ $objattr['vertical-align'] = $this->getAlign($properties['VERTICAL-ALIGN']);
}
if (isset($properties['COLOR']) && $properties['COLOR'] != '') {
$objattr['color'] = $this->colorConverter->convert($properties['COLOR'], $this->mpdf->PDFAXwarnings);
@@ -205,7 +205,7 @@ class BarCode extends Tag
$w = ($arrcode['maxw'] * $arrcode['nom-X'] * $objattr['bsize']) + $arrcode['quietL'] + $arrcode['quietR'];
$h = ($arrcode['nom-H'] * $objattr['bsize']) + (2 * $arrcode['quietTB']);
- } elseif (in_array($objattr['btype'], ['C128A', 'C128B', 'C128C', 'EAN128A', 'EAN128B', 'EAN128C',
+ } elseif (in_array($objattr['btype'], ['C128A', 'C128B', 'C128C', 'C128RAW', 'EAN128A', 'EAN128B', 'EAN128C',
'C39', 'C39+', 'C39E', 'C39E+', 'S25', 'S25+', 'I25', 'I25+', 'I25B',
'I25B+', 'C93', 'MSI', 'MSI+', 'CODABAR', 'CODE11'])) {
diff --git a/lib/MPDF/vendor/mpdf/mpdf/src/Tag/BlockTag.php b/lib/MPDF/vendor/mpdf/mpdf/src/Tag/BlockTag.php
index cbe4bc5..14e6a64 100644
--- a/lib/MPDF/vendor/mpdf/mpdf/src/Tag/BlockTag.php
+++ b/lib/MPDF/vendor/mpdf/mpdf/src/Tag/BlockTag.php
@@ -126,7 +126,7 @@ abstract class BlockTag extends Tag
}
// Cannot set block properties inside table - use Bold to indicate h1-h6
if ($tag === 'CENTER' && $this->mpdf->tdbegin) {
- $this->mpdf->cell[$this->mpdf->row][$this->mpdf->col]['a'] = self::ALIGN['center'];
+ $this->mpdf->cell[$this->mpdf->row][$this->mpdf->col]['a'] = $this->getAlign('center');
}
$this->mpdf->InlineProperties['BLOCKINTABLE'] = $this->mpdf->saveInlineProperties();
@@ -398,7 +398,7 @@ abstract class BlockTag extends Tag
// mPDF 6
if (!empty($attr['ALIGN'])) {
- $currblk['block-align'] = self::ALIGN[strtolower($attr['ALIGN'])];
+ $currblk['block-align'] = $this->getAlign($attr['ALIGN']);
}
@@ -447,7 +447,7 @@ abstract class BlockTag extends Tag
// Cancel Keep-Block-together
$currblk['keep_block_together'] = false;
- $this->mpdf->kt_y00 = '';
+ $this->mpdf->kt_y00 = 0;
$this->mpdf->keep_block_together = 0;
$this->mpdf->blockContext++;
@@ -498,7 +498,7 @@ abstract class BlockTag extends Tag
} elseif (isset($properties['FLOAT']) && strtoupper($properties['FLOAT']) === 'LEFT' && !$this->mpdf->ColActive) {
// Cancel Keep-Block-together
$currblk['keep_block_together'] = false;
- $this->mpdf->kt_y00 = '';
+ $this->mpdf->kt_y00 = 0;
$this->mpdf->keep_block_together = 0;
$this->mpdf->blockContext++;
@@ -1257,6 +1257,7 @@ abstract class BlockTag extends Tag
$this->mpdf->pageoutput[$this->mpdf->page] = [];
$this->mpdf->y = $this->mpdf->kt_y00;
+
$ihtml = $this->mpdf->blk[$this->mpdf->blklvl]['array_i'] - 1;
$ahtml[$ihtml + 1] .= ' pagebreakavoidchecked="true";'; // avoid re-iterating; read in OpenTag()
diff --git a/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Columns.php b/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Columns.php
index 0e6bed4..c8c883a 100644
--- a/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Columns.php
+++ b/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Columns.php
@@ -47,7 +47,7 @@ class Columns extends Tag
if ($attr['VALIGN'] === 'J') {
$valign = 'J';
} else {
- $valign = self::ALIGN[$attr['VALIGN']];
+ $valign = $this->getAlign($attr['VALIGN']);
}
} else {
$valign = '';
diff --git a/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Hr.php b/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Hr.php
index 5155c63..89c880b 100644
--- a/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Hr.php
+++ b/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Hr.php
@@ -54,9 +54,9 @@ class Hr extends Tag
$objattr['width'] = $this->sizeConverter->convert($attr['WIDTH'], $this->mpdf->blk[$this->mpdf->blklvl]['inner_width']);
}
if (isset($properties['TEXT-ALIGN'])) {
- $objattr['align'] = self::ALIGN[strtolower($properties['TEXT-ALIGN'])];
+ $objattr['align'] = $this->getAlign($properties['TEXT-ALIGN']);
} elseif (isset($attr['ALIGN']) && $attr['ALIGN'] != '') {
- $objattr['align'] = self::ALIGN[strtolower($attr['ALIGN'])];
+ $objattr['align'] = $this->getAlign($attr['ALIGN']);
}
if (isset($properties['MARGIN-LEFT']) && strtolower($properties['MARGIN-LEFT']) === 'auto') {
diff --git a/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Img.php b/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Img.php
index cd7fc0d..5c68099 100644
--- a/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Img.php
+++ b/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Img.php
@@ -128,7 +128,7 @@ class Img extends Tag
}
if (isset($properties['VERTICAL-ALIGN'])) {
- $objattr['vertical-align'] = self::ALIGN[strtolower($properties['VERTICAL-ALIGN'])];
+ $objattr['vertical-align'] = $this->getAlign($properties['VERTICAL-ALIGN']);
}
$w = 0;
$h = 0;
diff --git a/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Input.php b/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Input.php
index 2b5b534..d98039c 100644
--- a/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Input.php
+++ b/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Input.php
@@ -81,9 +81,9 @@ class Input extends Tag
$objattr['fontsize'] = $this->mpdf->FontSizePt;
if ($this->mpdf->useActiveForms) {
if (isset($attr['ALIGN'])) {
- $objattr['text_align'] = self::ALIGN[strtolower($attr['ALIGN'])];
+ $objattr['text_align'] = $this->getAlign($attr['ALIGN']);
} elseif (isset($properties['TEXT-ALIGN'])) {
- $objattr['text_align'] = self::ALIGN[strtolower($properties['TEXT-ALIGN'])];
+ $objattr['text_align'] = $this->getAlign($properties['TEXT-ALIGN']);
}
if (isset($properties['BORDER-TOP-COLOR'])) {
$objattr['border-col'] = $this->colorConverter->convert($properties['BORDER-TOP-COLOR'], $this->mpdf->PDFAXwarnings);
@@ -105,7 +105,7 @@ class Input extends Tag
}
if ($properties['VERTICAL-ALIGN']) {
- $objattr['vertical-align'] = self::ALIGN[strtolower($properties['VERTICAL-ALIGN'])];
+ $objattr['vertical-align'] = $this->getAlign($properties['VERTICAL-ALIGN']);
}
switch (strtoupper($attr['TYPE'])) {
@@ -199,7 +199,7 @@ class Input extends Tag
$objattr['padding_right'] = 0;
if (isset($properties['VERTICAL-ALIGN'])) {
- $objattr['vertical-align'] = self::ALIGN[strtolower($properties['VERTICAL-ALIGN'])];
+ $objattr['vertical-align'] = $this->getAlign($properties['VERTICAL-ALIGN']);
}
$w = 0;
diff --git a/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Meter.php b/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Meter.php
index e3f9297..2ffff3d 100644
--- a/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Meter.php
+++ b/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Meter.php
@@ -176,7 +176,7 @@ class Meter extends InlineTag
}
if (isset($properties['VERTICAL-ALIGN'])) {
- $objattr['vertical-align'] = self::ALIGN[strtolower($properties['VERTICAL-ALIGN'])];
+ $objattr['vertical-align'] = $this->getAlign($properties['VERTICAL-ALIGN']);
}
$w = 0;
$h = 0;
diff --git a/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Table.php b/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Table.php
index 3261ed6..8504e51 100644
--- a/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Table.php
+++ b/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Table.php
@@ -163,7 +163,7 @@ class Table extends Tag
}
if (isset($attr['ALIGN']) && array_key_exists(strtolower($attr['ALIGN']), self::ALIGN)) {
- $table['a'] = self::ALIGN[strtolower($attr['ALIGN'])];
+ $table['a'] = $this->getAlign($attr['ALIGN']);
}
if (!$table['a']) {
if ($table['direction'] === 'rtl') {
@@ -190,10 +190,10 @@ class Table extends Tag
}
if (isset($properties['VERTICAL-ALIGN']) && array_key_exists(strtolower($properties['VERTICAL-ALIGN']), self::ALIGN)) {
- $table['va'] = self::ALIGN[strtolower($properties['VERTICAL-ALIGN'])];
+ $table['va'] = $this->getAlign($properties['VERTICAL-ALIGN']);
}
if (isset($properties['TEXT-ALIGN']) && array_key_exists(strtolower($properties['TEXT-ALIGN']), self::ALIGN)) {
- $table['txta'] = self::ALIGN[strtolower($properties['TEXT-ALIGN'])];
+ $table['txta'] = $this->getAlign($properties['TEXT-ALIGN']);
}
if (!empty($properties['AUTOSIZE']) && $this->mpdf->tableLevel == 1) {
diff --git a/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Tag.php b/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Tag.php
index 9f7c52c..094b2a4 100644
--- a/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Tag.php
+++ b/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Tag.php
@@ -114,6 +114,12 @@ abstract class Tag
return strtoupper(str_replace('Mpdf\Tag\\', '', $tag));
}
+ protected function getAlign($property)
+ {
+ $property = strtolower($property);
+ return array_key_exists($property, self::ALIGN) ? self::ALIGN[$property] : '';
+ }
+
abstract public function open($attr, &$ahtml, &$ihtml);
abstract public function close(&$ahtml, &$ihtml);
diff --git a/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Td.php b/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Td.php
index 6708a67..47fb978 100644
--- a/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Td.php
+++ b/lib/MPDF/vendor/mpdf/mpdf/src/Tag/Td.php
@@ -12,19 +12,23 @@ class Td extends Tag
public function open($attr, &$ahtml, &$ihtml)
{
$tag = $this->getTagName();
+
$this->mpdf->ignorefollowingspaces = true;
$this->mpdf->lastoptionaltag = $tag; // Save current HTML specified optional endtag
+
$this->cssManager->tbCSSlvl++;
+
$this->mpdf->InlineProperties = [];
$this->mpdf->InlineBDF = []; // mPDF 6
$this->mpdf->InlineBDFctr = 0; // mPDF 6
$this->mpdf->tdbegin = true;
$this->mpdf->col++;
+
while (isset($this->mpdf->cell[$this->mpdf->row][$this->mpdf->col])) {
$this->mpdf->col++;
}
- //Update number column
+ // Update number column
if ($this->mpdf->table[$this->mpdf->tableLevel][$this->mpdf->tbctr[$this->mpdf->tableLevel]]['nc'] < $this->mpdf->col + 1) {
$this->mpdf->table[$this->mpdf->tableLevel][$this->mpdf->tbctr[$this->mpdf->tableLevel]]['nc'] = $this->mpdf->col + 1;
}
@@ -114,10 +118,10 @@ class Td extends Tag
// INHERITED THEAD CSS Properties
if ($this->mpdf->tablethead) {
if ($this->mpdf->thead_valign_default) {
- $c['va'] = self::ALIGN[strtolower($this->mpdf->thead_valign_default)];
+ $c['va'] = $this->getAlign($this->mpdf->thead_valign_default);
}
if ($this->mpdf->thead_textalign_default) {
- $c['a'] = self::ALIGN[strtolower($this->mpdf->thead_textalign_default)];
+ $c['a'] = $this->getAlign($this->mpdf->thead_textalign_default);
}
if ($this->mpdf->thead_font_weight === 'B') {
$this->mpdf->SetStyle('B', true);
@@ -133,10 +137,10 @@ class Td extends Tag
// INHERITED TFOOT CSS Properties
if ($this->mpdf->tabletfoot) {
if ($this->mpdf->tfoot_valign_default) {
- $c['va'] = self::ALIGN[strtolower($this->mpdf->tfoot_valign_default)];
+ $c['va'] = $this->getAlign($this->mpdf->tfoot_valign_default);
}
if ($this->mpdf->tfoot_textalign_default) {
- $c['a'] = self::ALIGN[strtolower($this->mpdf->tfoot_textalign_default)];
+ $c['a'] = $this->getAlign($this->mpdf->tfoot_textalign_default);
}
if ($this->mpdf->tfoot_font_weight === 'B') {
$this->mpdf->SetStyle('B', true);
@@ -195,9 +199,9 @@ class Td extends Tag
}
/* -- END BACKGROUNDS -- */
if (isset($properties['VERTICAL-ALIGN'])) {
- $c['va'] = self::ALIGN[strtolower($properties['VERTICAL-ALIGN'])];
+ $c['va'] = $this->getAlign($properties['VERTICAL-ALIGN']);
} elseif (isset($attr['VALIGN'])) {
- $c['va'] = self::ALIGN[strtolower($attr['VALIGN'])];
+ $c['va'] = $this->getAlign($attr['VALIGN']);
}
@@ -205,7 +209,7 @@ class Td extends Tag
if (0 === strpos($properties['TEXT-ALIGN'], 'D')) {
$c['a'] = $properties['TEXT-ALIGN'];
} else {
- $c['a'] = self::ALIGN[strtolower($properties['TEXT-ALIGN'])];
+ $c['a'] = $this->getAlign($properties['TEXT-ALIGN']);
}
}
if (!empty($attr['ALIGN'])) {
@@ -221,7 +225,7 @@ class Td extends Tag
$c['a'] = 'DPR';
}
} else {
- $c['a'] = self::ALIGN[strtolower($attr['ALIGN'])];
+ $c['a'] = $this->getAlign($attr['ALIGN']);
}
}
@@ -458,9 +462,9 @@ class Td extends Tag
if ($this->mpdf->tableLevel == 1) {
$this->mpdf->table[$this->mpdf->tableLevel][$this->mpdf->tbctr[$this->mpdf->tableLevel]]['footernrows']
= max(
- $this->mpdf->table[$this->mpdf->tableLevel][$this->mpdf->tbctr[$this->mpdf->tableLevel]]['footernrows'],
- $this->mpdf->row + 1 - $this->mpdf->table[$this->mpdf->tableLevel][$this->mpdf->tbctr[$this->mpdf->tableLevel]]['headernrows']
- );
+ $this->mpdf->table[$this->mpdf->tableLevel][$this->mpdf->tbctr[$this->mpdf->tableLevel]]['footernrows'],
+ $this->mpdf->row + 1 - $this->mpdf->table[$this->mpdf->tableLevel][$this->mpdf->tbctr[$this->mpdf->tableLevel]]['headernrows']
+ );
}
}
$this->mpdf->Reset();
diff --git a/lib/MPDF/vendor/mpdf/mpdf/src/Tag/TextArea.php b/lib/MPDF/vendor/mpdf/mpdf/src/Tag/TextArea.php
index 8685fab..017c548 100644
--- a/lib/MPDF/vendor/mpdf/mpdf/src/Tag/TextArea.php
+++ b/lib/MPDF/vendor/mpdf/mpdf/src/Tag/TextArea.php
@@ -75,9 +75,9 @@ class TextArea extends Tag
$objattr['fontsize'] = $this->mpdf->FontSizePt;
if ($this->mpdf->useActiveForms) {
if (isset($properties['TEXT-ALIGN'])) {
- $objattr['text_align'] = self::ALIGN[strtolower($properties['TEXT-ALIGN'])];
+ $objattr['text_align'] = $this->getAlign($properties['TEXT-ALIGN']);
} elseif (isset($attr['ALIGN'])) {
- $objattr['text_align'] = self::ALIGN[strtolower($attr['ALIGN'])];
+ $objattr['text_align'] = $this->getAlign($attr['ALIGN']);
}
if (isset($properties['OVERFLOW']) && strtolower($properties['OVERFLOW']) === 'hidden') {
$objattr['donotscroll'] = true;
@@ -110,7 +110,7 @@ class TextArea extends Tag
);
}
if (isset($properties['VERTICAL-ALIGN'])) {
- $objattr['vertical-align'] = self::ALIGN[strtolower($properties['VERTICAL-ALIGN'])];
+ $objattr['vertical-align'] = $this->getAlign($properties['VERTICAL-ALIGN']);
}
$colsize = 20; //HTML default value
diff --git a/lib/MPDF/vendor/mpdf/mpdf/src/Writer/MetadataWriter.php b/lib/MPDF/vendor/mpdf/mpdf/src/Writer/MetadataWriter.php
index 568776e..01caafc 100644
--- a/lib/MPDF/vendor/mpdf/mpdf/src/Writer/MetadataWriter.php
+++ b/lib/MPDF/vendor/mpdf/mpdf/src/Writer/MetadataWriter.php
@@ -54,7 +54,7 @@ class MetadataWriter implements \Psr\Log\LoggerAwareInterface
{
$this->writer->object();
$this->mpdf->MetadataRoot = $this->mpdf->n;
- $Producer = 'mPDF ' . Mpdf::VERSION;
+ $Producer = 'mPDF' . ($this->mpdf->exposeVersion ? (' ' . Mpdf::VERSION) : '');
$z = date('O'); // +0200
$offset = substr($z, 0, 3) . ':' . substr($z, 3, 2);
$CreationDate = date('Y-m-d\TH:i:s') . $offset; // 2006-03-10T10:47:26-05:00 2006-06-19T09:05:17Z
@@ -151,7 +151,7 @@ class MetadataWriter implements \Psr\Log\LoggerAwareInterface
public function writeInfo() // _putinfo
{
- $this->writer->write('/Producer ' . $this->writer->utf16BigEndianTextString('mPDF ' . $this->getVersionString()));
+ $this->writer->write('/Producer ' . $this->writer->utf16BigEndianTextString('mPDF' . ($this->mpdf->exposeVersion ? (' ' . $this->getVersionString()) : '')));
if (!empty($this->mpdf->title)) {
$this->writer->write('/Title ' . $this->writer->utf16BigEndianTextString($this->mpdf->title));
@@ -455,23 +455,29 @@ class MetadataWriter implements \Psr\Log\LoggerAwareInterface
}
if ($this->mpdf->hasOC || count($this->mpdf->layers)) {
+
$p = $v = $h = $l = $loff = $lall = $as = '';
+
if ($this->mpdf->hasOC) {
+
if (($this->mpdf->hasOC & 1) === 1) {
$p = $this->mpdf->n_ocg_print . ' 0 R';
}
+
if (($this->mpdf->hasOC & 2) === 2) {
$v = $this->mpdf->n_ocg_view . ' 0 R';
}
+
if (($this->mpdf->hasOC & 4) === 4) {
$h = $this->mpdf->n_ocg_hidden . ' 0 R';
}
+
$as = "<> <>";
}
if (count($this->mpdf->layers)) {
foreach ($this->mpdf->layers as $k => $layer) {
- if (strtolower($this->mpdf->layerDetails[$k]['state']) === 'hidden') {
+ if (isset($this->mpdf->layerDetails[$k]) && strtolower($this->mpdf->layerDetails[$k]['state']) === 'hidden') {
$loff .= $layer['n'] . ' 0 R ';
} else {
$l .= $layer['n'] . ' 0 R ';
@@ -479,11 +485,14 @@ class MetadataWriter implements \Psr\Log\LoggerAwareInterface
$lall .= $layer['n'] . ' 0 R ';
}
}
+
$this->writer->write("/OCProperties <writer->write("/Order [$v $p $h $lall] ");
+
if ($as) {
$this->writer->write("/AS [$as] ");
}
+
$this->writer->write('>>>>');
}
}
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/AboriginalSansREGULAR.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/AboriginalSansREGULAR.ttf
new file mode 100644
index 0000000..3f88df0
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/AboriginalSansREGULAR.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Abyssinica_SIL.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Abyssinica_SIL.ttf
new file mode 100644
index 0000000..f2215e9
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Abyssinica_SIL.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Aegean.otf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Aegean.otf
new file mode 100644
index 0000000..a799f5d
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Aegean.otf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Aegyptus.otf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Aegyptus.otf
new file mode 100644
index 0000000..193a88a
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Aegyptus.otf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Akkadian.otf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Akkadian.otf
new file mode 100644
index 0000000..5dfb7ad
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Akkadian.otf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DBSILBR.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DBSILBR.ttf
new file mode 100644
index 0000000..658fc36
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DBSILBR.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSansCondensed-Bold.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSansCondensed-Bold.ttf
new file mode 100644
index 0000000..753432b
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSansCondensed-Bold.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSansCondensed-BoldOblique.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSansCondensed-BoldOblique.ttf
new file mode 100644
index 0000000..e39efeb
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSansCondensed-BoldOblique.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSansCondensed-Oblique.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSansCondensed-Oblique.ttf
new file mode 100644
index 0000000..619b9df
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSansCondensed-Oblique.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSansCondensed.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSansCondensed.ttf
new file mode 100644
index 0000000..6065234
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSansCondensed.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSansMono-Bold.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSansMono-Bold.ttf
new file mode 100644
index 0000000..9c71679
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSansMono-Bold.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSansMono-BoldOblique.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSansMono-BoldOblique.ttf
new file mode 100644
index 0000000..d6536a5
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSansMono-BoldOblique.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSansMono-Oblique.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSansMono-Oblique.ttf
new file mode 100644
index 0000000..e1af341
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSansMono-Oblique.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSansMono.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSansMono.ttf
new file mode 100644
index 0000000..8b7bb2a
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSansMono.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSerif-Bold.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSerif-Bold.ttf
new file mode 100644
index 0000000..3fffea6
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSerif-Bold.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSerif-BoldItalic.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSerif-BoldItalic.ttf
new file mode 100644
index 0000000..3a3a9df
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSerif-BoldItalic.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSerif-Italic.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSerif-Italic.ttf
new file mode 100644
index 0000000..46a718e
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSerif-Italic.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSerif.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSerif.ttf
new file mode 100644
index 0000000..712a59b
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSerif.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSerifCondensed-Bold.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSerifCondensed-Bold.ttf
new file mode 100644
index 0000000..673c66f
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSerifCondensed-Bold.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSerifCondensed-BoldItalic.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSerifCondensed-BoldItalic.ttf
new file mode 100644
index 0000000..5a3ba1a
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSerifCondensed-BoldItalic.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSerifCondensed-Italic.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSerifCondensed-Italic.ttf
new file mode 100644
index 0000000..6f8d4e4
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSerifCondensed-Italic.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSerifCondensed.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSerifCondensed.ttf
new file mode 100644
index 0000000..3291fc5
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DejaVuSerifCondensed.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Dhyana-Bold.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Dhyana-Bold.ttf
new file mode 100644
index 0000000..b439bdc
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Dhyana-Bold.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Dhyana-Regular.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Dhyana-Regular.ttf
new file mode 100644
index 0000000..9c5dcb4
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Dhyana-Regular.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DhyanaOFL.txt b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DhyanaOFL.txt
new file mode 100644
index 0000000..95af61b
--- /dev/null
+++ b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/DhyanaOFL.txt
@@ -0,0 +1,94 @@
+Copyright (c) 2010, Vernon Adams (vern@newtypography.co.uk),
+with Reserved Font Names "Dhyana".
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeMono.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeMono.ttf
new file mode 100644
index 0000000..ff5cc0e
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeMono.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeMonoBold.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeMonoBold.ttf
new file mode 100644
index 0000000..4815449
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeMonoBold.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeMonoBoldOblique.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeMonoBoldOblique.ttf
new file mode 100644
index 0000000..02692e1
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeMonoBoldOblique.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeMonoOblique.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeMonoOblique.ttf
new file mode 100644
index 0000000..87caa0f
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeMonoOblique.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeSans.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeSans.ttf
new file mode 100644
index 0000000..2072cda
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeSans.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeSansBold.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeSansBold.ttf
new file mode 100644
index 0000000..6f36dc5
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeSansBold.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeSansBoldOblique.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeSansBoldOblique.ttf
new file mode 100644
index 0000000..c5440c4
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeSansBoldOblique.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeSansOblique.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeSansOblique.ttf
new file mode 100644
index 0000000..6de107c
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeSansOblique.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeSerif.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeSerif.ttf
new file mode 100644
index 0000000..889c594
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeSerif.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeSerifBold.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeSerifBold.ttf
new file mode 100644
index 0000000..49112d3
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeSerifBold.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeSerifBoldItalic.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeSerifBoldItalic.ttf
new file mode 100644
index 0000000..c41a965
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeSerifBoldItalic.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeSerifItalic.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeSerifItalic.ttf
new file mode 100644
index 0000000..4ea6889
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/FreeSerifItalic.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/GNUFreeFontinfo.txt b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/GNUFreeFontinfo.txt
new file mode 100644
index 0000000..c9511a6
--- /dev/null
+++ b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/GNUFreeFontinfo.txt
@@ -0,0 +1,108 @@
+-*-text-*-
+ GNU FreeFont
+
+The GNU FreeFont project aims to provide a useful set of free scalable
+(i.e., OpenType) fonts covering as much as possible of the ISO 10646/Unicode
+UCS (Universal Character Set).
+
+Statement of Purpose
+--------------------
+
+The practical reason for putting glyphs together in a single font face is
+to conveniently mix symbols and characters from different writing systems,
+without having to switch fonts.
+
+Coverage
+--------
+
+FreeFont covers the following character sets
+
+* ISO 8859 parts 1-15
+* CEN MES-3 European Unicode Subset
+ http://www.evertype.com/standards/iso10646/pdf/cwa13873.pdf
+* IBM/Microsoft code pages 437, 850, 852, 1250, 1252 and more
+* Microsoft/Adobe Windows Glyph List 4 (WGL4)
+ http://www.microsoft.com/typography/otspec/WGL4.htm
+* KOI8-R and KOI8-RU
+* DEC VT100 graphics symbols
+* International Phonetic Alphabet
+* Arabic, Hebrew, Armenian, Georgian, Ethiopian and Thai alphabets,
+ including Arabic presentation forms A/B
+* mathematical symbols, including the whole TeX repertoire of symbols
+* APL symbols
+ etc.
+
+Editing
+-------
+
+The free outline font editor, George Williams's FontForge
+ is used for editing the fonts.
+
+Design Issues
+-------------
+
+Which font shapes should be made? Historical style terms like Renaissance
+or Baroque letterforms cannot be applied beyond Latin/Cyrillic/Greek
+scripts to any greater extent than Kufi or Nashki can be applied beyond
+Arabic script; "italic" is really only meaningful for Latin letters.
+
+However, most modern writing systems have typographic formulations for
+contrasting uniform and modulated character stroke widths, and have some
+history with "oblique", faces. Since the advent of the typewriter, most
+have developed a typographic style with uniform-width characters.
+
+Accordingly, the FreeFont family has one monospaced - FreeMono - and two
+proportional faces (one with uniform stroke - FreeSans - and one with
+modulated stroke - FreeSerif).
+
+To make text from different writing systems look good side-by-side, each
+FreeFont face is meant to contain characters of similar style and weight.
+
+Licensing
+---------
+
+Free UCS scalable fonts is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License as published
+by the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+The fonts are distributed in the hope that they will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+As a special exception, if you create a document which uses this font, and
+embed this font or unaltered portions of this font into the document, this
+font does not by itself cause the resulting document to be covered by the
+GNU General Public License. This exception does not however invalidate any
+other reasons why the document might be covered by the GNU General Public
+License. If you modify this font, you may extend this exception to your
+version of the font, but you are not obligated to do so. If you do not
+wish to do so, delete this exception statement from your version.
+
+
+Files and their suffixes
+------------------------
+
+The files with .sfd (Spline Font Database) are in FontForge's native format.
+Please use these if you plan to modify the font files.
+
+TrueType fonts for immediate consumption are the files with the .ttf
+(TrueType Font) suffix. These are ready to use in Xwindows based
+systems using FreeType, on Mac OS, and on older Windows systems.
+
+OpenType fonts (with suffix .otf) are for use in Windows Vista.
+Note that although they can be installed on Linux, but many applications
+in Linux still don't support them.
+
+
+--------------------------------------------------------------------------
+Primoz Peterlin,
+Steve White
+
+Free UCS scalable fonts: http://savannah.gnu.org/projects/freefont/
+$Id: README,v 1.6 2008/12/25 12:51:41 Stevan_White Exp $
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Garuda-Bold.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Garuda-Bold.ttf
new file mode 100644
index 0000000..c2aa87e
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Garuda-Bold.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Garuda-BoldOblique.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Garuda-BoldOblique.ttf
new file mode 100644
index 0000000..889be70
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Garuda-BoldOblique.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Garuda-Oblique.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Garuda-Oblique.ttf
new file mode 100644
index 0000000..7d12199
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Garuda-Oblique.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Garuda.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Garuda.ttf
new file mode 100644
index 0000000..b9fcdfd
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Garuda.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Jomolhari-OFL.txt b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Jomolhari-OFL.txt
new file mode 100644
index 0000000..b723c35
--- /dev/null
+++ b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Jomolhari-OFL.txt
@@ -0,0 +1,98 @@
+This Font Software is Copyright (c) 2006, Christopher J Fynn
+All Rights Reserved.
+
+"Jomolhari" is a Reserved Font Name for this Font Software.
+
+This Font Software is licensed under the SIL Open Font License, Version 1.0.
+No modification of the license is permitted, only verbatim copy is allowed.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.0 - 22 November 2005
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of cooperative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide an open
+framework in which fonts may be shared and improved in partnership with
+others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and sold with any software provided that the font
+names of derivative works are changed. The fonts and derivatives,
+however, cannot be released under any other type of license.
+
+DEFINITIONS
+"Font Software" refers to any and all of the following:
+ - font files
+ - data files
+ - source code
+ - build scripts
+ - documentation
+
+"Reserved Font Name" refers to the Font Software name as seen by
+users and any other names as specified after the copyright statement.
+
+"Standard Version" refers to the collection of Font Software
+components as distributed by the Copyright Holder.
+
+"Modified Version" refers to any derivative font software made by
+adding to, deleting, or substituting -- in part or in whole --
+any of the components of the Standard Version, by changing formats
+or by porting the Font Software to a new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Standard or Modified Versions, may be sold by itself.
+
+2) Standard or Modified Versions of the Font Software may be bundled,
+redistributed and sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s), in part or in whole, unless explicit written permission is
+granted by the Copyright Holder. This restriction applies to all
+references stored in the Font Software, such as the font menu name and
+other font description fields, which are used to differentiate the
+font from others.
+
+4) The name(s) of the Copyright Holder or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed using this license, and may not be distributed
+under any other license.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Jomolhari.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Jomolhari.ttf
new file mode 100644
index 0000000..ca695b6
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Jomolhari.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/KhmerOFL.txt b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/KhmerOFL.txt
new file mode 100644
index 0000000..bfa6ae4
--- /dev/null
+++ b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/KhmerOFL.txt
@@ -0,0 +1,93 @@
+Copyright (c) 2010, Danh Hong (khmertype.blogspot.com),
+with Reserved Font Name Khmer.
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/KhmerOS.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/KhmerOS.ttf
new file mode 100644
index 0000000..7aa5bdc
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/KhmerOS.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Lateef font OFL.txt b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Lateef font OFL.txt
new file mode 100644
index 0000000..7a1b1c7
--- /dev/null
+++ b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Lateef font OFL.txt
@@ -0,0 +1,93 @@
+Copyright (c) 2004-2011, SIL International (http://www.sil.org/),
+with Reserved Font Names "Scheherazade" and "SIL".
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/LateefRegOT.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/LateefRegOT.ttf
new file mode 100644
index 0000000..f89d32b
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/LateefRegOT.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Lohit-Kannada.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Lohit-Kannada.ttf
new file mode 100644
index 0000000..2911ce7
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Lohit-Kannada.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/LohitKannadaOFL.txt b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/LohitKannadaOFL.txt
new file mode 100644
index 0000000..01b8307
--- /dev/null
+++ b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/LohitKannadaOFL.txt
@@ -0,0 +1,94 @@
+Copyright 2011-12 Lohit Fonts Project contributors
+
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Padauk-book.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Padauk-book.ttf
new file mode 100644
index 0000000..590cdad
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Padauk-book.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Pothana2000.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Pothana2000.ttf
new file mode 100644
index 0000000..296d7d6
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Pothana2000.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Quivira.otf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Quivira.otf
new file mode 100644
index 0000000..531edf1
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Quivira.otf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Sun-ExtA.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Sun-ExtA.ttf
new file mode 100644
index 0000000..1c9c2cf
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Sun-ExtA.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Sun-ExtB.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Sun-ExtB.ttf
new file mode 100644
index 0000000..8a53b20
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Sun-ExtB.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/SundaneseUnicode-1.0.5.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/SundaneseUnicode-1.0.5.ttf
new file mode 100644
index 0000000..a86b475
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/SundaneseUnicode-1.0.5.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/SyrCOMEdessa.otf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/SyrCOMEdessa.otf
new file mode 100644
index 0000000..9e1fbda
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/SyrCOMEdessa.otf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/SyrCOMEdessa_license.txt b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/SyrCOMEdessa_license.txt
new file mode 100644
index 0000000..35c74dd
--- /dev/null
+++ b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/SyrCOMEdessa_license.txt
@@ -0,0 +1,61 @@
+This license is derived from the Bigelow & Holmes Font License
+found at http://www.xfree86.org/current/LICENSE2.html
+
+The following reasonable modifications have been made to the
+Bigelow & Holmes Font License:
+
+* All references to Luxi have been replaced with Meltho
+
+* All references to Bigelow & Holmes Inc. and URW++ GmbH haven
+ been replaced with Beth Mardutho: The Syriac Institute
+
+* The registered trademark notice belonging to Bigelow & Holmes
+ Inc. has been removed
+
+* Contact information has been modified to show that the
+ contact person for these fonts is the Director of the
+ Institute, George Kiraz.
+
+-------------------------------------------------------------
+
+Meltho fonts and font code copyright © 2002 by Beth Mardutho:
+The Syriac Institute. All Right Reserved.
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of these Fonts and associated documentation
+files (the "Font Software"), to deal in the Font Software,
+including without limitation the rights to use, copy, merge,
+publish, distribute, sublicense, and/or sell copies of the
+Font Software, and to permit persons to whom the Font Software
+is furnished to do so, subject to the following conditions:
+
+The above copyright and trademark notices and this permission
+notice shall be included in all copies of one or more of the
+Font Software.
+
+The Font Software may not be modified, altered, or added to,
+and in particular the designs of glyphs or characters in the
+Fonts may not be modified nor may additional glyphs or
+characters be added to the Fonts. This License becomes null
+and void when the Fonts or Font Software have been modified.
+
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER
+RIGHT. IN NO EVENT SHALL BETH MARDUTHO: THE SYRIAC INSTITUTE BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY
+GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR
+FROM OTHER DEALINGS IN THE FONT SOFTWARE.
+
+Except as contained in this notice, the name of Beth Mardutho:
+The Syriac Institute shall not be used in advertising or otherwise
+to promote the sale, use or other dealings in this Font Software
+without prior written authorization from Beth Mardutho: The
+Syriac Institute.
+
+For further information, contact:
+George Kiraz, Director of Beth Mardutho
+gkiraz@bethmardutho.org
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/TaameyDavidCLM-LICENSE.txt b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/TaameyDavidCLM-LICENSE.txt
new file mode 100644
index 0000000..de1ef63
--- /dev/null
+++ b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/TaameyDavidCLM-LICENSE.txt
@@ -0,0 +1,17 @@
+This package is distributed under the terms of GNU General Public License
+version 2 (see file GNU-GPL).
+---------------------------------------------------------------------
+
+"Taamey David CLM" fonts are copyright (C) 2010 by Yoram Gnat
+(gyoramg@users.sourceforge.net). All rights reserved.
+
+As a special exception, if you create a document which uses
+this font, and embed this font or unaltered portions of this
+font into the document, this font does not by itself cause
+the resulting document to be covered by the
+GNU General Public License. This exception does not however
+invalidate any other reasons why the document might be covered
+by the GNU General Public License. If you modify this font,
+you may extend this exception to your version of the font,
+but you are not obligated to do so. If you do not wish to do so,
+delete this exception statement from your version.
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/TaameyDavidCLM-Medium.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/TaameyDavidCLM-Medium.ttf
new file mode 100644
index 0000000..2aed6f8
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/TaameyDavidCLM-Medium.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/TaiHeritagePro.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/TaiHeritagePro.ttf
new file mode 100644
index 0000000..d4ed953
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/TaiHeritagePro.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Tharlon-Regular.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Tharlon-Regular.ttf
new file mode 100644
index 0000000..4717d70
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Tharlon-Regular.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/TharlonOFL.txt b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/TharlonOFL.txt
new file mode 100644
index 0000000..2973d5d
--- /dev/null
+++ b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/TharlonOFL.txt
@@ -0,0 +1,93 @@
+Copyright (c) 2010-2012, Sai Zin Di Di Zone (www.yunghkio.com/unicode|saiddzone@gmail.com), with Reserved Font Name 'Yunghkio'. Copyright (c) 2012, Google, Inc (http://code.google.com/p/googlefontdirectory/), with Reserved Font Name 'Arimo'. Copyright (c) 2012, Sun Tun, Ngwe Tun, Solveware Solution (http://code.google.com/p/tharlon-font|info@parabaik.info), with Reserved Font Name 'TharLon'.
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/UnBatang_0613.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/UnBatang_0613.ttf
new file mode 100644
index 0000000..2e93d5f
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/UnBatang_0613.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Uthman.otf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Uthman.otf
new file mode 100644
index 0000000..bb650a2
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/Uthman.otf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/XB Riyaz.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/XB Riyaz.ttf
new file mode 100644
index 0000000..80e1580
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/XB Riyaz.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/XB RiyazBd.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/XB RiyazBd.ttf
new file mode 100644
index 0000000..e6cf58f
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/XB RiyazBd.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/XB RiyazBdIt.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/XB RiyazBdIt.ttf
new file mode 100644
index 0000000..19fba78
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/XB RiyazBdIt.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/XB RiyazIt.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/XB RiyazIt.ttf
new file mode 100644
index 0000000..cc9cc3a
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/XB RiyazIt.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/XW Zar Font Info.txt b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/XW Zar Font Info.txt
new file mode 100644
index 0000000..d42e454
--- /dev/null
+++ b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/XW Zar Font Info.txt
@@ -0,0 +1,92 @@
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/ZawgyiOne.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/ZawgyiOne.ttf
new file mode 100644
index 0000000..5731471
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/ZawgyiOne.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/ayar.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/ayar.ttf
new file mode 100644
index 0000000..e74c612
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/ayar.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/damase_v.2.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/damase_v.2.ttf
new file mode 100644
index 0000000..a60240b
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/damase_v.2.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/kaputaunicode.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/kaputaunicode.ttf
new file mode 100644
index 0000000..fe02697
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/kaputaunicode.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/lannaalif-v1-03.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/lannaalif-v1-03.ttf
new file mode 100644
index 0000000..7c20d97
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/lannaalif-v1-03.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/ocrb10.ttf b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/ocrb10.ttf
new file mode 100644
index 0000000..34980b8
Binary files /dev/null and b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/ocrb10.ttf differ
diff --git a/lib/MPDF/vendor/mpdf/mpdf/ttfonts/ocrbinfo.txt b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/ocrbinfo.txt
new file mode 100644
index 0000000..c2dd995
--- /dev/null
+++ b/lib/MPDF/vendor/mpdf/mpdf/ttfonts/ocrbinfo.txt
@@ -0,0 +1,60 @@
+Mostly-free OCR B
+
+This font is used in UPC bar code symbols, including the ISBN symbols on
+most published books.
+
+A freely distributable version seems to be sorely needed. Until now, it's
+been very difficult to find the font in computer-usable format except by
+paying a high fee to a commercial font vendor. Even many serious commercial
+publishers have so much trouble getting it right that they just go ahead and
+use Helvetica instead, or even (shudder) Arial. Since the OCR B font is
+required by an international standard, it seems like it ought to be free.
+So here it is. The font in this package is not a "ripped", pirated, or
+shadily reverse engineered version; every effort has been made to ensure
+that it genuinely derives from free sources and all the creators involved
+have actually intended it for free public use.
+
+Converted by Matthew Skala from Metafont format to Postscript and TrueType
+formats, July 28, 2006, using mftrace 1.2.4 by Paul Vojta, which is
+available from
+ http://www.xs4all.nl/~hanwen/mftrace/
+and Autotrace 0.31.1 available from
+ http://autotrace.sourceforge.net/
+
+The Metafont files (not included - see notes below) were coded by Norbert
+Schwarz in the 1980s, based on German standards documents. He has attached
+a notice, notably not actually claiming any copyright - see the file
+"ocrbinfo" - saying that the fonts are "given to free non commercial use",
+but commenting that he is only free to grant rights to his own work on the
+digitization, because he did not design the original letter forms. He
+suggests that there may be other copyright claims attached to the letter
+forms themselves, which Schwarz credits as being originally designed by
+"Adam Frutiger" [sic], almost certainly a mistake for Adrian Frutiger. My
+(Matthew Skala's) understanding of copyright law, at least in the USA and
+Canada, is that in fact typefaces per se cannot be subject to copyright
+claims, so the software embodiment is the only thing subject to copyright
+and Schwarz's release makes it available for whatever "non commercial use"
+means.
+
+To avoid muddying the waters further, any copyright claims by Matthew Skala
+on these files are hereby released to the public domain. I'd like for these
+fonts to be freely usable even in marginally commercial applications, such
+as to generate UPC labels for books that will be sold for profit, but it may
+not be within my power to grant that myself because I didn't write the
+Metafont files although I did do considerable, and probably copyrightable,
+work on the translation to Postscript and TrueType. It was *not* a purely
+automated process; try using the tools I used and see how far you get
+without human editing! I'd also like for these fonts (the fonts themselves
+as opposed to documents made with them) not to be sold, not even indirectly
+by those Web sites that advertise "free downloads" but make it difficult to
+actually download fonts without paying a fee.
+
+NOTE: This ZIP archive is a stripped-down version containing just the
+essential files for using the main OCR B font on most systems. If you want
+the much larger complete package, which contains Metafont sources and several
+variant fonts (reverse-video, outline, and slanted), look for a ZIP archive
+called ocrb-complete.zip wherever you found this one.
+
+Matthew Skala
+mskala@ansuz.sooke.bc.ca
+http://ansuz.sooke.bc.ca/
diff --git a/lib/MPDF/vendor/myclabs/deep-copy/.github/FUNDING.yml b/lib/MPDF/vendor/myclabs/deep-copy/.github/FUNDING.yml
new file mode 100644
index 0000000..b8da664
--- /dev/null
+++ b/lib/MPDF/vendor/myclabs/deep-copy/.github/FUNDING.yml
@@ -0,0 +1,12 @@
+# These are supported funding model platforms
+
+github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
+patreon: # Replace with a single Patreon username
+open_collective: # Replace with a single Open Collective username
+ko_fi: # Replace with a single Ko-fi username
+tidelift: "packagist/myclabs/deep-copy"
+community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
+liberapay: # Replace with a single Liberapay username
+issuehunt: # Replace with a single IssueHunt username
+otechie: # Replace with a single Otechie username
+custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
diff --git a/lib/MPDF/vendor/myclabs/deep-copy/README.md b/lib/MPDF/vendor/myclabs/deep-copy/README.md
index 7abe5dc..007ad5b 100644
--- a/lib/MPDF/vendor/myclabs/deep-copy/README.md
+++ b/lib/MPDF/vendor/myclabs/deep-copy/README.md
@@ -7,11 +7,6 @@ DeepCopy helps you create deep copies (clones) of your objects. It is designed t
[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/myclabs/DeepCopy/badges/quality-score.png?s=2747100c19b275f93a777e3297c6c12d1b68b934)](https://scrutinizer-ci.com/g/myclabs/DeepCopy/)
[![Total Downloads](https://poser.pugx.org/myclabs/deep-copy/downloads.svg)](https://packagist.org/packages/myclabs/deep-copy)
-
-**You are browsing the 1.x version, this version is in maintenance mode only. Please check the new
-[2.x](https://github.com/myclabs/DeepCopy/tree/2.x) version.**
-
-
## Table of Contents
1. [How](#how)
@@ -374,3 +369,7 @@ Running the tests is simple:
```php
vendor/bin/phpunit
```
+
+### Support
+
+Get professional support via [the Tidelift Subscription](https://tidelift.com/subscription/pkg/packagist-myclabs-deep-copy?utm_source=packagist-myclabs-deep-copy&utm_medium=referral&utm_campaign=readme).
diff --git a/lib/MPDF/vendor/myclabs/deep-copy/composer.json b/lib/MPDF/vendor/myclabs/deep-copy/composer.json
index 4108a23..45656c9 100644
--- a/lib/MPDF/vendor/myclabs/deep-copy/composer.json
+++ b/lib/MPDF/vendor/myclabs/deep-copy/composer.json
@@ -21,7 +21,7 @@
},
"require": {
- "php": "^7.1"
+ "php": "^7.1 || ^8.0"
},
"require-dev": {
"doctrine/collections": "^1.0",
diff --git a/lib/MPDF/vendor/myclabs/deep-copy/doc/clone.png b/lib/MPDF/vendor/myclabs/deep-copy/doc/clone.png
deleted file mode 100644
index 376afd4..0000000
Binary files a/lib/MPDF/vendor/myclabs/deep-copy/doc/clone.png and /dev/null differ
diff --git a/lib/MPDF/vendor/myclabs/deep-copy/doc/deep-clone.png b/lib/MPDF/vendor/myclabs/deep-copy/doc/deep-clone.png
deleted file mode 100644
index 2b37a6d..0000000
Binary files a/lib/MPDF/vendor/myclabs/deep-copy/doc/deep-clone.png and /dev/null differ
diff --git a/lib/MPDF/vendor/myclabs/deep-copy/doc/deep-copy.png b/lib/MPDF/vendor/myclabs/deep-copy/doc/deep-copy.png
deleted file mode 100644
index 68c508a..0000000
Binary files a/lib/MPDF/vendor/myclabs/deep-copy/doc/deep-copy.png and /dev/null differ
diff --git a/lib/MPDF/vendor/myclabs/deep-copy/doc/graph.png b/lib/MPDF/vendor/myclabs/deep-copy/doc/graph.png
deleted file mode 100644
index 4d5c942..0000000
Binary files a/lib/MPDF/vendor/myclabs/deep-copy/doc/graph.png and /dev/null differ
diff --git a/lib/MPDF/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php b/lib/MPDF/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php
index 2e53cf3..15e5c68 100644
--- a/lib/MPDF/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php
+++ b/lib/MPDF/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php
@@ -2,19 +2,21 @@
namespace DeepCopy;
+use ArrayObject;
use DateInterval;
use DateTimeInterface;
use DateTimeZone;
use DeepCopy\Exception\CloneException;
use DeepCopy\Filter\Filter;
use DeepCopy\Matcher\Matcher;
+use DeepCopy\Reflection\ReflectionHelper;
use DeepCopy\TypeFilter\Date\DateIntervalFilter;
+use DeepCopy\TypeFilter\Spl\ArrayObjectFilter;
use DeepCopy\TypeFilter\Spl\SplDoublyLinkedListFilter;
use DeepCopy\TypeFilter\TypeFilter;
use DeepCopy\TypeMatcher\TypeMatcher;
use ReflectionObject;
use ReflectionProperty;
-use DeepCopy\Reflection\ReflectionHelper;
use SplDoublyLinkedList;
/**
@@ -59,6 +61,7 @@ class DeepCopy
{
$this->useCloneMethod = $useCloneMethod;
+ $this->addTypeFilter(new ArrayObjectFilter($this), new TypeMatcher(ArrayObject::class));
$this->addTypeFilter(new DateIntervalFilter(), new TypeMatcher(DateInterval::class));
$this->addTypeFilter(new SplDoublyLinkedListFilter($this), new TypeMatcher(SplDoublyLinkedList::class));
}
@@ -237,6 +240,12 @@ class DeepCopy
}
$property->setAccessible(true);
+
+ // Ignore uninitialized properties (for PHP >7.4)
+ if (method_exists($property, 'isInitialized') && !$property->isInitialized($object)) {
+ return;
+ }
+
$propertyValue = $property->getValue($object);
// Copy the property
diff --git a/lib/MPDF/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/ArrayObjectFilter.php b/lib/MPDF/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/ArrayObjectFilter.php
new file mode 100644
index 0000000..1784601
--- /dev/null
+++ b/lib/MPDF/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/ArrayObjectFilter.php
@@ -0,0 +1,36 @@
+copier = $copier;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function apply($arrayObject)
+ {
+ $clone = clone $arrayObject;
+ foreach ($arrayObject->getArrayCopy() as $k => $v) {
+ $clone->offsetSet($k, $this->copier->copy($v));
+ }
+
+ return $clone;
+ }
+}
+
diff --git a/lib/MPDF/vendor/psr/log/.gitignore b/lib/MPDF/vendor/psr/log/.gitignore
deleted file mode 100644
index 22d0d82..0000000
--- a/lib/MPDF/vendor/psr/log/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-vendor
diff --git a/lib/MPDF/vendor/psr/log/Psr/Log/LoggerInterface.php b/lib/MPDF/vendor/psr/log/Psr/Log/LoggerInterface.php
index e695046..2206cfd 100644
--- a/lib/MPDF/vendor/psr/log/Psr/Log/LoggerInterface.php
+++ b/lib/MPDF/vendor/psr/log/Psr/Log/LoggerInterface.php
@@ -22,8 +22,8 @@ interface LoggerInterface
/**
* System is unusable.
*
- * @param string $message
- * @param array $context
+ * @param string $message
+ * @param mixed[] $context
*
* @return void
*/
@@ -35,8 +35,8 @@ interface LoggerInterface
* Example: Entire website down, database unavailable, etc. This should
* trigger the SMS alerts and wake you up.
*
- * @param string $message
- * @param array $context
+ * @param string $message
+ * @param mixed[] $context
*
* @return void
*/
@@ -47,8 +47,8 @@ interface LoggerInterface
*
* Example: Application component unavailable, unexpected exception.
*
- * @param string $message
- * @param array $context
+ * @param string $message
+ * @param mixed[] $context
*
* @return void
*/
@@ -58,8 +58,8 @@ interface LoggerInterface
* Runtime errors that do not require immediate action but should typically
* be logged and monitored.
*
- * @param string $message
- * @param array $context
+ * @param string $message
+ * @param mixed[] $context
*
* @return void
*/
@@ -71,8 +71,8 @@ interface LoggerInterface
* Example: Use of deprecated APIs, poor use of an API, undesirable things
* that are not necessarily wrong.
*
- * @param string $message
- * @param array $context
+ * @param string $message
+ * @param mixed[] $context
*
* @return void
*/
@@ -81,8 +81,8 @@ interface LoggerInterface
/**
* Normal but significant events.
*
- * @param string $message
- * @param array $context
+ * @param string $message
+ * @param mixed[] $context
*
* @return void
*/
@@ -93,8 +93,8 @@ interface LoggerInterface
*
* Example: User logs in, SQL logs.
*
- * @param string $message
- * @param array $context
+ * @param string $message
+ * @param mixed[] $context
*
* @return void
*/
@@ -103,8 +103,8 @@ interface LoggerInterface
/**
* Detailed debug information.
*
- * @param string $message
- * @param array $context
+ * @param string $message
+ * @param mixed[] $context
*
* @return void
*/
@@ -113,9 +113,9 @@ interface LoggerInterface
/**
* Logs with an arbitrary level.
*
- * @param mixed $level
- * @param string $message
- * @param array $context
+ * @param mixed $level
+ * @param string $message
+ * @param mixed[] $context
*
* @return void
*
diff --git a/lib/MPDF/vendor/psr/log/Psr/Log/Test/DummyTest.php b/lib/MPDF/vendor/psr/log/Psr/Log/Test/DummyTest.php
new file mode 100644
index 0000000..9638c11
--- /dev/null
+++ b/lib/MPDF/vendor/psr/log/Psr/Log/Test/DummyTest.php
@@ -0,0 +1,18 @@
+assertEquals($expected, $this->getLogs());
}
}
-
-class DummyTest
-{
- public function __toString()
- {
- return 'DummyTest';
- }
-}
diff --git a/lib/MPDF/vendor/setasign/fpdi/LICENSE.txt b/lib/MPDF/vendor/setasign/fpdi/LICENSE.txt
index 7e75850..45672fa 100644
--- a/lib/MPDF/vendor/setasign/fpdi/LICENSE.txt
+++ b/lib/MPDF/vendor/setasign/fpdi/LICENSE.txt
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2017 Setasign - Jan Slabon, https://www.setasign.com
+Copyright (c) 2020 Setasign GmbH & Co. KG, https://www.setasign.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/lib/MPDF/vendor/setasign/fpdi/README.md b/lib/MPDF/vendor/setasign/fpdi/README.md
index 42856df..022f1ee 100644
--- a/lib/MPDF/vendor/setasign/fpdi/README.md
+++ b/lib/MPDF/vendor/setasign/fpdi/README.md
@@ -5,7 +5,6 @@ FPDI - Free PDF Document Importer
[![Total Downloads](https://poser.pugx.org/setasign/fpdi/downloads.svg)](https://packagist.org/packages/setasign/fpdi)
[![Latest Unstable Version](https://poser.pugx.org/setasign/fpdi/v/unstable.svg)](https://packagist.org/packages/setasign/fpdi)
[![License](https://poser.pugx.org/setasign/fpdi/license.svg)](https://packagist.org/packages/setasign/fpdi)
-[![Build Status](https://travis-ci.org/Setasign/FPDI.svg?branch=development)](https://travis-ci.org/Setasign/FPDI)
:heavy_exclamation_mark: This document refers to FPDI 2. Version 1 is deprecated and development is discontinued. :heavy_exclamation_mark:
@@ -18,75 +17,39 @@ FPDI can also be used as an extension for [TCPDF](https://github.com/tecnickcom/
## Installation with [Composer](https://packagist.org/packages/setasign/fpdi)
-Because FPDI can be used with FPDF, TCPDF or tFPDF we didn't added a fixed dependency in the main
-composer.json file but we added metadata packages for
-[FPDF](https://github.com/Setasign/FPDI-FPDF),
-[TCPDF](https://github.com/Setasign/FPDI-TCPDF) and
-[tFPDF](https://github.com/Setasign/FPDI-tFPDF).
-
-### Evaluate Dependencies Automatically
-
-For FPDF add following [package](https://github.com/Setasign/FPDI-FPDF) to your composer.json:
-```json
-{
- "require": {
- "setasign/fpdi-fpdf": "^2.0"
- }
-}
-```
-
-For TCPDF add following [package](https://github.com/Setasign/FPDI-TCPDF) to your composer.json:
-```json
-{
- "require": {
- "setasign/fpdi-tcpdf": "^2.0"
- }
-}
-```
-
-For tFPDF add following [package](https://github.com/Setasign/FPDI-tFPDF) to your composer.json:
-```json
-{
- "require": {
- "setasign/fpdi-tfpdf": "^2.1"
- }
-}
-```
-
-### Manual Dependencies
-
-If you don't want to use the metadata packages, it is up to you to add the dependencies to your
-composer.json file.
+Because FPDI can be used with FPDF, TCPDF or tFPDF we haven't added a fixed dependency in the main
+composer.json file. You need to add the dependency to the PDF generation library of your choice
+yourself.
To use FPDI with FPDF include following in your composer.json file:
```json
{
"require": {
- "setasign/fpdf": "^1.8",
+ "setasign/fpdf": "1.8.*",
"setasign/fpdi": "^2.0"
}
}
```
-If you want to use TCPDF, your have to update your composer.json respectively to:
+If you want to use TCPDF, you have to update your composer.json to:
```json
{
"require": {
- "tecnickcom/tcpdf": "^6.2",
+ "tecnickcom/tcpdf": "6.2.*",
"setasign/fpdi": "^2.0"
}
}
```
-If you want to use tFPDF, your have to update your composer.json respectively to:
+If you want to use tFPDF, you have to update your composer.json to:
```json
{
"require": {
- "tecnickcom/tfpdf": "1.25",
- "setasign/fpdi": "^2.1"
+ "setasign/tfpdf": "1.31.*",
+ "setasign/fpdi": "^2.3"
}
}
```
@@ -165,4 +128,4 @@ $pdf->useTemplate($tplId, 10, 10, 100);
$pdf->Output();
```
-A full end-user documentation and API reference is available [here](https://manuals.setasign.com/fpdi-manual/).
\ No newline at end of file
+A full end-user documentation and API reference is available [here](https://manuals.setasign.com/fpdi-manual/).
diff --git a/lib/MPDF/vendor/setasign/fpdi/SECURITY.md b/lib/MPDF/vendor/setasign/fpdi/SECURITY.md
new file mode 100644
index 0000000..da9c516
--- /dev/null
+++ b/lib/MPDF/vendor/setasign/fpdi/SECURITY.md
@@ -0,0 +1,5 @@
+## Security contact information
+
+To report a security vulnerability, please use the
+[Tidelift security contact](https://tidelift.com/security).
+Tidelift will coordinate the fix and disclosure.
diff --git a/lib/MPDF/vendor/setasign/fpdi/composer.json b/lib/MPDF/vendor/setasign/fpdi/composer.json
index 58f7931..eafee77 100644
--- a/lib/MPDF/vendor/setasign/fpdi/composer.json
+++ b/lib/MPDF/vendor/setasign/fpdi/composer.json
@@ -18,6 +18,9 @@
"php": "^5.6 || ^7.0",
"ext-zlib": "*"
},
+ "conflict": {
+ "setasign/tfpdf": "<1.31"
+ },
"authors": [
{
"name": "Jan Slabon",
@@ -31,16 +34,14 @@
}
],
"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.",
- "setasign/fpdi-fpdf": "Use this package to automatically evaluate dependencies to FPDF.",
- "setasign/fpdi-tcpdf": "Use this package to automatically evaluate dependencies to TCPDF.",
- "setasign/fpdi-tfpdf": "Use this package to automatically evaluate dependencies to tFPDF."
+ "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."
},
"require-dev": {
"phpunit/phpunit": "~5.7",
"setasign/fpdf": "~1.8",
"tecnickcom/tcpdf": "~6.2",
- "setasign/tfpdf": "1.25"
+ "setasign/tfpdf": "1.31",
+ "squizlabs/php_codesniffer": "^3.5"
},
"autoload-dev": {
"psr-4": {
diff --git a/lib/MPDF/vendor/setasign/fpdi/phpcs.xml b/lib/MPDF/vendor/setasign/fpdi/phpcs.xml
new file mode 100644
index 0000000..2beccd5
--- /dev/null
+++ b/lib/MPDF/vendor/setasign/fpdi/phpcs.xml
@@ -0,0 +1,17 @@
+
+
+ src
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lib/MPDF/vendor/setasign/fpdi/phpstan.neon b/lib/MPDF/vendor/setasign/fpdi/phpstan.neon
new file mode 100644
index 0000000..89b65cd
--- /dev/null
+++ b/lib/MPDF/vendor/setasign/fpdi/phpstan.neon
@@ -0,0 +1,19 @@
+parameters:
+ level: 5
+ paths:
+ - src
+ #- tests
+
+ ignoreErrors:
+ -
+ message: "#^Return typehint of method setasign\\\\Fpdi\\\\Fpdi\\:\\:getPdfParserInstance\\(\\) has invalid type setasign\\\\FpdiPdfParser\\\\PdfParser\\\\PdfParser\\.$#"
+ count: 1
+ path: src/Fpdi.php
+ -
+ message: "#^Return typehint of method setasign\\\\Fpdi\\\\Tcpdf\\\\Fpdi\\:\\:getPdfParserInstance\\(\\) has invalid type setasign\\\\FpdiPdfParser\\\\PdfParser\\\\PdfParser\\.$#"
+ count: 1
+ path: src/Tcpdf/Fpdi.php
+ -
+ message: "#^Return typehint of method setasign\\\\Fpdi\\\\Tfpdf\\\\Fpdi\\:\\:getPdfParserInstance\\(\\) has invalid type setasign\\\\FpdiPdfParser\\\\PdfParser\\\\PdfParser\\.$#"
+ count: 1
+ path: src/Tfpdf/Fpdi.php
\ No newline at end of file
diff --git a/lib/MPDF/vendor/setasign/fpdi/src/FpdfTpl.php b/lib/MPDF/vendor/setasign/fpdi/src/FpdfTpl.php
index fba7c6a..4b93f53 100644
--- a/lib/MPDF/vendor/setasign/fpdi/src/FpdfTpl.php
+++ b/lib/MPDF/vendor/setasign/fpdi/src/FpdfTpl.php
@@ -1,9 +1,10 @@
_getpagesize($size);
- if ($orientation != $this->CurOrientation
+ if (
+ $orientation != $this->CurOrientation
|| $size[0] != $this->CurPageSize[0]
|| $size[1] != $this->CurPageSize[1]
) {
@@ -109,7 +109,7 @@ trait FpdfTplTrait
unset($x['tpl']);
\extract($x, EXTR_IF_EXISTS);
/** @noinspection NotOptimalIfConditionsInspection */
- /** @noinspection CallableParameterUseCaseInTypeContextInspection */
+ /** @noinspection PhpConditionAlreadyCheckedInspection */
if (\is_array($x)) {
$x = 0;
}
@@ -266,7 +266,7 @@ trait FpdfTplTrait
*/
public function endTemplate()
{
- if (null === $this->currentTemplateId) {
+ if ($this->currentTemplateId === null) {
return false;
}
@@ -418,7 +418,11 @@ trait FpdfTplTrait
$this->templates[$key]['objectNumber'] = $this->n;
$this->_put('<_put(\sprintf('/BBox[0 0 %.2F %.2F]', $template['width'] * $this->k, $template['height'] * $this->k));
+ $this->_put(\sprintf(
+ '/BBox[0 0 %.2F %.2F]',
+ $template['width'] * $this->k,
+ $template['height'] * $this->k
+ ));
$this->_put('/Resources 2 0 R'); // default resources dictionary of FPDF
if ($this->compress) {
@@ -463,4 +467,4 @@ trait FpdfTplTrait
parent::_out($s);
}
}
-}
\ No newline at end of file
+}
diff --git a/lib/MPDF/vendor/setasign/fpdi/src/Fpdi.php b/lib/MPDF/vendor/setasign/fpdi/src/Fpdi.php
index b49c103..0ebce46 100644
--- a/lib/MPDF/vendor/setasign/fpdi/src/Fpdi.php
+++ b/lib/MPDF/vendor/setasign/fpdi/src/Fpdi.php
@@ -1,9 +1,10 @@
objectsToCopy[$readerId])) !== null) {
try {
$object = $parser->getIndirectObject($objectNumber);
-
} catch (CrossReferenceException $e) {
if ($e->getCode() === CrossReferenceException::OBJECT_NOT_FOUND) {
$object = PdfIndirectObject::create($objectNumber, 0, new PdfNull());
diff --git a/lib/MPDF/vendor/setasign/fpdi/src/FpdiException.php b/lib/MPDF/vendor/setasign/fpdi/src/FpdiException.php
index d126c14..2286667 100644
--- a/lib/MPDF/vendor/setasign/fpdi/src/FpdiException.php
+++ b/lib/MPDF/vendor/setasign/fpdi/src/FpdiException.php
@@ -1,9 +1,10 @@
readers[$id]);
}
- $this->createdReaders= [];
+ $this->createdReaders = [];
}
/**
@@ -299,7 +298,7 @@ trait FpdiTrait
if ($rotation !== 0) {
$rotation *= -1;
- $angle = $rotation * M_PI/180;
+ $angle = $rotation * M_PI / 180;
$a = \cos($angle);
$b = \sin($angle);
$c = -$b;
@@ -336,7 +335,8 @@ trait FpdiTrait
$contents = PdfType::resolve($contentsObject, $reader->getParser());
// just copy the stream reference if it is only a single stream
- if (($contentsIsStream = ($contents instanceof PdfStream))
+ if (
+ ($contentsIsStream = ($contents instanceof PdfStream))
|| ($contents instanceof PdfArray && \count($contents->value) === 1)
) {
if ($contentsIsStream) {
@@ -494,26 +494,20 @@ trait FpdiTrait
} else {
$this->_put(\rtrim(\rtrim(\sprintf('%.5F', $value->value), '0'), '.') . ' ', false);
}
-
} elseif ($value instanceof PdfName) {
$this->_put('/' . $value->value . ' ', false);
-
} elseif ($value instanceof PdfString) {
$this->_put('(' . $value->value . ')', false);
-
} elseif ($value instanceof PdfHexString) {
$this->_put('<' . $value->value . '>');
-
} elseif ($value instanceof PdfBoolean) {
$this->_put($value->value ? 'true ' : 'false ', false);
-
} elseif ($value instanceof PdfArray) {
$this->_put('[', false);
foreach ($value->value as $entry) {
$this->writePdfType($entry);
}
$this->_put(']');
-
} elseif ($value instanceof PdfDictionary) {
$this->_put('<<', false);
foreach ($value->value as $name => $entry) {
@@ -521,13 +515,10 @@ trait FpdiTrait
$this->writePdfType($entry);
}
$this->_put('>>');
-
} elseif ($value instanceof PdfToken) {
$this->_put($value->value);
-
} elseif ($value instanceof PdfNull) {
$this->_put('null ');
-
} elseif ($value instanceof PdfStream) {
/**
* @var $value PdfStream
@@ -536,7 +527,6 @@ trait FpdiTrait
$this->_put('stream');
$this->_put($value->getStream());
$this->_put('endstream');
-
} elseif ($value instanceof PdfIndirectObjectReference) {
if (!isset($this->objectMap[$this->currentReaderId])) {
$this->objectMap[$this->currentReaderId] = [];
@@ -548,10 +538,9 @@ trait FpdiTrait
}
$this->_put($this->objectMap[$this->currentReaderId][$value->value] . ' 0 R ', false);
-
} elseif ($value instanceof PdfIndirectObject) {
/**
- * @var $value PdfIndirectObject
+ * @var PdfIndirectObject $value
*/
$n = $this->objectMap[$this->currentReaderId][$value->objectNumber];
$this->_newobj($n);
diff --git a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/CrossReference/AbstractReader.php b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/CrossReference/AbstractReader.php
index 1d5c579..b54237b 100644
--- a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/CrossReference/AbstractReader.php
+++ b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/CrossReference/AbstractReader.php
@@ -1,9 +1,10 @@
value);
+ try {
+ $stream = PdfStream::ensure($initValue->value);
+ } catch (PdfTypeException $e) {
+ throw new CrossReferenceException(
+ 'Invalid object type at xref reference offset.',
+ CrossReferenceException::INVALID_DATA,
+ $e
+ );
+ }
$type = PdfDictionary::get($stream->value, 'Type');
if ($type->value !== 'XRef') {
diff --git a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/CrossReference/CrossReferenceException.php b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/CrossReference/CrossReferenceException.php
index 3fa9b33..7d88d5d 100644
--- a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/CrossReference/CrossReferenceException.php
+++ b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/CrossReference/CrossReferenceException.php
@@ -1,9 +1,10 @@
subSections as $offset => list($startObject, $objectCount)) {
+ /**
+ * @var int $startObject
+ * @var int $objectCount
+ */
if ($objectNumber >= $startObject && $objectNumber < ($startObject + $objectCount)) {
$position = $offset + 20 * ($objectNumber - $startObject);
$this->reader->ensure($position, 20);
diff --git a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/CrossReference/LineReader.php b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/CrossReference/LineReader.php
index 31a96be..b6f0e42 100644
--- a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/CrossReference/LineReader.php
+++ b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/CrossReference/LineReader.php
@@ -1,9 +1,10 @@
20 bytes).
- *
- * @package setasign\Fpdi\PdfParser\CrossReference
*/
class LineReader extends AbstractReader implements ReaderInterface
{
@@ -72,18 +71,16 @@ class LineReader extends AbstractReader implements ReaderInterface
*/
protected function extract(StreamReader $reader)
{
- $cycles = -1;
$bytesPerCycle = 100;
-
$reader->reset(null, $bytesPerCycle);
- while (
- ($trailerPos = \strpos($reader->getBuffer(false), 'trailer', \max($bytesPerCycle * $cycles++, 0))) === false
- ) {
- if ($reader->increaseLength($bytesPerCycle) === false) {
- break;
- }
- }
+ $cycles = 0;
+ do {
+ // 6 = length of "trailer" - 1
+ $pos = \max(($bytesPerCycle * $cycles) - 6, 0);
+ $trailerPos = \strpos($reader->getBuffer(false), 'trailer', $pos);
+ $cycles++;
+ } while ($trailerPos === false && $reader->increaseLength($bytesPerCycle) !== false);
if ($trailerPos === false) {
throw new CrossReferenceException(
@@ -127,44 +124,41 @@ class LineReader extends AbstractReader implements ReaderInterface
}
unset($differentLineEndings, $m);
- $linesCount = \count($lines);
- $start = null;
- $entryCount = 0;
+ if (!\is_array($lines)) {
+ $this->offsets = [];
+ return;
+ }
+ $start = 0;
$offsets = [];
- /** @noinspection ForeachInvariantsInspection */
- for ($i = 0; $i < $linesCount; $i++) {
- $line = \trim($lines[$i]);
- if ($line) {
- $pieces = \explode(' ', $line);
+ // trim all lines and remove empty lines
+ $lines = \array_filter(\array_map('\trim', $lines));
+ foreach ($lines as $line) {
+ $pieces = \explode(' ', $line);
- $c = \count($pieces);
- switch ($c) {
- case 2:
- $start = (int) $pieces[0];
- $entryCount += (int) $pieces[1];
- break;
+ switch (\count($pieces)) {
+ case 2:
+ $start = (int) $pieces[0];
+ break;
- /** @noinspection PhpMissingBreakStatementInspection */
- case 3:
- switch ($pieces[2]) {
- case 'n':
- $offsets[$start] = [(int) $pieces[0], (int) $pieces[1]];
- $start++;
- break 2;
- case 'f':
- $start++;
- break 2;
- }
- // fall through if pieces doesn't match
+ case 3:
+ switch ($pieces[2]) {
+ case 'n':
+ $offsets[$start] = [(int) $pieces[0], (int) $pieces[1]];
+ $start++;
+ break 2;
+ case 'f':
+ $start++;
+ break 2;
+ }
+ // fall through if pieces doesn't match
- default:
- throw new CrossReferenceException(
- \sprintf('Unexpected data in xref table (%s)', \implode(' ', $pieces)),
- CrossReferenceException::INVALID_DATA
- );
- }
+ default:
+ throw new CrossReferenceException(
+ \sprintf('Unexpected data in xref table (%s)', \implode(' ', $pieces)),
+ CrossReferenceException::INVALID_DATA
+ );
}
}
diff --git a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/CrossReference/ReaderInterface.php b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/CrossReference/ReaderInterface.php
index 84b2267..d2dfdd0 100644
--- a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/CrossReference/ReaderInterface.php
+++ b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/CrossReference/ReaderInterface.php
@@ -1,9 +1,10 @@
117 /* u */) {
throw new Ascii85Exception(
'Illegal character found while ASCII85 decode.',
@@ -86,12 +86,10 @@ class Ascii85 implements FilterInterface
if ($state === 2) {
$r = $chn[0] * 85 * 85 * 85 * 85 + ($chn[1] + 1) * 85 * 85 * 85;
$out .= \chr($r >> 24);
-
} elseif ($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);
-
} elseif ($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);
diff --git a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Filter/Ascii85Exception.php b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Filter/Ascii85Exception.php
index 898276c..f4b6758 100644
--- a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Filter/Ascii85Exception.php
+++ b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Filter/Ascii85Exception.php
@@ -1,9 +1,10 @@
extensionLoaded()) {
$oData = $data;
- $data = @((\strlen($data) > 0) ? \gzuncompress($data) : '');
+ $data = (($data !== '') ? @\gzuncompress($data) : '');
if ($data === false) {
+ // let's try if the checksum is CRC32
+ $fh = fopen('php://temp', 'w+b');
+ fwrite($fh, "\x1f\x8b\x08\x00\x00\x00\x00\x00" . $oData);
+ stream_filter_append($fh, 'zlib.inflate', STREAM_FILTER_READ, ['window' => 30]);
+ fseek($fh, 0);
+ $data = @stream_get_contents($fh);
+ fclose($fh);
+
+ if ($data) {
+ return $data;
+ }
+
// Try this fallback
- $tries = 1;
- while ($tries < 10 && ($data === false || \strlen($data) < (\strlen($oData) - $tries - 1))) {
- $data = @(\gzinflate(\substr($oData, $tries)));
+ $tries = 0;
+
+ $oDataLen = strlen($oData);
+ while ($tries < 6 && ($data === false || (strlen($data) < ($oDataLen - $tries - 1)))) {
+ $data = @(gzinflate(substr($oData, $tries)));
$tries++;
}
- if ($data === false) {
- // let's try if the checksum is CRC32
- $fh = fopen('php://temp', 'w+b');
- \fwrite($fh, "\x1f\x8b\x08\x00\x00\x00\x00\x00" . $oData);
- \stream_filter_append($fh, 'zlib.inflate', \STREAM_FILTER_READ, ['window' => 30]);
- \fseek($fh, 0);
- $data = \stream_get_contents($fh);
- \fclose($fh);
+ // let's use this fallback only if the $data is longer than the original data
+ if (strlen($data) > ($oDataLen - $tries - 1)) {
+ return $data;
}
if (!$data) {
diff --git a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Filter/FlateException.php b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Filter/FlateException.php
index d44281d..d897ac8 100644
--- a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Filter/FlateException.php
+++ b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Filter/FlateException.php
@@ -1,9 +1,10 @@
sTable[$code];
$oldCode = $code;
-
} else {
if ($code < $this->tIdx) {
$string = $this->sTable[$code];
diff --git a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Filter/LzwException.php b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Filter/LzwException.php
index e822bc9..6ebad4f 100644
--- a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Filter/LzwException.php
+++ b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Filter/LzwException.php
@@ -1,9 +1,10 @@
streamReader->reset(0);
- $offset = false;
$maxIterations = 1000;
while (true) {
$buffer = $this->streamReader->getBuffer(false);
@@ -181,7 +180,10 @@ class PdfParser
$catalog = $this->getCatalog();
if (isset($catalog->value['Version'])) {
- $versionParts = \explode('.', PdfName::unescape(PdfType::resolve($catalog->value['Version'], $this)->value));
+ $versionParts = \explode(
+ '.',
+ PdfName::unescape(PdfType::resolve($catalog->value['Version'], $this)->value)
+ );
if (count($versionParts) === 2) {
list($major, $minor) = $versionParts;
}
@@ -200,8 +202,7 @@ class PdfParser
*/
public function getCatalog()
{
- $xref = $this->getCrossReference();
- $trailer = $xref->getTrailer();
+ $trailer = $this->getCrossReference()->getTrailer();
$catalog = PdfType::resolve(PdfDictionary::get($trailer, 'Root'), $this);
@@ -224,8 +225,7 @@ class PdfParser
return $this->objects[$objectNumber];
}
- $xref = $this->getCrossReference();
- $object = $xref->getIndirectObject($objectNumber);
+ $object = $this->getCrossReference()->getIndirectObject($objectNumber);
if ($cache) {
$this->objects[$objectNumber] = $object;
@@ -239,7 +239,7 @@ class PdfParser
*
* @param null|bool|string $token
* @param null|string $expectedType
- * @return bool|PdfArray|PdfBoolean|PdfHexString|PdfName|PdfNull|PdfNumeric|PdfString|PdfToken|PdfIndirectObjectReference
+ * @return false|PdfArray|PdfBoolean|PdfDictionary|PdfHexString|PdfIndirectObject|PdfIndirectObjectReference|PdfName|PdfNull|PdfNumeric|PdfStream|PdfString|PdfToken
* @throws Type\PdfTypeException
*/
public function readValue($token = null, $expectedType = null)
@@ -281,37 +281,38 @@ class PdfParser
default:
if (\is_numeric($token)) {
if (($token2 = $this->tokenizer->getNextToken()) !== false) {
- if (\is_numeric($token2)) {
- if (($token3 = $this->tokenizer->getNextToken()) !== false) {
- switch ($token3) {
- case 'obj':
- if ($expectedType !== null && $expectedType !== PdfIndirectObject::class) {
- throw new Type\PdfTypeException(
- 'Got unexpected token type.', Type\PdfTypeException::INVALID_DATA_TYPE
- );
- }
-
- return PdfIndirectObject::parse(
- $token,
- $token2,
- $this,
- $this->tokenizer,
- $this->streamReader
+ if (\is_numeric($token2) && ($token3 = $this->tokenizer->getNextToken()) !== false) {
+ switch ($token3) {
+ case 'obj':
+ if ($expectedType !== null && $expectedType !== PdfIndirectObject::class) {
+ throw new Type\PdfTypeException(
+ 'Got unexpected token type.',
+ Type\PdfTypeException::INVALID_DATA_TYPE
);
- case 'R':
- if ($expectedType !== null &&
- $expectedType !== PdfIndirectObjectReference::class
- ) {
- throw new Type\PdfTypeException(
- 'Got unexpected token type.', Type\PdfTypeException::INVALID_DATA_TYPE
- );
- }
+ }
- return PdfIndirectObjectReference::create($token, $token2);
- }
+ return PdfIndirectObject::parse(
+ (int) $token,
+ (int) $token2,
+ $this,
+ $this->tokenizer,
+ $this->streamReader
+ );
+ case 'R':
+ if (
+ $expectedType !== null &&
+ $expectedType !== PdfIndirectObjectReference::class
+ ) {
+ throw new Type\PdfTypeException(
+ 'Got unexpected token type.',
+ Type\PdfTypeException::INVALID_DATA_TYPE
+ );
+ }
- $this->tokenizer->pushStack($token3);
+ return PdfIndirectObjectReference::create((int) $token, (int) $token2);
}
+
+ $this->tokenizer->pushStack($token3);
}
$this->tokenizer->pushStack($token2);
@@ -319,10 +320,11 @@ class PdfParser
if ($expectedType !== null && $expectedType !== PdfNumeric::class) {
throw new Type\PdfTypeException(
- 'Got unexpected token type.', Type\PdfTypeException::INVALID_DATA_TYPE
+ 'Got unexpected token type.',
+ Type\PdfTypeException::INVALID_DATA_TYPE
);
}
- return PdfNumeric::create($token);
+ return PdfNumeric::create($token + 0);
}
if ($token === 'true' || $token === 'false') {
@@ -337,7 +339,8 @@ class PdfParser
if ($expectedType !== null && $expectedType !== PdfToken::class) {
throw new Type\PdfTypeException(
- 'Got unexpected token type.', Type\PdfTypeException::INVALID_DATA_TYPE
+ 'Got unexpected token type.',
+ Type\PdfTypeException::INVALID_DATA_TYPE
);
}
diff --git a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/PdfParserException.php b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/PdfParserException.php
index 476bccd..6d034d8 100644
--- a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/PdfParserException.php
+++ b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/PdfParserException.php
@@ -1,9 +1,10 @@
offset);
- if ($position >= $this->bufferLength &&
- (!$this->increaseLength() || $position >= $this->bufferLength)
+ if (
+ $position >= $this->bufferLength
+ && (!$this->increaseLength() || $position >= $this->bufferLength)
) {
return false;
}
@@ -226,8 +226,9 @@ class StreamReader
$offset = $this->offset;
}
- if ($offset >= $this->bufferLength &&
- ((!$this->increaseLength()) || $offset >= $this->bufferLength)
+ if (
+ $offset >= $this->bufferLength
+ && ((!$this->increaseLength()) || $offset >= $this->bufferLength)
) {
return false;
}
@@ -245,7 +246,7 @@ class StreamReader
*
* @param int $length
* @param int|null $position
- * @return string
+ * @return string|false
*/
public function readBytes($length, $position = null)
{
@@ -262,8 +263,9 @@ class StreamReader
$offset = $this->offset;
}
- if (($offset + $length) > $this->bufferLength &&
- ((!$this->increaseLength($length)) || ($offset + $length) > $this->bufferLength)
+ if (
+ ($offset + $length) > $this->bufferLength
+ && ((!$this->increaseLength($length)) || ($offset + $length) > $this->bufferLength)
) {
return false;
}
@@ -433,7 +435,8 @@ class StreamReader
*/
public function ensure($pos, $length)
{
- if ($pos >= $this->position
+ if (
+ $pos >= $this->position
&& $pos < ($this->position + $this->bufferLength)
&& ($this->position + $this->bufferLength) >= ($pos + $length)
) {
diff --git a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Tokenizer.php b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Tokenizer.php
index ebf0d0b..a3bcd01 100644
--- a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Tokenizer.php
+++ b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Tokenizer.php
@@ -1,9 +1,10 @@
leapWhiteSpaces() === false) {
return false;
}
diff --git a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfArray.php b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfArray.php
index 9cf449a..5d0bbbd 100644
--- a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfArray.php
+++ b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfArray.php
@@ -1,9 +1,10 @@
value = $result;
return $v;
@@ -55,7 +55,7 @@ class PdfArray extends PdfType
*/
public static function create(array $values = [])
{
- $v = new self;
+ $v = new self();
$v->value = $values;
return $v;
diff --git a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfBoolean.php b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfBoolean.php
index 5f746b7..ba4233a 100644
--- a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfBoolean.php
+++ b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfBoolean.php
@@ -1,9 +1,10 @@
value = (boolean) $value;
+ $v = new self();
+ $v->value = (bool) $value;
return $v;
}
diff --git a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfDictionary.php b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfDictionary.php
index 46b669d..2818842 100644
--- a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfDictionary.php
+++ b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfDictionary.php
@@ -1,9 +1,10 @@
value] = $value;
}
- $v = new self;
+ $v = new self();
$v->value = $entries;
return $v;
@@ -93,7 +92,7 @@ class PdfDictionary extends PdfType
*/
public static function create(array $entries = [])
{
- $v = new self;
+ $v = new self();
$v->value = $entries;
return $v;
@@ -104,7 +103,7 @@ class PdfDictionary extends PdfType
*
* @param mixed $dictionary
* @param string $key
- * @param PdfType|mixed|null $default
+ * @param PdfType|null $default
* @return PdfNull|PdfType
* @throws PdfTypeException
*/
diff --git a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfHexString.php b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfHexString.php
index 793fa43..0084ada 100644
--- a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfHexString.php
+++ b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfHexString.php
@@ -1,9 +1,10 @@
getOffset();
- /**
- * @var string $buffer
- * @var int $pos
- */
while (true) {
$buffer = $streamReader->getBuffer(false);
$pos = \strpos($buffer, '>', $bufferOffset);
@@ -48,7 +43,7 @@ class PdfHexString extends PdfType
$result = \substr($buffer, $bufferOffset, $pos - $bufferOffset);
$streamReader->setOffset($pos + 1);
- $v = new self;
+ $v = new self();
$v->value = $result;
return $v;
@@ -62,7 +57,7 @@ class PdfHexString extends PdfType
*/
public static function create($string)
{
- $v = new self;
+ $v = new self();
$v->value = $string;
return $v;
diff --git a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfIndirectObject.php b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfIndirectObject.php
index a5bd2ac..15786d0 100644
--- a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfIndirectObject.php
+++ b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfIndirectObject.php
@@ -1,9 +1,10 @@
pushStack($nextToken);
}
- $v = new self;
+ $v = new self();
$v->objectNumber = (int) $objectNumberToken;
$v->generationNumber = (int) $objectGenerationNumberToken;
$v->value = $value;
@@ -68,7 +67,7 @@ class PdfIndirectObject extends PdfType
*/
public static function create($objectNumber, $generationNumber, PdfType $value)
{
- $v = new self;
+ $v = new self();
$v->objectNumber = (int) $objectNumber;
$v->generationNumber = (int) $generationNumber;
$v->value = $value;
diff --git a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfIndirectObjectReference.php b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfIndirectObjectReference.php
index c6a67a0..2725d0c 100644
--- a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfIndirectObjectReference.php
+++ b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfIndirectObjectReference.php
@@ -1,9 +1,10 @@
value = (int) $objectNumber;
$v->generationNumber = (int) $generationNumber;
diff --git a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfName.php b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfName.php
index 6be7d0e..194a13f 100644
--- a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfName.php
+++ b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfName.php
@@ -1,9 +1,10 @@
getByte(), "\x00\x09\x0A\x0C\x0D\x20()<>[]{}/%") === 0) {
$v->value = (string) $tokenizer->getNextToken();
return $v;
@@ -44,13 +43,14 @@ class PdfName extends PdfType
* @param string $value
* @return string
*/
- static public function unescape($value)
+ public static function unescape($value)
{
- if (strpos($value, '#') === false)
+ if (strpos($value, '#') === false) {
return $value;
+ }
- return preg_replace_callback('/#[a-fA-F\d]{2}/', function($matches) {
- return chr(hexdec($matches[0]));
+ return preg_replace_callback('/#([a-fA-F\d]{2})/', function ($matches) {
+ return chr(hexdec($matches[1]));
}, $value);
}
@@ -62,7 +62,7 @@ class PdfName extends PdfType
*/
public static function create($string)
{
- $v = new self;
+ $v = new self();
$v->value = $string;
return $v;
diff --git a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfNull.php b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfNull.php
index 3dbe37c..0c4c108 100644
--- a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfNull.php
+++ b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfNull.php
@@ -1,9 +1,10 @@
value = $value + 0;
return $v;
diff --git a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfStream.php b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfStream.php
index 4b9300b..6d4c5a8 100644
--- a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfStream.php
+++ b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfStream.php
@@ -1,9 +1,10 @@
value = $dictionary;
$v->reader = $reader;
$v->parser = $parser;
@@ -54,7 +53,7 @@ class PdfStream extends PdfType
}
}
- if (false === $firstByte) {
+ if ($firstByte === false) {
throw new PdfTypeException(
'Unable to parse stream data. No newline after the stream keyword found.',
PdfTypeException::NO_NEWLINE_AFTER_STREAM_KEYWORD
@@ -86,7 +85,7 @@ class PdfStream extends PdfType
*/
public static function create(PdfDictionary $dictionary, $stream)
{
- $v = new self;
+ $v = new self();
$v->value = $dictionary;
$v->stream = (string) $stream;
@@ -115,7 +114,7 @@ class PdfStream extends PdfType
/**
* The stream reader instance.
*
- * @var StreamReader
+ * @var StreamReader|null
*/
protected $reader;
@@ -208,6 +207,13 @@ class PdfStream extends PdfType
}
}
+ // There are streams in the wild, which have only white signs in them but need to be parsed manually due
+ // to a problem encountered before (e.g. Length === 0). We should set them to empty streams to avoid problems
+ // in further processing (e.g. applying of filters).
+ if (trim($buffer) === '') {
+ $buffer = '';
+ }
+
return $buffer;
}
diff --git a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfString.php b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfString.php
index f933b1a..1636e68 100644
--- a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfString.php
+++ b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfString.php
@@ -1,9 +1,10 @@
setOffset($pos);
- $v = new self;
+ $v = new self();
$v->value = $result;
return $v;
@@ -61,7 +60,7 @@ class PdfString extends PdfType
*/
public static function create($value)
{
- $v = new self;
+ $v = new self();
$v->value = $value;
return $v;
@@ -138,22 +137,23 @@ class PdfString extends PdfType
$actualChar = \ord($s[$count]);
// ascii 48 = number 0
// ascii 57 = number 9
- if ($actualChar >= 48 &&
- $actualChar <= 57) {
+ if ($actualChar >= 48 && $actualChar <= 57) {
$oct = '' . $s[$count];
/** @noinspection NotOptimalIfConditionsInspection */
- if ($count + 1 < $n &&
- \ord($s[$count + 1]) >= 48 &&
- \ord($s[$count + 1]) <= 57
+ if (
+ $count + 1 < $n
+ && \ord($s[$count + 1]) >= 48
+ && \ord($s[$count + 1]) <= 57
) {
$count++;
$oct .= $s[$count];
/** @noinspection NotOptimalIfConditionsInspection */
- if ($count + 1 < $n &&
- \ord($s[$count + 1]) >= 48 &&
- \ord($s[$count + 1]) <= 57
+ if (
+ $count + 1 < $n
+ && \ord($s[$count + 1]) >= 48
+ && \ord($s[$count + 1]) <= 57
) {
$oct .= $s[++$count];
}
diff --git a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfToken.php b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfToken.php
index 4abda09..012b9fd 100644
--- a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfToken.php
+++ b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfToken.php
@@ -1,9 +1,10 @@
value = $token;
return $v;
diff --git a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfType.php b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfType.php
index 6ce3c8c..7672dcd 100644
--- a/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfType.php
+++ b/lib/MPDF/vendor/setasign/fpdi/src/PdfParser/Type/PdfType.php
@@ -1,9 +1,10 @@
parser !== null) {
- /** @noinspection PhpInternalEntityUsedInspection */
$this->parser->cleanUp();
}
}
@@ -165,9 +164,22 @@ class PdfReader
$page = $this->parser->getIndirectObject($page->value);
$dict = PdfType::resolve($page, $this->parser);
$type = PdfDictionary::get($dict, 'Type');
+
if ($type->value === 'Pages') {
$kids = PdfType::resolve(PdfDictionary::get($dict, 'Kids'), $this->parser);
- $page = $this->pages[$pageNumber - 1] = $readPages($kids);
+ try {
+ $page = $this->pages[$pageNumber - 1] = $readPages($kids);
+ } catch (PdfReaderException $e) {
+ if ($e->getCode() !== PdfReaderException::KIDS_EMPTY) {
+ throw $e;
+ }
+
+ // let's reset the pages array and read all page objects
+ $this->pages = [];
+ $this->readPages(true);
+ // @phpstan-ignore-next-line
+ $page = $this->pages[$pageNumber - 1];
+ }
} else {
$this->pages[$pageNumber - 1] = $page;
}
@@ -179,24 +191,25 @@ class PdfReader
/**
* Walk the page tree and resolve all indirect objects of all pages.
*
- * @throws PdfTypeException
+ * @param bool $readAll
* @throws CrossReferenceException
* @throws PdfParserException
+ * @throws PdfTypeException
*/
- protected function readPages()
+ protected function readPages($readAll = false)
{
if (\count($this->pages) > 0) {
return;
}
- $readPages = function ($kids, $count) use (&$readPages) {
+ $readPages = function ($kids, $count) use (&$readPages, $readAll) {
$kids = PdfArray::ensure($kids);
- $isLeaf = $count->value === \count($kids->value);
+ $isLeaf = ($count->value === \count($kids->value));
foreach ($kids->value as $reference) {
$reference = PdfIndirectObjectReference::ensure($reference);
- if ($isLeaf) {
+ if (!$readAll && $isLeaf) {
$this->pages[] = $reference;
continue;
}
diff --git a/lib/MPDF/vendor/setasign/fpdi/src/PdfReader/PdfReaderException.php b/lib/MPDF/vendor/setasign/fpdi/src/PdfReader/PdfReaderException.php
index c1159ba..99f7d12 100644
--- a/lib/MPDF/vendor/setasign/fpdi/src/PdfReader/PdfReaderException.php
+++ b/lib/MPDF/vendor/setasign/fpdi/src/PdfReader/PdfReaderException.php
@@ -1,9 +1,10 @@
objectsToCopy[$readerId])) !== null) {
try {
$object = $parser->getIndirectObject($objectNumber);
-
} catch (CrossReferenceException $e) {
if ($e->getCode() === CrossReferenceException::OBJECT_NOT_FOUND) {
$object = PdfIndirectObject::create($objectNumber, 0, new PdfNull());
@@ -240,27 +247,24 @@ class Fpdi extends \TCPDF
$string = PdfString::unescape($value->value);
$string = $this->_encrypt_data($this->currentObjectNumber, $string);
$value->value = \TCPDF_STATIC::_escape($string);
-
} elseif ($value instanceof PdfHexString) {
$filter = new AsciiHex();
$string = $filter->decode($value->value);
$string = $this->_encrypt_data($this->currentObjectNumber, $string);
$value->value = $filter->encode($string, true);
-
} elseif ($value instanceof PdfStream) {
$stream = $value->getStream();
$stream = $this->_encrypt_data($this->currentObjectNumber, $stream);
$dictionary = $value->value;
$dictionary->value['Length'] = PdfNumeric::create(\strlen($stream));
$value = PdfStream::create($dictionary, $stream);
-
} elseif ($value instanceof PdfIndirectObject) {
/**
- * @var $value PdfIndirectObject
+ * @var PdfIndirectObject $value
*/
$this->currentObjectNumber = $this->objectMap[$this->currentReaderId][$value->objectNumber];
}
$this->fpdiWritePdfType($value);
}
-}
\ No newline at end of file
+}
diff --git a/lib/MPDF/vendor/setasign/fpdi/src/TcpdfFpdi.php b/lib/MPDF/vendor/setasign/fpdi/src/TcpdfFpdi.php
index 6b617a1..9e6825b 100644
--- a/lib/MPDF/vendor/setasign/fpdi/src/TcpdfFpdi.php
+++ b/lib/MPDF/vendor/setasign/fpdi/src/TcpdfFpdi.php
@@ -1,9 +1,10 @@
_protectedPutimages();
- }
-
- /**
- * Make the method public as in tFPDF.
- */
- public function _putxobjectdict()
- {
- $this->_protectedPutxobjectdict();
- }
-
- /**
- * Set the page format of the current page.
- *
- * @param array $size An array with two values defining the size.
- * @param string $orientation "L" for landscape, "P" for portrait.
- * @throws \BadMethodCallException
- */
- public function setPageFormat($size, $orientation)
- {
- if ($this->currentTemplateId !== null) {
- throw new \BadMethodCallException('The page format cannot be changed when writing to a template.');
- }
-
- if (!\in_array($orientation, ['P', 'L'], true)) {
- throw new \InvalidArgumentException(\sprintf(
- 'Invalid page orientation "%s"! Only "P" and "L" are allowed!',
- $orientation
- ));
- }
-
- $size = $this->_getpagesize($size);
-
- if ($orientation != $this->CurOrientation
- || $size[0] != $this->CurPageSize[0]
- || $size[1] != $this->CurPageSize[1]
- ) {
- // New size or orientation
- if ($orientation === 'P') {
- $this->w = $size[0];
- $this->h = $size[1];
- } else {
- $this->w = $size[1];
- $this->h = $size[0];
- }
- $this->wPt = $this->w * $this->k;
- $this->hPt = $this->h * $this->k;
- $this->PageBreakTrigger = $this->h - $this->bMargin;
- $this->CurOrientation = $orientation;
- $this->CurPageSize = $size;
-
- $this->PageSizes[$this->page] = array($this->wPt, $this->hPt);
- }
- }
-
- /**
- * @inheritdoc
- */
- protected function _put($s, $newLine = true)
- {
- if ($newLine) {
- $this->buffer .= $s . "\n";
- } else {
- $this->buffer .= $s;
- }
- }
-}
\ No newline at end of file
+ use FpdfTplTrait;
+}
diff --git a/lib/MPDF/vendor/setasign/fpdi/src/Tfpdf/Fpdi.php b/lib/MPDF/vendor/setasign/fpdi/src/Tfpdf/Fpdi.php
index f22625f..5f0e653 100644
--- a/lib/MPDF/vendor/setasign/fpdi/src/Tfpdf/Fpdi.php
+++ b/lib/MPDF/vendor/setasign/fpdi/src/Tfpdf/Fpdi.php
@@ -1,9 +1,10 @@
objectsToCopy[$readerId])) !== null) {
try {
$object = $parser->getIndirectObject($objectNumber);
-
} catch (CrossReferenceException $e) {
if ($e->getCode() === CrossReferenceException::OBJECT_NOT_FOUND) {
$object = PdfIndirectObject::create($objectNumber, 0, new PdfNull());
@@ -133,7 +131,7 @@ class Fpdi extends FpdfTpl
/**
* @inheritdoc
*/
- public function _putxobjectdict()
+ protected function _putxobjectdict()
{
foreach ($this->importedPages as $key => $pageData) {
$this->_put('/' . $pageData['id'] . ' ' . $pageData['objectNumber'] . ' 0 R');
@@ -145,20 +143,12 @@ class Fpdi extends FpdfTpl
/**
* @inheritdoc
*/
- public function _newobj($n = null)
+ protected function _put($s, $newLine = true)
{
- // Begin a new object
- if($n === null)
- $n = ++$this->n;
- $this->offsets[$n] = $this->_getoffset();
- $this->_put($n.' 0 obj');
+ if ($newLine) {
+ $this->buffer .= $s . "\n";
+ } else {
+ $this->buffer .= $s;
+ }
}
-
- /**
- * @inheritdoc
- */
- protected function _getoffset()
- {
- return strlen($this->buffer);
- }
-}
\ No newline at end of file
+}
diff --git a/lib/MPDF/vendor/setasign/fpdi/src/autoload.php b/lib/MPDF/vendor/setasign/fpdi/src/autoload.php
index fd7d472..419e831 100644
--- a/lib/MPDF/vendor/setasign/fpdi/src/autoload.php
+++ b/lib/MPDF/vendor/setasign/fpdi/src/autoload.php
@@ -1,18 +1,20 @@