Passed
Branch main (96fc75)
by Stefan
07:41
created
OPlathey/FPDF/font/timesi.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -4,18 +4,18 @@
 block discarded – undo
4 4
 $up = -100;
5 5
 $ut = 50;
6 6
 $cw = array(
7
-	chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
8
-	chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>420,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>214,'('=>333,')'=>333,'*'=>500,'+'=>675,
9
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>675,'='=>675,'>'=>675,'?'=>500,'@'=>920,'A'=>611,
10
-	'B'=>611,'C'=>667,'D'=>722,'E'=>611,'F'=>611,'G'=>722,'H'=>722,'I'=>333,'J'=>444,'K'=>667,'L'=>556,'M'=>833,'N'=>667,'O'=>722,'P'=>611,'Q'=>722,'R'=>611,'S'=>500,'T'=>556,'U'=>722,'V'=>611,'W'=>833,
11
-	'X'=>611,'Y'=>556,'Z'=>556,'['=>389,'\\'=>278,']'=>389,'^'=>422,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>278,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>444,'l'=>278,'m'=>722,
12
-	'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>500,'v'=>444,'w'=>667,'x'=>444,'y'=>444,'z'=>389,'{'=>400,'|'=>275,'}'=>400,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
13
-	chr(132)=>556,chr(133)=>889,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>500,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>556,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>556,chr(148)=>556,chr(149)=>350,chr(150)=>500,chr(151)=>889,chr(152)=>333,chr(153)=>980,
14
-	chr(154)=>389,chr(155)=>333,chr(156)=>667,chr(157)=>350,chr(158)=>389,chr(159)=>556,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>275,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>675,chr(173)=>333,chr(174)=>760,chr(175)=>333,
15
-	chr(176)=>400,chr(177)=>675,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>523,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>611,chr(193)=>611,chr(194)=>611,chr(195)=>611,chr(196)=>611,chr(197)=>611,
16
-	chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>667,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>675,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
17
-	chr(220)=>722,chr(221)=>556,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
18
-	chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>675,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>444,chr(254)=>500,chr(255)=>444);
7
+	chr(0)=>250, chr(1)=>250, chr(2)=>250, chr(3)=>250, chr(4)=>250, chr(5)=>250, chr(6)=>250, chr(7)=>250, chr(8)=>250, chr(9)=>250, chr(10)=>250, chr(11)=>250, chr(12)=>250, chr(13)=>250, chr(14)=>250, chr(15)=>250, chr(16)=>250, chr(17)=>250, chr(18)=>250, chr(19)=>250, chr(20)=>250, chr(21)=>250,
8
+	chr(22)=>250, chr(23)=>250, chr(24)=>250, chr(25)=>250, chr(26)=>250, chr(27)=>250, chr(28)=>250, chr(29)=>250, chr(30)=>250, chr(31)=>250, ' '=>250, '!'=>333, '"'=>420, '#'=>500, '$'=>500, '%'=>833, '&'=>778, '\''=>214, '('=>333, ')'=>333, '*'=>500, '+'=>675,
9
+	','=>250, '-'=>333, '.'=>250, '/'=>278, '0'=>500, '1'=>500, '2'=>500, '3'=>500, '4'=>500, '5'=>500, '6'=>500, '7'=>500, '8'=>500, '9'=>500, ':'=>333, ';'=>333, '<'=>675, '='=>675, '>'=>675, '?'=>500, '@'=>920, 'A'=>611,
10
+	'B'=>611, 'C'=>667, 'D'=>722, 'E'=>611, 'F'=>611, 'G'=>722, 'H'=>722, 'I'=>333, 'J'=>444, 'K'=>667, 'L'=>556, 'M'=>833, 'N'=>667, 'O'=>722, 'P'=>611, 'Q'=>722, 'R'=>611, 'S'=>500, 'T'=>556, 'U'=>722, 'V'=>611, 'W'=>833,
11
+	'X'=>611, 'Y'=>556, 'Z'=>556, '['=>389, '\\'=>278, ']'=>389, '^'=>422, '_'=>500, '`'=>333, 'a'=>500, 'b'=>500, 'c'=>444, 'd'=>500, 'e'=>444, 'f'=>278, 'g'=>500, 'h'=>500, 'i'=>278, 'j'=>278, 'k'=>444, 'l'=>278, 'm'=>722,
12
+	'n'=>500, 'o'=>500, 'p'=>500, 'q'=>500, 'r'=>389, 's'=>389, 't'=>278, 'u'=>500, 'v'=>444, 'w'=>667, 'x'=>444, 'y'=>444, 'z'=>389, '{'=>400, '|'=>275, '}'=>400, '~'=>541, chr(127)=>350, chr(128)=>500, chr(129)=>350, chr(130)=>333, chr(131)=>500,
13
+	chr(132)=>556, chr(133)=>889, chr(134)=>500, chr(135)=>500, chr(136)=>333, chr(137)=>1000, chr(138)=>500, chr(139)=>333, chr(140)=>944, chr(141)=>350, chr(142)=>556, chr(143)=>350, chr(144)=>350, chr(145)=>333, chr(146)=>333, chr(147)=>556, chr(148)=>556, chr(149)=>350, chr(150)=>500, chr(151)=>889, chr(152)=>333, chr(153)=>980,
14
+	chr(154)=>389, chr(155)=>333, chr(156)=>667, chr(157)=>350, chr(158)=>389, chr(159)=>556, chr(160)=>250, chr(161)=>389, chr(162)=>500, chr(163)=>500, chr(164)=>500, chr(165)=>500, chr(166)=>275, chr(167)=>500, chr(168)=>333, chr(169)=>760, chr(170)=>276, chr(171)=>500, chr(172)=>675, chr(173)=>333, chr(174)=>760, chr(175)=>333,
15
+	chr(176)=>400, chr(177)=>675, chr(178)=>300, chr(179)=>300, chr(180)=>333, chr(181)=>500, chr(182)=>523, chr(183)=>250, chr(184)=>333, chr(185)=>300, chr(186)=>310, chr(187)=>500, chr(188)=>750, chr(189)=>750, chr(190)=>750, chr(191)=>500, chr(192)=>611, chr(193)=>611, chr(194)=>611, chr(195)=>611, chr(196)=>611, chr(197)=>611,
16
+	chr(198)=>889, chr(199)=>667, chr(200)=>611, chr(201)=>611, chr(202)=>611, chr(203)=>611, chr(204)=>333, chr(205)=>333, chr(206)=>333, chr(207)=>333, chr(208)=>722, chr(209)=>667, chr(210)=>722, chr(211)=>722, chr(212)=>722, chr(213)=>722, chr(214)=>722, chr(215)=>675, chr(216)=>722, chr(217)=>722, chr(218)=>722, chr(219)=>722,
17
+	chr(220)=>722, chr(221)=>556, chr(222)=>611, chr(223)=>500, chr(224)=>500, chr(225)=>500, chr(226)=>500, chr(227)=>500, chr(228)=>500, chr(229)=>500, chr(230)=>667, chr(231)=>444, chr(232)=>444, chr(233)=>444, chr(234)=>444, chr(235)=>444, chr(236)=>278, chr(237)=>278, chr(238)=>278, chr(239)=>278, chr(240)=>500, chr(241)=>500,
18
+	chr(242)=>500, chr(243)=>500, chr(244)=>500, chr(245)=>500, chr(246)=>500, chr(247)=>675, chr(248)=>500, chr(249)=>500, chr(250)=>500, chr(251)=>500, chr(252)=>500, chr(253)=>444, chr(254)=>500, chr(255)=>444);
19 19
 $enc = 'cp1252';
20
-$uv = array(0=>array(0,128),128=>8364,130=>8218,131=>402,132=>8222,133=>8230,134=>array(8224,2),136=>710,137=>8240,138=>352,139=>8249,140=>338,142=>381,145=>array(8216,2),147=>array(8220,2),149=>8226,150=>array(8211,2),152=>732,153=>8482,154=>353,155=>8250,156=>339,158=>382,159=>376,160=>array(160,96));
20
+$uv = array(0=>array(0, 128), 128=>8364, 130=>8218, 131=>402, 132=>8222, 133=>8230, 134=>array(8224, 2), 136=>710, 137=>8240, 138=>352, 139=>8249, 140=>338, 142=>381, 145=>array(8216, 2), 147=>array(8220, 2), 149=>8226, 150=>array(8211, 2), 152=>732, 153=>8482, 154=>353, 155=>8250, 156=>339, 158=>382, 159=>376, 160=>array(160, 96));
21 21
 ?>
Please login to merge, or discard this patch.
OPlathey/FPDF/font/courier.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@
 block discarded – undo
3 3
 $name = 'Courier';
4 4
 $up = -100;
5 5
 $ut = 50;
6
-for($i=0;$i<=255;$i++)
6
+for ($i = 0; $i <= 255; $i++)
7 7
 	$cw[chr($i)] = 600;
8 8
 $enc = 'cp1252';
9
-$uv = array(0=>array(0,128),128=>8364,130=>8218,131=>402,132=>8222,133=>8230,134=>array(8224,2),136=>710,137=>8240,138=>352,139=>8249,140=>338,142=>381,145=>array(8216,2),147=>array(8220,2),149=>8226,150=>array(8211,2),152=>732,153=>8482,154=>353,155=>8250,156=>339,158=>382,159=>376,160=>array(160,96));
9
+$uv = array(0=>array(0, 128), 128=>8364, 130=>8218, 131=>402, 132=>8222, 133=>8230, 134=>array(8224, 2), 136=>710, 137=>8240, 138=>352, 139=>8249, 140=>338, 142=>381, 145=>array(8216, 2), 147=>array(8220, 2), 149=>8226, 150=>array(8211, 2), 152=>732, 153=>8482, 154=>353, 155=>8250, 156=>339, 158=>382, 159=>376, 160=>array(160, 96));
10 10
 ?>
Please login to merge, or discard this patch.
OPlathey/FPDF/font/helvetica.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -4,18 +4,18 @@
 block discarded – undo
4 4
 $up = -100;
5 5
 $ut = 50;
6 6
 $cw = array(
7
-	chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
8
-	chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
9
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
10
-	'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
11
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
12
-	'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556,
13
-	chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
14
-	chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
15
-	chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
16
-	chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
17
-	chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
18
-	chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
7
+	chr(0)=>278, chr(1)=>278, chr(2)=>278, chr(3)=>278, chr(4)=>278, chr(5)=>278, chr(6)=>278, chr(7)=>278, chr(8)=>278, chr(9)=>278, chr(10)=>278, chr(11)=>278, chr(12)=>278, chr(13)=>278, chr(14)=>278, chr(15)=>278, chr(16)=>278, chr(17)=>278, chr(18)=>278, chr(19)=>278, chr(20)=>278, chr(21)=>278,
8
+	chr(22)=>278, chr(23)=>278, chr(24)=>278, chr(25)=>278, chr(26)=>278, chr(27)=>278, chr(28)=>278, chr(29)=>278, chr(30)=>278, chr(31)=>278, ' '=>278, '!'=>278, '"'=>355, '#'=>556, '$'=>556, '%'=>889, '&'=>667, '\''=>191, '('=>333, ')'=>333, '*'=>389, '+'=>584,
9
+	','=>278, '-'=>333, '.'=>278, '/'=>278, '0'=>556, '1'=>556, '2'=>556, '3'=>556, '4'=>556, '5'=>556, '6'=>556, '7'=>556, '8'=>556, '9'=>556, ':'=>278, ';'=>278, '<'=>584, '='=>584, '>'=>584, '?'=>556, '@'=>1015, 'A'=>667,
10
+	'B'=>667, 'C'=>722, 'D'=>722, 'E'=>667, 'F'=>611, 'G'=>778, 'H'=>722, 'I'=>278, 'J'=>500, 'K'=>667, 'L'=>556, 'M'=>833, 'N'=>722, 'O'=>778, 'P'=>667, 'Q'=>778, 'R'=>722, 'S'=>667, 'T'=>611, 'U'=>722, 'V'=>667, 'W'=>944,
11
+	'X'=>667, 'Y'=>667, 'Z'=>611, '['=>278, '\\'=>278, ']'=>278, '^'=>469, '_'=>556, '`'=>333, 'a'=>556, 'b'=>556, 'c'=>500, 'd'=>556, 'e'=>556, 'f'=>278, 'g'=>556, 'h'=>556, 'i'=>222, 'j'=>222, 'k'=>500, 'l'=>222, 'm'=>833,
12
+	'n'=>556, 'o'=>556, 'p'=>556, 'q'=>556, 'r'=>333, 's'=>500, 't'=>278, 'u'=>556, 'v'=>500, 'w'=>722, 'x'=>500, 'y'=>500, 'z'=>500, '{'=>334, '|'=>260, '}'=>334, '~'=>584, chr(127)=>350, chr(128)=>556, chr(129)=>350, chr(130)=>222, chr(131)=>556,
13
+	chr(132)=>333, chr(133)=>1000, chr(134)=>556, chr(135)=>556, chr(136)=>333, chr(137)=>1000, chr(138)=>667, chr(139)=>333, chr(140)=>1000, chr(141)=>350, chr(142)=>611, chr(143)=>350, chr(144)=>350, chr(145)=>222, chr(146)=>222, chr(147)=>333, chr(148)=>333, chr(149)=>350, chr(150)=>556, chr(151)=>1000, chr(152)=>333, chr(153)=>1000,
14
+	chr(154)=>500, chr(155)=>333, chr(156)=>944, chr(157)=>350, chr(158)=>500, chr(159)=>667, chr(160)=>278, chr(161)=>333, chr(162)=>556, chr(163)=>556, chr(164)=>556, chr(165)=>556, chr(166)=>260, chr(167)=>556, chr(168)=>333, chr(169)=>737, chr(170)=>370, chr(171)=>556, chr(172)=>584, chr(173)=>333, chr(174)=>737, chr(175)=>333,
15
+	chr(176)=>400, chr(177)=>584, chr(178)=>333, chr(179)=>333, chr(180)=>333, chr(181)=>556, chr(182)=>537, chr(183)=>278, chr(184)=>333, chr(185)=>333, chr(186)=>365, chr(187)=>556, chr(188)=>834, chr(189)=>834, chr(190)=>834, chr(191)=>611, chr(192)=>667, chr(193)=>667, chr(194)=>667, chr(195)=>667, chr(196)=>667, chr(197)=>667,
16
+	chr(198)=>1000, chr(199)=>722, chr(200)=>667, chr(201)=>667, chr(202)=>667, chr(203)=>667, chr(204)=>278, chr(205)=>278, chr(206)=>278, chr(207)=>278, chr(208)=>722, chr(209)=>722, chr(210)=>778, chr(211)=>778, chr(212)=>778, chr(213)=>778, chr(214)=>778, chr(215)=>584, chr(216)=>778, chr(217)=>722, chr(218)=>722, chr(219)=>722,
17
+	chr(220)=>722, chr(221)=>667, chr(222)=>667, chr(223)=>611, chr(224)=>556, chr(225)=>556, chr(226)=>556, chr(227)=>556, chr(228)=>556, chr(229)=>556, chr(230)=>889, chr(231)=>500, chr(232)=>556, chr(233)=>556, chr(234)=>556, chr(235)=>556, chr(236)=>278, chr(237)=>278, chr(238)=>278, chr(239)=>278, chr(240)=>556, chr(241)=>556,
18
+	chr(242)=>556, chr(243)=>556, chr(244)=>556, chr(245)=>556, chr(246)=>556, chr(247)=>584, chr(248)=>611, chr(249)=>556, chr(250)=>556, chr(251)=>556, chr(252)=>556, chr(253)=>500, chr(254)=>556, chr(255)=>500);
19 19
 $enc = 'cp1252';
20
-$uv = array(0=>array(0,128),128=>8364,130=>8218,131=>402,132=>8222,133=>8230,134=>array(8224,2),136=>710,137=>8240,138=>352,139=>8249,140=>338,142=>381,145=>array(8216,2),147=>array(8220,2),149=>8226,150=>array(8211,2),152=>732,153=>8482,154=>353,155=>8250,156=>339,158=>382,159=>376,160=>array(160,96));
20
+$uv = array(0=>array(0, 128), 128=>8364, 130=>8218, 131=>402, 132=>8222, 133=>8230, 134=>array(8224, 2), 136=>710, 137=>8240, 138=>352, 139=>8249, 140=>338, 142=>381, 145=>array(8216, 2), 147=>array(8220, 2), 149=>8226, 150=>array(8211, 2), 152=>732, 153=>8482, 154=>353, 155=>8250, 156=>339, 158=>382, 159=>376, 160=>array(160, 96));
21 21
 ?>
Please login to merge, or discard this patch.
OPlathey/FPDF/font/timesb.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -4,18 +4,18 @@
 block discarded – undo
4 4
 $up = -100;
5 5
 $ut = 50;
6 6
 $cw = array(
7
-	chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
8
-	chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>555,'#'=>500,'$'=>500,'%'=>1000,'&'=>833,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
9
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>930,'A'=>722,
10
-	'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>778,'I'=>389,'J'=>500,'K'=>778,'L'=>667,'M'=>944,'N'=>722,'O'=>778,'P'=>611,'Q'=>778,'R'=>722,'S'=>556,'T'=>667,'U'=>722,'V'=>722,'W'=>1000,
11
-	'X'=>722,'Y'=>722,'Z'=>667,'['=>333,'\\'=>278,']'=>333,'^'=>581,'_'=>500,'`'=>333,'a'=>500,'b'=>556,'c'=>444,'d'=>556,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>333,'k'=>556,'l'=>278,'m'=>833,
12
-	'n'=>556,'o'=>500,'p'=>556,'q'=>556,'r'=>444,'s'=>389,'t'=>333,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>394,'|'=>220,'}'=>394,'~'=>520,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
13
-	chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>667,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
14
-	chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>300,chr(171)=>500,chr(172)=>570,chr(173)=>333,chr(174)=>747,chr(175)=>333,
15
-	chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>556,chr(182)=>540,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>330,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
16
-	chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>570,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
17
-	chr(220)=>722,chr(221)=>722,chr(222)=>611,chr(223)=>556,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
18
-	chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
7
+	chr(0)=>250, chr(1)=>250, chr(2)=>250, chr(3)=>250, chr(4)=>250, chr(5)=>250, chr(6)=>250, chr(7)=>250, chr(8)=>250, chr(9)=>250, chr(10)=>250, chr(11)=>250, chr(12)=>250, chr(13)=>250, chr(14)=>250, chr(15)=>250, chr(16)=>250, chr(17)=>250, chr(18)=>250, chr(19)=>250, chr(20)=>250, chr(21)=>250,
8
+	chr(22)=>250, chr(23)=>250, chr(24)=>250, chr(25)=>250, chr(26)=>250, chr(27)=>250, chr(28)=>250, chr(29)=>250, chr(30)=>250, chr(31)=>250, ' '=>250, '!'=>333, '"'=>555, '#'=>500, '$'=>500, '%'=>1000, '&'=>833, '\''=>278, '('=>333, ')'=>333, '*'=>500, '+'=>570,
9
+	','=>250, '-'=>333, '.'=>250, '/'=>278, '0'=>500, '1'=>500, '2'=>500, '3'=>500, '4'=>500, '5'=>500, '6'=>500, '7'=>500, '8'=>500, '9'=>500, ':'=>333, ';'=>333, '<'=>570, '='=>570, '>'=>570, '?'=>500, '@'=>930, 'A'=>722,
10
+	'B'=>667, 'C'=>722, 'D'=>722, 'E'=>667, 'F'=>611, 'G'=>778, 'H'=>778, 'I'=>389, 'J'=>500, 'K'=>778, 'L'=>667, 'M'=>944, 'N'=>722, 'O'=>778, 'P'=>611, 'Q'=>778, 'R'=>722, 'S'=>556, 'T'=>667, 'U'=>722, 'V'=>722, 'W'=>1000,
11
+	'X'=>722, 'Y'=>722, 'Z'=>667, '['=>333, '\\'=>278, ']'=>333, '^'=>581, '_'=>500, '`'=>333, 'a'=>500, 'b'=>556, 'c'=>444, 'd'=>556, 'e'=>444, 'f'=>333, 'g'=>500, 'h'=>556, 'i'=>278, 'j'=>333, 'k'=>556, 'l'=>278, 'm'=>833,
12
+	'n'=>556, 'o'=>500, 'p'=>556, 'q'=>556, 'r'=>444, 's'=>389, 't'=>333, 'u'=>556, 'v'=>500, 'w'=>722, 'x'=>500, 'y'=>500, 'z'=>444, '{'=>394, '|'=>220, '}'=>394, '~'=>520, chr(127)=>350, chr(128)=>500, chr(129)=>350, chr(130)=>333, chr(131)=>500,
13
+	chr(132)=>500, chr(133)=>1000, chr(134)=>500, chr(135)=>500, chr(136)=>333, chr(137)=>1000, chr(138)=>556, chr(139)=>333, chr(140)=>1000, chr(141)=>350, chr(142)=>667, chr(143)=>350, chr(144)=>350, chr(145)=>333, chr(146)=>333, chr(147)=>500, chr(148)=>500, chr(149)=>350, chr(150)=>500, chr(151)=>1000, chr(152)=>333, chr(153)=>1000,
14
+	chr(154)=>389, chr(155)=>333, chr(156)=>722, chr(157)=>350, chr(158)=>444, chr(159)=>722, chr(160)=>250, chr(161)=>333, chr(162)=>500, chr(163)=>500, chr(164)=>500, chr(165)=>500, chr(166)=>220, chr(167)=>500, chr(168)=>333, chr(169)=>747, chr(170)=>300, chr(171)=>500, chr(172)=>570, chr(173)=>333, chr(174)=>747, chr(175)=>333,
15
+	chr(176)=>400, chr(177)=>570, chr(178)=>300, chr(179)=>300, chr(180)=>333, chr(181)=>556, chr(182)=>540, chr(183)=>250, chr(184)=>333, chr(185)=>300, chr(186)=>330, chr(187)=>500, chr(188)=>750, chr(189)=>750, chr(190)=>750, chr(191)=>500, chr(192)=>722, chr(193)=>722, chr(194)=>722, chr(195)=>722, chr(196)=>722, chr(197)=>722,
16
+	chr(198)=>1000, chr(199)=>722, chr(200)=>667, chr(201)=>667, chr(202)=>667, chr(203)=>667, chr(204)=>389, chr(205)=>389, chr(206)=>389, chr(207)=>389, chr(208)=>722, chr(209)=>722, chr(210)=>778, chr(211)=>778, chr(212)=>778, chr(213)=>778, chr(214)=>778, chr(215)=>570, chr(216)=>778, chr(217)=>722, chr(218)=>722, chr(219)=>722,
17
+	chr(220)=>722, chr(221)=>722, chr(222)=>611, chr(223)=>556, chr(224)=>500, chr(225)=>500, chr(226)=>500, chr(227)=>500, chr(228)=>500, chr(229)=>500, chr(230)=>722, chr(231)=>444, chr(232)=>444, chr(233)=>444, chr(234)=>444, chr(235)=>444, chr(236)=>278, chr(237)=>278, chr(238)=>278, chr(239)=>278, chr(240)=>500, chr(241)=>556,
18
+	chr(242)=>500, chr(243)=>500, chr(244)=>500, chr(245)=>500, chr(246)=>500, chr(247)=>570, chr(248)=>500, chr(249)=>556, chr(250)=>556, chr(251)=>556, chr(252)=>556, chr(253)=>500, chr(254)=>556, chr(255)=>500);
19 19
 $enc = 'cp1252';
20
-$uv = array(0=>array(0,128),128=>8364,130=>8218,131=>402,132=>8222,133=>8230,134=>array(8224,2),136=>710,137=>8240,138=>352,139=>8249,140=>338,142=>381,145=>array(8216,2),147=>array(8220,2),149=>8226,150=>array(8211,2),152=>732,153=>8482,154=>353,155=>8250,156=>339,158=>382,159=>376,160=>array(160,96));
20
+$uv = array(0=>array(0, 128), 128=>8364, 130=>8218, 131=>402, 132=>8222, 133=>8230, 134=>array(8224, 2), 136=>710, 137=>8240, 138=>352, 139=>8249, 140=>338, 142=>381, 145=>array(8216, 2), 147=>array(8220, 2), 149=>8226, 150=>array(8211, 2), 152=>732, 153=>8482, 154=>353, 155=>8250, 156=>339, 158=>382, 159=>376, 160=>array(160, 96));
21 21
 ?>
Please login to merge, or discard this patch.
OPlathey/FPDF/font/zapfdingbats.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -4,17 +4,17 @@
 block discarded – undo
4 4
 $up = -100;
5 5
 $ut = 50;
6 6
 $cw = array(
7
-	chr(0)=>0,chr(1)=>0,chr(2)=>0,chr(3)=>0,chr(4)=>0,chr(5)=>0,chr(6)=>0,chr(7)=>0,chr(8)=>0,chr(9)=>0,chr(10)=>0,chr(11)=>0,chr(12)=>0,chr(13)=>0,chr(14)=>0,chr(15)=>0,chr(16)=>0,chr(17)=>0,chr(18)=>0,chr(19)=>0,chr(20)=>0,chr(21)=>0,
8
-	chr(22)=>0,chr(23)=>0,chr(24)=>0,chr(25)=>0,chr(26)=>0,chr(27)=>0,chr(28)=>0,chr(29)=>0,chr(30)=>0,chr(31)=>0,' '=>278,'!'=>974,'"'=>961,'#'=>974,'$'=>980,'%'=>719,'&'=>789,'\''=>790,'('=>791,')'=>690,'*'=>960,'+'=>939,
9
-	','=>549,'-'=>855,'.'=>911,'/'=>933,'0'=>911,'1'=>945,'2'=>974,'3'=>755,'4'=>846,'5'=>762,'6'=>761,'7'=>571,'8'=>677,'9'=>763,':'=>760,';'=>759,'<'=>754,'='=>494,'>'=>552,'?'=>537,'@'=>577,'A'=>692,
10
-	'B'=>786,'C'=>788,'D'=>788,'E'=>790,'F'=>793,'G'=>794,'H'=>816,'I'=>823,'J'=>789,'K'=>841,'L'=>823,'M'=>833,'N'=>816,'O'=>831,'P'=>923,'Q'=>744,'R'=>723,'S'=>749,'T'=>790,'U'=>792,'V'=>695,'W'=>776,
11
-	'X'=>768,'Y'=>792,'Z'=>759,'['=>707,'\\'=>708,']'=>682,'^'=>701,'_'=>826,'`'=>815,'a'=>789,'b'=>789,'c'=>707,'d'=>687,'e'=>696,'f'=>689,'g'=>786,'h'=>787,'i'=>713,'j'=>791,'k'=>785,'l'=>791,'m'=>873,
12
-	'n'=>761,'o'=>762,'p'=>762,'q'=>759,'r'=>759,'s'=>892,'t'=>892,'u'=>788,'v'=>784,'w'=>438,'x'=>138,'y'=>277,'z'=>415,'{'=>392,'|'=>392,'}'=>668,'~'=>668,chr(127)=>0,chr(128)=>390,chr(129)=>390,chr(130)=>317,chr(131)=>317,
13
-	chr(132)=>276,chr(133)=>276,chr(134)=>509,chr(135)=>509,chr(136)=>410,chr(137)=>410,chr(138)=>234,chr(139)=>234,chr(140)=>334,chr(141)=>334,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0,
14
-	chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>0,chr(161)=>732,chr(162)=>544,chr(163)=>544,chr(164)=>910,chr(165)=>667,chr(166)=>760,chr(167)=>760,chr(168)=>776,chr(169)=>595,chr(170)=>694,chr(171)=>626,chr(172)=>788,chr(173)=>788,chr(174)=>788,chr(175)=>788,
15
-	chr(176)=>788,chr(177)=>788,chr(178)=>788,chr(179)=>788,chr(180)=>788,chr(181)=>788,chr(182)=>788,chr(183)=>788,chr(184)=>788,chr(185)=>788,chr(186)=>788,chr(187)=>788,chr(188)=>788,chr(189)=>788,chr(190)=>788,chr(191)=>788,chr(192)=>788,chr(193)=>788,chr(194)=>788,chr(195)=>788,chr(196)=>788,chr(197)=>788,
16
-	chr(198)=>788,chr(199)=>788,chr(200)=>788,chr(201)=>788,chr(202)=>788,chr(203)=>788,chr(204)=>788,chr(205)=>788,chr(206)=>788,chr(207)=>788,chr(208)=>788,chr(209)=>788,chr(210)=>788,chr(211)=>788,chr(212)=>894,chr(213)=>838,chr(214)=>1016,chr(215)=>458,chr(216)=>748,chr(217)=>924,chr(218)=>748,chr(219)=>918,
17
-	chr(220)=>927,chr(221)=>928,chr(222)=>928,chr(223)=>834,chr(224)=>873,chr(225)=>828,chr(226)=>924,chr(227)=>924,chr(228)=>917,chr(229)=>930,chr(230)=>931,chr(231)=>463,chr(232)=>883,chr(233)=>836,chr(234)=>836,chr(235)=>867,chr(236)=>867,chr(237)=>696,chr(238)=>696,chr(239)=>874,chr(240)=>0,chr(241)=>874,
18
-	chr(242)=>760,chr(243)=>946,chr(244)=>771,chr(245)=>865,chr(246)=>771,chr(247)=>888,chr(248)=>967,chr(249)=>888,chr(250)=>831,chr(251)=>873,chr(252)=>927,chr(253)=>970,chr(254)=>918,chr(255)=>0);
19
-$uv = array(32=>32,33=>array(9985,4),37=>9742,38=>array(9990,4),42=>9755,43=>9758,44=>array(9996,28),72=>9733,73=>array(10025,35),108=>9679,109=>10061,110=>9632,111=>array(10063,4),115=>9650,116=>9660,117=>9670,118=>10070,119=>9687,120=>array(10072,7),128=>array(10088,14),161=>array(10081,7),168=>9827,169=>9830,170=>9829,171=>9824,172=>array(9312,10),182=>array(10102,31),213=>8594,214=>array(8596,2),216=>array(10136,24),241=>array(10161,14));
7
+	chr(0)=>0, chr(1)=>0, chr(2)=>0, chr(3)=>0, chr(4)=>0, chr(5)=>0, chr(6)=>0, chr(7)=>0, chr(8)=>0, chr(9)=>0, chr(10)=>0, chr(11)=>0, chr(12)=>0, chr(13)=>0, chr(14)=>0, chr(15)=>0, chr(16)=>0, chr(17)=>0, chr(18)=>0, chr(19)=>0, chr(20)=>0, chr(21)=>0,
8
+	chr(22)=>0, chr(23)=>0, chr(24)=>0, chr(25)=>0, chr(26)=>0, chr(27)=>0, chr(28)=>0, chr(29)=>0, chr(30)=>0, chr(31)=>0, ' '=>278, '!'=>974, '"'=>961, '#'=>974, '$'=>980, '%'=>719, '&'=>789, '\''=>790, '('=>791, ')'=>690, '*'=>960, '+'=>939,
9
+	','=>549, '-'=>855, '.'=>911, '/'=>933, '0'=>911, '1'=>945, '2'=>974, '3'=>755, '4'=>846, '5'=>762, '6'=>761, '7'=>571, '8'=>677, '9'=>763, ':'=>760, ';'=>759, '<'=>754, '='=>494, '>'=>552, '?'=>537, '@'=>577, 'A'=>692,
10
+	'B'=>786, 'C'=>788, 'D'=>788, 'E'=>790, 'F'=>793, 'G'=>794, 'H'=>816, 'I'=>823, 'J'=>789, 'K'=>841, 'L'=>823, 'M'=>833, 'N'=>816, 'O'=>831, 'P'=>923, 'Q'=>744, 'R'=>723, 'S'=>749, 'T'=>790, 'U'=>792, 'V'=>695, 'W'=>776,
11
+	'X'=>768, 'Y'=>792, 'Z'=>759, '['=>707, '\\'=>708, ']'=>682, '^'=>701, '_'=>826, '`'=>815, 'a'=>789, 'b'=>789, 'c'=>707, 'd'=>687, 'e'=>696, 'f'=>689, 'g'=>786, 'h'=>787, 'i'=>713, 'j'=>791, 'k'=>785, 'l'=>791, 'm'=>873,
12
+	'n'=>761, 'o'=>762, 'p'=>762, 'q'=>759, 'r'=>759, 's'=>892, 't'=>892, 'u'=>788, 'v'=>784, 'w'=>438, 'x'=>138, 'y'=>277, 'z'=>415, '{'=>392, '|'=>392, '}'=>668, '~'=>668, chr(127)=>0, chr(128)=>390, chr(129)=>390, chr(130)=>317, chr(131)=>317,
13
+	chr(132)=>276, chr(133)=>276, chr(134)=>509, chr(135)=>509, chr(136)=>410, chr(137)=>410, chr(138)=>234, chr(139)=>234, chr(140)=>334, chr(141)=>334, chr(142)=>0, chr(143)=>0, chr(144)=>0, chr(145)=>0, chr(146)=>0, chr(147)=>0, chr(148)=>0, chr(149)=>0, chr(150)=>0, chr(151)=>0, chr(152)=>0, chr(153)=>0,
14
+	chr(154)=>0, chr(155)=>0, chr(156)=>0, chr(157)=>0, chr(158)=>0, chr(159)=>0, chr(160)=>0, chr(161)=>732, chr(162)=>544, chr(163)=>544, chr(164)=>910, chr(165)=>667, chr(166)=>760, chr(167)=>760, chr(168)=>776, chr(169)=>595, chr(170)=>694, chr(171)=>626, chr(172)=>788, chr(173)=>788, chr(174)=>788, chr(175)=>788,
15
+	chr(176)=>788, chr(177)=>788, chr(178)=>788, chr(179)=>788, chr(180)=>788, chr(181)=>788, chr(182)=>788, chr(183)=>788, chr(184)=>788, chr(185)=>788, chr(186)=>788, chr(187)=>788, chr(188)=>788, chr(189)=>788, chr(190)=>788, chr(191)=>788, chr(192)=>788, chr(193)=>788, chr(194)=>788, chr(195)=>788, chr(196)=>788, chr(197)=>788,
16
+	chr(198)=>788, chr(199)=>788, chr(200)=>788, chr(201)=>788, chr(202)=>788, chr(203)=>788, chr(204)=>788, chr(205)=>788, chr(206)=>788, chr(207)=>788, chr(208)=>788, chr(209)=>788, chr(210)=>788, chr(211)=>788, chr(212)=>894, chr(213)=>838, chr(214)=>1016, chr(215)=>458, chr(216)=>748, chr(217)=>924, chr(218)=>748, chr(219)=>918,
17
+	chr(220)=>927, chr(221)=>928, chr(222)=>928, chr(223)=>834, chr(224)=>873, chr(225)=>828, chr(226)=>924, chr(227)=>924, chr(228)=>917, chr(229)=>930, chr(230)=>931, chr(231)=>463, chr(232)=>883, chr(233)=>836, chr(234)=>836, chr(235)=>867, chr(236)=>867, chr(237)=>696, chr(238)=>696, chr(239)=>874, chr(240)=>0, chr(241)=>874,
18
+	chr(242)=>760, chr(243)=>946, chr(244)=>771, chr(245)=>865, chr(246)=>771, chr(247)=>888, chr(248)=>967, chr(249)=>888, chr(250)=>831, chr(251)=>873, chr(252)=>927, chr(253)=>970, chr(254)=>918, chr(255)=>0);
19
+$uv = array(32=>32, 33=>array(9985, 4), 37=>9742, 38=>array(9990, 4), 42=>9755, 43=>9758, 44=>array(9996, 28), 72=>9733, 73=>array(10025, 35), 108=>9679, 109=>10061, 110=>9632, 111=>array(10063, 4), 115=>9650, 116=>9660, 117=>9670, 118=>10070, 119=>9687, 120=>array(10072, 7), 128=>array(10088, 14), 161=>array(10081, 7), 168=>9827, 169=>9830, 170=>9829, 171=>9824, 172=>array(9312, 10), 182=>array(10102, 31), 213=>8594, 214=>array(8596, 2), 216=>array(10136, 24), 241=>array(10161, 14));
20 20
 ?>
Please login to merge, or discard this patch.
OPlathey/FPDF/font/helveticabi.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -4,18 +4,18 @@
 block discarded – undo
4 4
 $up = -100;
5 5
 $ut = 50;
6 6
 $cw = array(
7
-	chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
8
-	chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
9
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
10
-	'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
11
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
12
-	'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556,
13
-	chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
14
-	chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
15
-	chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
16
-	chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
17
-	chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
18
-	chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
7
+	chr(0)=>278, chr(1)=>278, chr(2)=>278, chr(3)=>278, chr(4)=>278, chr(5)=>278, chr(6)=>278, chr(7)=>278, chr(8)=>278, chr(9)=>278, chr(10)=>278, chr(11)=>278, chr(12)=>278, chr(13)=>278, chr(14)=>278, chr(15)=>278, chr(16)=>278, chr(17)=>278, chr(18)=>278, chr(19)=>278, chr(20)=>278, chr(21)=>278,
8
+	chr(22)=>278, chr(23)=>278, chr(24)=>278, chr(25)=>278, chr(26)=>278, chr(27)=>278, chr(28)=>278, chr(29)=>278, chr(30)=>278, chr(31)=>278, ' '=>278, '!'=>333, '"'=>474, '#'=>556, '$'=>556, '%'=>889, '&'=>722, '\''=>238, '('=>333, ')'=>333, '*'=>389, '+'=>584,
9
+	','=>278, '-'=>333, '.'=>278, '/'=>278, '0'=>556, '1'=>556, '2'=>556, '3'=>556, '4'=>556, '5'=>556, '6'=>556, '7'=>556, '8'=>556, '9'=>556, ':'=>333, ';'=>333, '<'=>584, '='=>584, '>'=>584, '?'=>611, '@'=>975, 'A'=>722,
10
+	'B'=>722, 'C'=>722, 'D'=>722, 'E'=>667, 'F'=>611, 'G'=>778, 'H'=>722, 'I'=>278, 'J'=>556, 'K'=>722, 'L'=>611, 'M'=>833, 'N'=>722, 'O'=>778, 'P'=>667, 'Q'=>778, 'R'=>722, 'S'=>667, 'T'=>611, 'U'=>722, 'V'=>667, 'W'=>944,
11
+	'X'=>667, 'Y'=>667, 'Z'=>611, '['=>333, '\\'=>278, ']'=>333, '^'=>584, '_'=>556, '`'=>333, 'a'=>556, 'b'=>611, 'c'=>556, 'd'=>611, 'e'=>556, 'f'=>333, 'g'=>611, 'h'=>611, 'i'=>278, 'j'=>278, 'k'=>556, 'l'=>278, 'm'=>889,
12
+	'n'=>611, 'o'=>611, 'p'=>611, 'q'=>611, 'r'=>389, 's'=>556, 't'=>333, 'u'=>611, 'v'=>556, 'w'=>778, 'x'=>556, 'y'=>556, 'z'=>500, '{'=>389, '|'=>280, '}'=>389, '~'=>584, chr(127)=>350, chr(128)=>556, chr(129)=>350, chr(130)=>278, chr(131)=>556,
13
+	chr(132)=>500, chr(133)=>1000, chr(134)=>556, chr(135)=>556, chr(136)=>333, chr(137)=>1000, chr(138)=>667, chr(139)=>333, chr(140)=>1000, chr(141)=>350, chr(142)=>611, chr(143)=>350, chr(144)=>350, chr(145)=>278, chr(146)=>278, chr(147)=>500, chr(148)=>500, chr(149)=>350, chr(150)=>556, chr(151)=>1000, chr(152)=>333, chr(153)=>1000,
14
+	chr(154)=>556, chr(155)=>333, chr(156)=>944, chr(157)=>350, chr(158)=>500, chr(159)=>667, chr(160)=>278, chr(161)=>333, chr(162)=>556, chr(163)=>556, chr(164)=>556, chr(165)=>556, chr(166)=>280, chr(167)=>556, chr(168)=>333, chr(169)=>737, chr(170)=>370, chr(171)=>556, chr(172)=>584, chr(173)=>333, chr(174)=>737, chr(175)=>333,
15
+	chr(176)=>400, chr(177)=>584, chr(178)=>333, chr(179)=>333, chr(180)=>333, chr(181)=>611, chr(182)=>556, chr(183)=>278, chr(184)=>333, chr(185)=>333, chr(186)=>365, chr(187)=>556, chr(188)=>834, chr(189)=>834, chr(190)=>834, chr(191)=>611, chr(192)=>722, chr(193)=>722, chr(194)=>722, chr(195)=>722, chr(196)=>722, chr(197)=>722,
16
+	chr(198)=>1000, chr(199)=>722, chr(200)=>667, chr(201)=>667, chr(202)=>667, chr(203)=>667, chr(204)=>278, chr(205)=>278, chr(206)=>278, chr(207)=>278, chr(208)=>722, chr(209)=>722, chr(210)=>778, chr(211)=>778, chr(212)=>778, chr(213)=>778, chr(214)=>778, chr(215)=>584, chr(216)=>778, chr(217)=>722, chr(218)=>722, chr(219)=>722,
17
+	chr(220)=>722, chr(221)=>667, chr(222)=>667, chr(223)=>611, chr(224)=>556, chr(225)=>556, chr(226)=>556, chr(227)=>556, chr(228)=>556, chr(229)=>556, chr(230)=>889, chr(231)=>556, chr(232)=>556, chr(233)=>556, chr(234)=>556, chr(235)=>556, chr(236)=>278, chr(237)=>278, chr(238)=>278, chr(239)=>278, chr(240)=>611, chr(241)=>611,
18
+	chr(242)=>611, chr(243)=>611, chr(244)=>611, chr(245)=>611, chr(246)=>611, chr(247)=>584, chr(248)=>611, chr(249)=>611, chr(250)=>611, chr(251)=>611, chr(252)=>611, chr(253)=>556, chr(254)=>611, chr(255)=>556);
19 19
 $enc = 'cp1252';
20
-$uv = array(0=>array(0,128),128=>8364,130=>8218,131=>402,132=>8222,133=>8230,134=>array(8224,2),136=>710,137=>8240,138=>352,139=>8249,140=>338,142=>381,145=>array(8216,2),147=>array(8220,2),149=>8226,150=>array(8211,2),152=>732,153=>8482,154=>353,155=>8250,156=>339,158=>382,159=>376,160=>array(160,96));
20
+$uv = array(0=>array(0, 128), 128=>8364, 130=>8218, 131=>402, 132=>8222, 133=>8230, 134=>array(8224, 2), 136=>710, 137=>8240, 138=>352, 139=>8249, 140=>338, 142=>381, 145=>array(8216, 2), 147=>array(8220, 2), 149=>8226, 150=>array(8211, 2), 152=>732, 153=>8482, 154=>353, 155=>8250, 156=>339, 158=>382, 159=>376, 160=>array(160, 96));
21 21
 ?>
Please login to merge, or discard this patch.
OPlathey/FPDF/font/courieri.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@
 block discarded – undo
3 3
 $name = 'Courier-Oblique';
4 4
 $up = -100;
5 5
 $ut = 50;
6
-for($i=0;$i<=255;$i++)
6
+for ($i = 0; $i <= 255; $i++)
7 7
 	$cw[chr($i)] = 600;
8 8
 $enc = 'cp1252';
9
-$uv = array(0=>array(0,128),128=>8364,130=>8218,131=>402,132=>8222,133=>8230,134=>array(8224,2),136=>710,137=>8240,138=>352,139=>8249,140=>338,142=>381,145=>array(8216,2),147=>array(8220,2),149=>8226,150=>array(8211,2),152=>732,153=>8482,154=>353,155=>8250,156=>339,158=>382,159=>376,160=>array(160,96));
9
+$uv = array(0=>array(0, 128), 128=>8364, 130=>8218, 131=>402, 132=>8222, 133=>8230, 134=>array(8224, 2), 136=>710, 137=>8240, 138=>352, 139=>8249, 140=>338, 142=>381, 145=>array(8216, 2), 147=>array(8220, 2), 149=>8226, 150=>array(8211, 2), 152=>732, 153=>8482, 154=>353, 155=>8250, 156=>339, 158=>382, 159=>376, 160=>array(160, 96));
10 10
 ?>
Please login to merge, or discard this patch.
OPlathey/FPDF/FPDF.php 1 patch
Spacing   +547 added lines, -547 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 * http://www.fpdf.org/en/doc/index.php
25 25
 *******************************************************************************/
26 26
 
27
-define('FPDF_VERSION','1.82');
27
+define('FPDF_VERSION', '1.82');
28 28
 
29 29
 class FPDF
30 30
 {
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
      *                              or an array containing the width and the height (expressed in the unit given by unit). <br/>
174 174
      *                              Default value is 'A4'.
175 175
      */
176
-    public function __construct(string $orientation='P', string $unit='mm', $size='A4')
176
+    public function __construct(string $orientation = 'P', string $unit = 'mm', $size = 'A4')
177 177
     {
178 178
     	// Some checks
179 179
     	$this->_dochecks();
@@ -204,65 +204,65 @@  discard block
 block discarded – undo
204 204
     	$this->WithAlpha = false;
205 205
     	$this->ws = 0;
206 206
     	// Font path
207
-    	if(defined('FPDF_FONTPATH'))
207
+    	if (defined('FPDF_FONTPATH'))
208 208
     	{
209 209
     		$this->fontpath = FPDF_FONTPATH;
210
-    		if(substr($this->fontpath,-1)!='/' && substr($this->fontpath,-1)!='\\')
210
+    		if (substr($this->fontpath, -1) != '/' && substr($this->fontpath, -1) != '\\')
211 211
     			$this->fontpath .= '/';
212 212
     	}
213
-    	elseif(is_dir(dirname(__FILE__).'/font'))
214
-    		$this->fontpath = dirname(__FILE__).'/font/';
213
+    	elseif (is_dir(dirname(__FILE__) . '/font'))
214
+    		$this->fontpath = dirname(__FILE__) . '/font/';
215 215
     	else
216 216
     		$this->fontpath = '';
217 217
     	// Core fonts
218 218
     	$this->CoreFonts = array('courier', 'helvetica', 'times', 'symbol', 'zapfdingbats');
219 219
     	// Scale factor
220
-    	if($unit=='pt')
220
+    	if ($unit == 'pt')
221 221
     		$this->k = 1;
222
-    	elseif($unit=='mm')
223
-    		$this->k = 72/25.4;
224
-    	elseif($unit=='cm')
225
-    		$this->k = 72/2.54;
226
-    	elseif($unit=='in')
222
+    	elseif ($unit == 'mm')
223
+    		$this->k = 72 / 25.4;
224
+    	elseif ($unit == 'cm')
225
+    		$this->k = 72 / 2.54;
226
+    	elseif ($unit == 'in')
227 227
     		$this->k = 72;
228 228
     	else
229
-    		$this->Error('Incorrect unit: '.$unit);
229
+    		$this->Error('Incorrect unit: ' . $unit);
230 230
     	// Page sizes
231
-    	$this->StdPageSizes = array('a3'=>array(841.89,1190.55), 'a4'=>array(595.28,841.89), 'a5'=>array(420.94,595.28),
232
-    		'letter'=>array(612,792), 'legal'=>array(612,1008));
231
+    	$this->StdPageSizes = array('a3'=>array(841.89, 1190.55), 'a4'=>array(595.28, 841.89), 'a5'=>array(420.94, 595.28),
232
+    		'letter'=>array(612, 792), 'legal'=>array(612, 1008));
233 233
     	$size = $this->_getpagesize($size);
234 234
     	$this->DefPageSize = $size;
235 235
     	$this->CurPageSize = $size;
236 236
     	// Page orientation
237 237
     	$orientation = strtolower($orientation);
238
-    	if($orientation=='p' || $orientation=='portrait')
238
+    	if ($orientation == 'p' || $orientation == 'portrait')
239 239
     	{
240 240
     		$this->DefOrientation = 'P';
241 241
     		$this->w = $size[0];
242 242
     		$this->h = $size[1];
243 243
     	}
244
-    	elseif($orientation=='l' || $orientation=='landscape')
244
+    	elseif ($orientation == 'l' || $orientation == 'landscape')
245 245
     	{
246 246
     		$this->DefOrientation = 'L';
247 247
     		$this->w = $size[1];
248 248
     		$this->h = $size[0];
249 249
     	}
250 250
     	else
251
-    		$this->Error('Incorrect orientation: '.$orientation);
251
+    		$this->Error('Incorrect orientation: ' . $orientation);
252 252
     	$this->CurOrientation = $this->DefOrientation;
253
-    	$this->wPt = $this->w*$this->k;
254
-    	$this->hPt = $this->h*$this->k;
253
+    	$this->wPt = $this->w * $this->k;
254
+    	$this->hPt = $this->h * $this->k;
255 255
     	// Page rotation
256 256
     	$this->CurRotation = 0;
257 257
     	// Page margins (1 cm)
258
-    	$margin = 28.35/$this->k;
259
-    	$this->setMargins($margin,$margin);
258
+    	$margin = 28.35 / $this->k;
259
+    	$this->setMargins($margin, $margin);
260 260
     	// Interior cell margin (1 mm)
261
-    	$this->cMargin = $margin/10;
261
+    	$this->cMargin = $margin / 10;
262 262
     	// Line width (0.2 mm)
263
-    	$this->LineWidth = .567/$this->k;
263
+    	$this->LineWidth = .567 / $this->k;
264 264
     	// Automatic page break
265
-    	$this->setAutoPageBreak(true,2*$margin);
265
+    	$this->setAutoPageBreak(true, 2 * $margin);
266 266
     	// Default display mode
267 267
     	$this->setDisplayMode('default');
268 268
     	// Enable compression
@@ -278,12 +278,12 @@  discard block
 block discarded – undo
278 278
      * @param float $top    Top margin.
279 279
      * @param float $right  Right margin. Default value is the left one.
280 280
      */
281
-    public function SetMargins(float $left, float $top, ?float $right=null) : void
281
+    public function SetMargins(float $left, float $top, ?float $right = null) : void
282 282
     {
283 283
     	// Set left, top and right margins
284 284
     	$this->lMargin = $left;
285 285
     	$this->tMargin = $top;
286
-    	if($right===null)
286
+    	if ($right === null)
287 287
     		$right = $left;
288 288
     	$this->rMargin = $right;
289 289
     }
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
     {
299 299
     	// Set left margin
300 300
     	$this->lMargin = $margin;
301
-    	if($this->page>0 && $this->x<$margin)
301
+    	if ($this->page > 0 && $this->x < $margin)
302 302
     		$this->x = $margin;
303 303
     }
304 304
 
@@ -332,12 +332,12 @@  discard block
 block discarded – undo
332 332
      * @param bool $auto    indicating if mode should be on or off. 
333 333
      * @param float $margin Distance from the bottom of the page. 
334 334
      */
335
-    public function SetAutoPageBreak(bool $auto, float $margin=0) : void
335
+    public function SetAutoPageBreak(bool $auto, float $margin = 0) : void
336 336
     {
337 337
     	// Set auto page break mode and triggering margin
338 338
     	$this->AutoPageBreak = $auto;
339 339
     	$this->bMargin = $margin;
340
-    	$this->PageBreakTrigger = $this->h-$margin;
340
+    	$this->PageBreakTrigger = $this->h - $margin;
341 341
     }
342 342
 
343 343
     /**
@@ -368,17 +368,17 @@  discard block
 block discarded – undo
368 368
      *                              <li> 'defaul't: uses viewer default mode </li></ul>
369 369
      *                              Default value is default. 
370 370
      */
371
-    public function SetDisplayMode($zoom, string $layout='default') : void
371
+    public function SetDisplayMode($zoom, string $layout = 'default') : void
372 372
     {
373 373
     	// Set display mode in viewer
374
-    	if($zoom=='fullpage' || $zoom=='fullwidth' || $zoom=='real' || $zoom=='default' || !is_string($zoom))
374
+    	if ($zoom == 'fullpage' || $zoom == 'fullwidth' || $zoom == 'real' || $zoom == 'default' || !is_string($zoom))
375 375
     		$this->ZoomMode = $zoom;
376 376
     	else
377
-    		$this->Error('Incorrect zoom display mode: '.$zoom);
378
-    	if($layout=='single' || $layout=='continuous' || $layout=='two' || $layout=='default')
377
+    		$this->Error('Incorrect zoom display mode: ' . $zoom);
378
+    	if ($layout == 'single' || $layout == 'continuous' || $layout == 'two' || $layout == 'default')
379 379
     		$this->LayoutMode = $layout;
380 380
     	else
381
-    		$this->Error('Incorrect layout display mode: '.$layout);
381
+    		$this->Error('Incorrect layout display mode: ' . $layout);
382 382
     }
383 383
 
384 384
     /**
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
     public function SetCompression(bool $compress) : void
394 394
     {
395 395
     	// Set page compression
396
-    	if(function_exists('gzcompress'))
396
+    	if (function_exists('gzcompress'))
397 397
     		$this->compress = $compress;
398 398
     	else
399 399
     		$this->compress = false;
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
      * @param string $title The title.
405 405
      * @param bool $isUTF8  Indicates if the string is encoded in ISO-8859-1 (false) or UTF-8 (true). Default value: false. 
406 406
      */
407
-    public function SetTitle(string $title, bool $isUTF8=false) : void
407
+    public function SetTitle(string $title, bool $isUTF8 = false) : void
408 408
     {
409 409
     	// Title of document
410 410
     	$this->metadata['Title'] = $isUTF8 ? $title : utf8_encode($title);
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
      * @param string $author
416 416
      * @param bool $isUTF8  Indicates if the string is encoded in ISO-8859-1 (false) or UTF-8 (true). Default value: false.
417 417
      */
418
-    public function SetAuthor(string $author, bool $isUTF8=false) : void
418
+    public function SetAuthor(string $author, bool $isUTF8 = false) : void
419 419
     {
420 420
     	// Author of document
421 421
     	$this->metadata['Author'] = $isUTF8 ? $author : utf8_encode($author);
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
      * @param string $subject
427 427
      * @param bool $isUTF8  Indicates if the string is encoded in ISO-8859-1 (false) or UTF-8 (true). Default value: false.
428 428
      */
429
-    public function SetSubject(string $subject, bool $isUTF8=false) : void
429
+    public function SetSubject(string $subject, bool $isUTF8 = false) : void
430 430
     {
431 431
     	// Subject of document
432 432
     	$this->metadata['Subject'] = $isUTF8 ? $subject : utf8_encode($subject);
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
      * @param string $keywords
438 438
      * @param bool $isUTF8  Indicates if the string is encoded in ISO-8859-1 (false) or UTF-8 (true). Default value: false.
439 439
      */
440
-    public function SetKeywords(string $keywords, bool $isUTF8=false) : void
440
+    public function SetKeywords(string $keywords, bool $isUTF8 = false) : void
441 441
     {
442 442
     	// Keywords of document
443 443
     	$this->metadata['Keywords'] = $isUTF8 ? $keywords : utf8_encode($keywords);
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
      * @param string $creator
449 449
      * @param bool $isUTF8  Indicates if the string is encoded in ISO-8859-1 (false) or UTF-8 (true). Default value: false.
450 450
      */
451
-    public function SetCreator(string $creator, bool $isUTF8=false) : void
451
+    public function SetCreator(string $creator, bool $isUTF8 = false) : void
452 452
     {
453 453
     	// Creator of document
454 454
     	$this->metadata['Creator'] = $isUTF8 ? $creator : utf8_encode($creator);
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
      * Defines an alias for the total number of pages. It will be substituted as the document is closed. 
459 459
      * @param string $alias The alias. Default value: {nb}. 
460 460
      */
461
-    public function AliasNbPages(string $alias='{nb}') : void
461
+    public function AliasNbPages(string $alias = '{nb}') : void
462 462
     {
463 463
     	// Define an alias for total number of pages
464 464
     	$this->AliasNbPages = $alias;
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
     public function Error(string $msg) : void
476 476
     {
477 477
     	// Fatal error
478
-    	throw new \Exception('FPDF error: '.$msg);
478
+    	throw new \Exception('FPDF error: ' . $msg);
479 479
     }
480 480
     
481 481
     /**
@@ -487,9 +487,9 @@  discard block
 block discarded – undo
487 487
     public function Close() : void
488 488
     {
489 489
     	// Terminate document
490
-    	if($this->state==3)
490
+    	if ($this->state == 3)
491 491
     		return;
492
-    	if($this->page==0)
492
+    	if ($this->page == 0)
493 493
     		$this->addPage();
494 494
     	// Page footer
495 495
     	$this->InFooter = true;
@@ -529,20 +529,20 @@  discard block
 block discarded – undo
529 529
      *                              It must be a multiple of 90; positive values mean clockwise rotation. </br>
530 530
      *                              The default value is 0.
531 531
      */
532
-    public function AddPage(string $orientation='', $size='', int $rotation=0) : void
532
+    public function AddPage(string $orientation = '', $size = '', int $rotation = 0) : void
533 533
     {
534 534
     	// Start a new page
535
-    	if($this->state==3)
535
+    	if ($this->state == 3)
536 536
     		$this->Error('The document is closed');
537 537
     	$family = $this->FontFamily;
538
-    	$style = $this->FontStyle.($this->underline ? 'U' : '');
538
+    	$style = $this->FontStyle . ($this->underline ? 'U' : '');
539 539
     	$fontsize = $this->FontSizePt;
540 540
     	$lw = $this->LineWidth;
541 541
     	$dc = $this->DrawColor;
542 542
     	$fc = $this->FillColor;
543 543
     	$tc = $this->TextColor;
544 544
     	$cf = $this->ColorFlag;
545
-    	if($this->page>0)
545
+    	if ($this->page > 0)
546 546
     	{
547 547
     		// Page footer
548 548
     		$this->InFooter = true;
@@ -552,21 +552,21 @@  discard block
 block discarded – undo
552 552
     		$this->_endpage();
553 553
     	}
554 554
     	// Start new page
555
-    	$this->_beginpage($orientation,$size,$rotation);
555
+    	$this->_beginpage($orientation, $size, $rotation);
556 556
     	// Set line cap style to square
557 557
     	$this->_out('2 J');
558 558
     	// Set line width
559 559
     	$this->LineWidth = $lw;
560
-    	$this->_out(sprintf('%.2F w',$lw*$this->k));
560
+    	$this->_out(sprintf('%.2F w', $lw * $this->k));
561 561
     	// Set font
562
-    	if($family)
563
-    		$this->setFont($family,$style,$fontsize);
562
+    	if ($family)
563
+    		$this->setFont($family, $style, $fontsize);
564 564
     	// Set colors
565 565
     	$this->DrawColor = $dc;
566
-    	if($dc!='0 G')
566
+    	if ($dc != '0 G')
567 567
     		$this->_out($dc);
568 568
     	$this->FillColor = $fc;
569
-    	if($fc!='0 g')
569
+    	if ($fc != '0 g')
570 570
     		$this->_out($fc);
571 571
     	$this->TextColor = $tc;
572 572
     	$this->ColorFlag = $cf;
@@ -575,21 +575,21 @@  discard block
 block discarded – undo
575 575
     	$this->Header();
576 576
     	$this->InHeader = false;
577 577
     	// Restore line width
578
-    	if($this->LineWidth!=$lw)
578
+    	if ($this->LineWidth != $lw)
579 579
     	{
580 580
     		$this->LineWidth = $lw;
581
-    		$this->_out(sprintf('%.2F w',$lw*$this->k));
581
+    		$this->_out(sprintf('%.2F w', $lw * $this->k));
582 582
     	}
583 583
     	// Restore font
584
-    	if($family)
585
-    		$this->setFont($family,$style,$fontsize);
584
+    	if ($family)
585
+    		$this->setFont($family, $style, $fontsize);
586 586
     	// Restore colors
587
-    	if($this->DrawColor!=$dc)
587
+    	if ($this->DrawColor != $dc)
588 588
     	{
589 589
     		$this->DrawColor = $dc;
590 590
     		$this->_out($dc);
591 591
     	}
592
-    	if($this->FillColor!=$fc)
592
+    	if ($this->FillColor != $fc)
593 593
     	{
594 594
     		$this->FillColor = $fc;
595 595
     		$this->_out($fc);
@@ -638,14 +638,14 @@  discard block
 block discarded – undo
638 638
      * @param int $g    Green component (between 0 and 255).
639 639
      * @param int $b    Blue component (between 0 and 255).
640 640
      */
641
-    public function SetDrawColor(int $r, ?int $g=null, ?int $b=null) : void
641
+    public function SetDrawColor(int $r, ?int $g = null, ?int $b = null) : void
642 642
     {
643 643
     	// Set color for all stroking operations
644
-    	if(($r==0 && $g==0 && $b==0) || $g===null)
645
-    		$this->DrawColor = sprintf('%.3F G',$r/255);
644
+    	if (($r == 0 && $g == 0 && $b == 0) || $g === null)
645
+    		$this->DrawColor = sprintf('%.3F G', $r / 255);
646 646
     	else
647
-    		$this->DrawColor = sprintf('%.3F %.3F %.3F RG',$r/255,$g/255,$b/255);
648
-    	if($this->page>0)
647
+    		$this->DrawColor = sprintf('%.3F %.3F %.3F RG', $r / 255, $g / 255, $b / 255);
648
+    	if ($this->page > 0)
649 649
     		$this->_out($this->DrawColor);
650 650
     }
651 651
     
@@ -657,15 +657,15 @@  discard block
 block discarded – undo
657 657
      * @param int $g    Green component (between 0 and 255).
658 658
      * @param int $b    Blue component (between 0 and 255).
659 659
      */
660
-    public function SetFillColor(int $r, ?int $g=null, ?int $b=null) : void
660
+    public function SetFillColor(int $r, ?int $g = null, ?int $b = null) : void
661 661
     {
662 662
     	// Set color for all filling operations
663
-    	if(($r==0 && $g==0 && $b==0) || $g===null)
664
-    		$this->FillColor = sprintf('%.3F g',$r/255);
663
+    	if (($r == 0 && $g == 0 && $b == 0) || $g === null)
664
+    		$this->FillColor = sprintf('%.3F g', $r / 255);
665 665
     	else
666
-    		$this->FillColor = sprintf('%.3F %.3F %.3F rg',$r/255,$g/255,$b/255);
667
-    	$this->ColorFlag = ($this->FillColor!=$this->TextColor);
668
-    	if($this->page>0)
666
+    		$this->FillColor = sprintf('%.3F %.3F %.3F rg', $r / 255, $g / 255, $b / 255);
667
+    	$this->ColorFlag = ($this->FillColor != $this->TextColor);
668
+    	if ($this->page > 0)
669 669
     		$this->_out($this->FillColor);
670 670
     }
671 671
     
@@ -677,14 +677,14 @@  discard block
 block discarded – undo
677 677
      * @param int $g    Green component (between 0 and 255).
678 678
      * @param int $b    Blue component (between 0 and 255).
679 679
      */
680
-    public function SetTextColor(int $r, ?int $g=null, ?int $b=null) : void
680
+    public function SetTextColor(int $r, ?int $g = null, ?int $b = null) : void
681 681
     {
682 682
     	// Set color for text
683
-    	if(($r==0 && $g==0 && $b==0) || $g===null)
684
-    		$this->TextColor = sprintf('%.3F g',$r/255);
683
+    	if (($r == 0 && $g == 0 && $b == 0) || $g === null)
684
+    		$this->TextColor = sprintf('%.3F g', $r / 255);
685 685
     	else
686
-    		$this->TextColor = sprintf('%.3F %.3F %.3F rg',$r/255,$g/255,$b/255);
687
-    	$this->ColorFlag = ($this->FillColor!=$this->TextColor);
686
+    		$this->TextColor = sprintf('%.3F %.3F %.3F rg', $r / 255, $g / 255, $b / 255);
687
+    	$this->ColorFlag = ($this->FillColor != $this->TextColor);
688 688
     }
689 689
     
690 690
     /**
@@ -696,13 +696,13 @@  discard block
 block discarded – undo
696 696
     public function GetStringWidth(string $s) : float
697 697
     {
698 698
     	// Get width of a string in the current font
699
-    	$s = (string)$s;
699
+    	$s = (string) $s;
700 700
     	$cw = &$this->CurrentFont['cw'];
701 701
     	$w = 0;
702 702
     	$l = strlen($s);
703
-    	for($i=0;$i<$l;$i++)
703
+    	for ($i = 0; $i < $l; $i++)
704 704
     		$w += $cw[$s[$i]];
705
-    	return $w*$this->FontSize/1000;
705
+    	return $w * $this->FontSize / 1000;
706 706
     }
707 707
     
708 708
     /**
@@ -715,8 +715,8 @@  discard block
 block discarded – undo
715 715
     {
716 716
     	// Set line width
717 717
     	$this->LineWidth = $width;
718
-    	if($this->page>0)
719
-    		$this->_out(sprintf('%.2F w',$width*$this->k));
718
+    	if ($this->page > 0)
719
+    		$this->_out(sprintf('%.2F w', $width * $this->k));
720 720
     }
721 721
     
722 722
     /**
@@ -731,7 +731,7 @@  discard block
 block discarded – undo
731 731
     public function Line(float $x1, float $y1, float $x2, float $y2) : void
732 732
     {
733 733
     	// Draw a line
734
-    	$this->_out(sprintf('%.2F %.2F m %.2F %.2F l S',$x1*$this->k,($this->h-$y1)*$this->k,$x2*$this->k,($this->h-$y2)*$this->k));
734
+    	$this->_out(sprintf('%.2F %.2F m %.2F %.2F l S', $x1 * $this->k, ($this->h - $y1) * $this->k, $x2 * $this->k, ($this->h - $y2) * $this->k));
735 735
     }
736 736
 
737 737
     /**
@@ -749,16 +749,16 @@  discard block
 block discarded – undo
749 749
      *                      <li>   'F': fill. </li>
750 750
      *                      <li>   'DF' or 'FD': draw the shape and fill. </li></ul>
751 751
      */
752
-    public function Rect(float $x, float $y, float $w, float $h, string $style='') : void
752
+    public function Rect(float $x, float $y, float $w, float $h, string $style = '') : void
753 753
     {
754 754
     	// Draw a rectangle
755
-    	if($style=='F')
755
+    	if ($style == 'F')
756 756
     		$op = 'f';
757
-    	elseif($style=='FD' || $style=='DF')
757
+    	elseif ($style == 'FD' || $style == 'DF')
758 758
     		$op = 'B';
759 759
     	else
760 760
     		$op = 'S';
761
-    	$this->_out(sprintf('%.2F %.2F %.2F %.2F re %s',$x*$this->k,($this->h-$y)*$this->k,$w*$this->k,-$h*$this->k,$op));
761
+    	$this->_out(sprintf('%.2F %.2F %.2F %.2F re %s', $x * $this->k, ($this->h - $y) * $this->k, $w * $this->k, -$h * $this->k, $op));
762 762
     }
763 763
     
764 764
     /**
@@ -778,24 +778,24 @@  discard block
 block discarded – undo
778 778
      * @param string $file      The font definition file. <br/>
779 779
      *                          By default, the name is built from the family and style, in lower case with no space.
780 780
      */
781
-    public function AddFont(string $family, string $style='', string $file='') : void
781
+    public function AddFont(string $family, string $style = '', string $file = '') : void
782 782
     {
783 783
     	// Add a TrueType, OpenType or Type1 font
784 784
     	$family = strtolower($family);
785
-    	if($file=='')
786
-    		$file = str_replace(' ','',$family).strtolower($style).'.php';
785
+    	if ($file == '')
786
+    		$file = str_replace(' ', '', $family) . strtolower($style) . '.php';
787 787
     	$style = strtoupper($style);
788
-    	if($style=='IB')
788
+    	if ($style == 'IB')
789 789
     		$style = 'BI';
790
-    	$fontkey = $family.$style;
791
-    	if(isset($this->fonts[$fontkey]))
790
+    	$fontkey = $family . $style;
791
+    	if (isset($this->fonts[$fontkey]))
792 792
     		return;
793 793
     	$info = $this->_loadfont($file);
794
-    	$info['i'] = count($this->fonts)+1;
795
-    	if(!empty($info['file']))
794
+    	$info['i'] = count($this->fonts) + 1;
795
+    	if (!empty($info['file']))
796 796
     	{
797 797
     		// Embedded font
798
-    		if($info['type']=='TrueType')
798
+    		if ($info['type'] == 'TrueType')
799 799
     			$this->FontFiles[$info['file']] = array('length1'=>$info['originalsize']);
800 800
     		else
801 801
     			$this->FontFiles[$info['file']] = array('length1'=>$info['size1'], 'length2'=>$info['size2']);
@@ -838,54 +838,54 @@  discard block
 block discarded – undo
838 838
      *                          The default value is the current size. <br/>
839 839
      *                          If no size has been specified since the beginning of the document, the value taken is 12.
840 840
      */
841
-    public function SetFont(string $family, string $style='', float $size=0) : void
841
+    public function SetFont(string $family, string $style = '', float $size = 0) : void
842 842
     {
843 843
     	// Select a font; size given in points
844
-    	if($family=='')
844
+    	if ($family == '')
845 845
     		$family = $this->FontFamily;
846 846
     	else
847 847
     		$family = strtolower($family);
848 848
     	$style = strtoupper($style);
849
-    	if(strpos($style,'U')!==false)
849
+    	if (strpos($style, 'U') !== false)
850 850
     	{
851 851
     		$this->underline = true;
852
-    		$style = str_replace('U','',$style);
852
+    		$style = str_replace('U', '', $style);
853 853
     	}
854 854
     	else
855 855
     		$this->underline = false;
856
-    	if($style=='IB')
856
+    	if ($style == 'IB')
857 857
     		$style = 'BI';
858
-    	if($size==0)
858
+    	if ($size == 0)
859 859
     		$size = $this->FontSizePt;
860 860
     	// Test if font is already selected
861
-    	if($this->FontFamily==$family && $this->FontStyle==$style && $this->FontSizePt==$size)
861
+    	if ($this->FontFamily == $family && $this->FontStyle == $style && $this->FontSizePt == $size)
862 862
     		return;
863 863
     	// Test if font is already loaded
864
-    	$fontkey = $family.$style;
865
-    	if(!isset($this->fonts[$fontkey]))
864
+    	$fontkey = $family . $style;
865
+    	if (!isset($this->fonts[$fontkey]))
866 866
     	{
867 867
     		// Test if one of the core fonts
868
-    		if($family=='arial')
868
+    		if ($family == 'arial')
869 869
     			$family = 'helvetica';
870
-    		if(in_array($family,$this->CoreFonts))
870
+    		if (in_array($family, $this->CoreFonts))
871 871
     		{
872
-    			if($family=='symbol' || $family=='zapfdingbats')
872
+    			if ($family == 'symbol' || $family == 'zapfdingbats')
873 873
     				$style = '';
874
-    			$fontkey = $family.$style;
875
-    			if(!isset($this->fonts[$fontkey]))
876
-    				$this->addFont($family,$style);
874
+    			$fontkey = $family . $style;
875
+    			if (!isset($this->fonts[$fontkey]))
876
+    				$this->addFont($family, $style);
877 877
     		}
878 878
     		else
879
-    			$this->Error('Undefined font: '.$family.' '.$style);
879
+    			$this->Error('Undefined font: ' . $family . ' ' . $style);
880 880
     	}
881 881
     	// Select it
882 882
     	$this->FontFamily = $family;
883 883
     	$this->FontStyle = $style;
884 884
     	$this->FontSizePt = $size;
885
-    	$this->FontSize = $size/$this->k;
885
+    	$this->FontSize = $size / $this->k;
886 886
     	$this->CurrentFont = &$this->fonts[$fontkey];
887
-    	if($this->page>0)
888
-    		$this->_out(sprintf('BT /F%d %.2F Tf ET',$this->CurrentFont['i'],$this->FontSizePt));
887
+    	if ($this->page > 0)
888
+    		$this->_out(sprintf('BT /F%d %.2F Tf ET', $this->CurrentFont['i'], $this->FontSizePt));
889 889
     }
890 890
     
891 891
     /**
@@ -895,12 +895,12 @@  discard block
 block discarded – undo
895 895
     public function SetFontSize(float $size) : void
896 896
     {
897 897
     	// Set font size in points
898
-    	if($this->FontSizePt==$size)
898
+    	if ($this->FontSizePt == $size)
899 899
     		return;
900 900
     	$this->FontSizePt = $size;
901
-    	$this->FontSize = $size/$this->k;
902
-    	if($this->page>0)
903
-    		$this->_out(sprintf('BT /F%d %.2F Tf ET',$this->CurrentFont['i'],$this->FontSizePt));
901
+    	$this->FontSize = $size / $this->k;
902
+    	if ($this->page > 0)
903
+    		$this->_out(sprintf('BT /F%d %.2F Tf ET', $this->CurrentFont['i'], $this->FontSizePt));
904 904
     }
905 905
     
906 906
     /**
@@ -913,7 +913,7 @@  discard block
 block discarded – undo
913 913
     public function AddLink() : int
914 914
     {
915 915
     	// Create a new internal link
916
-    	$n = count($this->links)+1;
916
+    	$n = count($this->links) + 1;
917 917
     	$this->links[$n] = array(0, 0);
918 918
     	return $n;
919 919
     }
@@ -924,12 +924,12 @@  discard block
 block discarded – undo
924 924
      * @param float $y  Y-position of target position; -1 indicates the current position. The default value is 0 (top of page).
925 925
      * @param int $page Number of target page; -1 indicates the current page. This is the default value.
926 926
      */
927
-    public function SetLink(int $link, float $y=0, int $page=-1) : void
927
+    public function SetLink(int $link, float $y = 0, int $page = -1) : void
928 928
     {
929 929
     	// Set destination of internal link
930
-    	if($y==-1)
930
+    	if ($y == -1)
931 931
     		$y = $this->y;
932
-    	if($page==-1)
932
+    	if ($page == -1)
933 933
     		$page = $this->page;
934 934
     	$this->links[$link] = array($page, $y);
935 935
     }
@@ -948,7 +948,7 @@  discard block
 block discarded – undo
948 948
     public function Link(float $x, float $y, float $w, float $h, $link) : void
949 949
     {
950 950
     	// Put a link on the page
951
-    	$this->PageLinks[$this->page][] = array($x*$this->k, $this->hPt-$y*$this->k, $w*$this->k, $h*$this->k, $link);
951
+    	$this->PageLinks[$this->page][] = array($x * $this->k, $this->hPt - $y * $this->k, $w * $this->k, $h * $this->k, $link);
952 952
     }
953 953
     
954 954
     /**
@@ -964,13 +964,13 @@  discard block
 block discarded – undo
964 964
     public function Text(float $x, float $y, string $txt) : void
965 965
     {
966 966
     	// Output a string
967
-    	if(!isset($this->CurrentFont))
967
+    	if (!isset($this->CurrentFont))
968 968
     		$this->Error('No font has been set');
969
-    	$s = sprintf('BT %.2F %.2F Td (%s) Tj ET',$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt));
970
-    	if($this->underline && $txt!='')
971
-    		$s .= ' '.$this->_dounderline($x,$y,$txt);
972
-    	if($this->ColorFlag)
973
-    		$s = 'q '.$this->TextColor.' '.$s.' Q';
969
+    	$s = sprintf('BT %.2F %.2F Td (%s) Tj ET', $x * $this->k, ($this->h - $y) * $this->k, $this->_escape($txt));
970
+    	if ($this->underline && $txt != '')
971
+    		$s .= ' ' . $this->_dounderline($x, $y, $txt);
972
+    	if ($this->ColorFlag)
973
+    		$s = 'q ' . $this->TextColor . ' ' . $s . ' Q';
974 974
     	$this->_out($s);
975 975
     }
976 976
     
@@ -1028,80 +1028,80 @@  discard block
 block discarded – undo
1028 1028
      *                          Default value: false. <br/>
1029 1029
      * @param string|int $link  URL or identifier for internal link created by AddLink().
1030 1030
      */
1031
-    public function Cell(float $w, float $h=0, string $txt='', $border=0, float $ln=0, $align='', $fill=false, $link='') : void
1031
+    public function Cell(float $w, float $h = 0, string $txt = '', $border = 0, float $ln = 0, $align = '', $fill = false, $link = '') : void
1032 1032
     {
1033 1033
     	// Output a cell
1034 1034
     	$k = $this->k;
1035
-    	if($this->y+$h>$this->PageBreakTrigger && !$this->InHeader && !$this->InFooter && $this->AcceptPageBreak())
1035
+    	if ($this->y + $h > $this->PageBreakTrigger && !$this->InHeader && !$this->InFooter && $this->AcceptPageBreak())
1036 1036
     	{
1037 1037
     		// Automatic page break
1038 1038
     		$x = $this->x;
1039 1039
     		$ws = $this->ws;
1040
-    		if($ws>0)
1040
+    		if ($ws > 0)
1041 1041
     		{
1042 1042
     			$this->ws = 0;
1043 1043
     			$this->_out('0 Tw');
1044 1044
     		}
1045
-    		$this->addPage($this->CurOrientation,$this->CurPageSize,$this->CurRotation);
1045
+    		$this->addPage($this->CurOrientation, $this->CurPageSize, $this->CurRotation);
1046 1046
     		$this->x = $x;
1047
-    		if($ws>0)
1047
+    		if ($ws > 0)
1048 1048
     		{
1049 1049
     			$this->ws = $ws;
1050
-    			$this->_out(sprintf('%.3F Tw',$ws*$k));
1050
+    			$this->_out(sprintf('%.3F Tw', $ws * $k));
1051 1051
     		}
1052 1052
     	}
1053
-    	if($w==0)
1054
-    		$w = $this->w-$this->rMargin-$this->x;
1053
+    	if ($w == 0)
1054
+    		$w = $this->w - $this->rMargin - $this->x;
1055 1055
     	$s = '';
1056
-    	if($fill || $border==1)
1056
+    	if ($fill || $border == 1)
1057 1057
     	{
1058
-    		if($fill)
1059
-    			$op = ($border==1) ? 'B' : 'f';
1058
+    		if ($fill)
1059
+    			$op = ($border == 1) ? 'B' : 'f';
1060 1060
     		else
1061 1061
     			$op = 'S';
1062
-    		$s = sprintf('%.2F %.2F %.2F %.2F re %s ',$this->x*$k,($this->h-$this->y)*$k,$w*$k,-$h*$k,$op);
1062
+    		$s = sprintf('%.2F %.2F %.2F %.2F re %s ', $this->x * $k, ($this->h - $this->y) * $k, $w * $k, -$h * $k, $op);
1063 1063
     	}
1064
-    	if(is_string($border))
1064
+    	if (is_string($border))
1065 1065
     	{
1066 1066
     		$x = $this->x;
1067 1067
     		$y = $this->y;
1068
-    		if(strpos($border,'L')!==false)
1069
-    			$s .= sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-$y)*$k,$x*$k,($this->h-($y+$h))*$k);
1070
-    		if(strpos($border,'T')!==false)
1071
-    			$s .= sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-$y)*$k,($x+$w)*$k,($this->h-$y)*$k);
1072
-    		if(strpos($border,'R')!==false)
1073
-    			$s .= sprintf('%.2F %.2F m %.2F %.2F l S ',($x+$w)*$k,($this->h-$y)*$k,($x+$w)*$k,($this->h-($y+$h))*$k);
1074
-    		if(strpos($border,'B')!==false)
1075
-    			$s .= sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-($y+$h))*$k,($x+$w)*$k,($this->h-($y+$h))*$k);
1068
+    		if (strpos($border, 'L') !== false)
1069
+    			$s .= sprintf('%.2F %.2F m %.2F %.2F l S ', $x * $k, ($this->h - $y) * $k, $x * $k, ($this->h - ($y + $h)) * $k);
1070
+    		if (strpos($border, 'T') !== false)
1071
+    			$s .= sprintf('%.2F %.2F m %.2F %.2F l S ', $x * $k, ($this->h - $y) * $k, ($x + $w) * $k, ($this->h - $y) * $k);
1072
+    		if (strpos($border, 'R') !== false)
1073
+    			$s .= sprintf('%.2F %.2F m %.2F %.2F l S ', ($x + $w) * $k, ($this->h - $y) * $k, ($x + $w) * $k, ($this->h - ($y + $h)) * $k);
1074
+    		if (strpos($border, 'B') !== false)
1075
+    			$s .= sprintf('%.2F %.2F m %.2F %.2F l S ', $x * $k, ($this->h - ($y + $h)) * $k, ($x + $w) * $k, ($this->h - ($y + $h)) * $k);
1076 1076
     	}
1077
-    	if($txt!=='')
1077
+    	if ($txt !== '')
1078 1078
     	{
1079
-    		if(!isset($this->CurrentFont))
1079
+    		if (!isset($this->CurrentFont))
1080 1080
     			$this->Error('No font has been set');
1081
-    		if($align=='R')
1082
-    			$dx = $w-$this->cMargin-$this->getStringWidth($txt);
1083
-    		elseif($align=='C')
1084
-    			$dx = ($w-$this->getStringWidth($txt))/2;
1081
+    		if ($align == 'R')
1082
+    			$dx = $w - $this->cMargin - $this->getStringWidth($txt);
1083
+    		elseif ($align == 'C')
1084
+    			$dx = ($w - $this->getStringWidth($txt)) / 2;
1085 1085
     		else
1086 1086
     			$dx = $this->cMargin;
1087
-    		if($this->ColorFlag)
1088
-    			$s .= 'q '.$this->TextColor.' ';
1089
-    		$s .= sprintf('BT %.2F %.2F Td (%s) Tj ET',($this->x+$dx)*$k,($this->h-($this->y+.5*$h+.3*$this->FontSize))*$k,$this->_escape($txt));
1090
-    		if($this->underline)
1091
-    			$s .= ' '.$this->_dounderline($this->x+$dx,$this->y+.5*$h+.3*$this->FontSize,$txt);
1092
-    		if($this->ColorFlag)
1087
+    		if ($this->ColorFlag)
1088
+    			$s .= 'q ' . $this->TextColor . ' ';
1089
+    		$s .= sprintf('BT %.2F %.2F Td (%s) Tj ET', ($this->x + $dx) * $k, ($this->h - ($this->y + .5 * $h + .3 * $this->FontSize)) * $k, $this->_escape($txt));
1090
+    		if ($this->underline)
1091
+    			$s .= ' ' . $this->_dounderline($this->x + $dx, $this->y + .5 * $h + .3 * $this->FontSize, $txt);
1092
+    		if ($this->ColorFlag)
1093 1093
     			$s .= ' Q';
1094
-    		if($link)
1095
-    			$this->Link($this->x+$dx,$this->y+.5*$h-.5*$this->FontSize,$this->getStringWidth($txt),$this->FontSize,$link);
1094
+    		if ($link)
1095
+    			$this->Link($this->x + $dx, $this->y + .5 * $h - .5 * $this->FontSize, $this->getStringWidth($txt), $this->FontSize, $link);
1096 1096
     	}
1097
-    	if($s)
1097
+    	if ($s)
1098 1098
     		$this->_out($s);
1099 1099
     	$this->lasth = $h;
1100
-    	if($ln>0)
1100
+    	if ($ln > 0)
1101 1101
     	{
1102 1102
     		// Go to next line
1103 1103
     		$this->y += $h;
1104
-    		if($ln==1)
1104
+    		if ($ln == 1)
1105 1105
     			$this->x = $this->lMargin;
1106 1106
     	}
1107 1107
     	else
@@ -1136,24 +1136,24 @@  discard block
 block discarded – undo
1136 1136
      *                          If set to true, current FillColor is used for the background. <br/>
1137 1137
      *                          Default value: false.
1138 1138
      */
1139
-    public function MultiCell(float $w, float $h, string $txt, $border=0, string $align='J', bool $fill=false) : void
1139
+    public function MultiCell(float $w, float $h, string $txt, $border = 0, string $align = 'J', bool $fill = false) : void
1140 1140
     {
1141 1141
     	// Output text with automatic or explicit line breaks
1142
-    	if(!isset($this->CurrentFont))
1142
+    	if (!isset($this->CurrentFont))
1143 1143
     		$this->Error('No font has been set');
1144 1144
     	$cw = &$this->CurrentFont['cw'];
1145
-    	if($w==0)
1146
-    		$w = $this->w-$this->rMargin-$this->x;
1147
-    	$wmax = ($w-2*$this->cMargin)*1000/$this->FontSize;
1148
-    	$s = str_replace("\r",'',$txt);
1145
+    	if ($w == 0)
1146
+    		$w = $this->w - $this->rMargin - $this->x;
1147
+    	$wmax = ($w - 2 * $this->cMargin) * 1000 / $this->FontSize;
1148
+    	$s = str_replace("\r", '', $txt);
1149 1149
     	$nb = strlen($s);
1150
-    	if($nb>0 && $s[$nb-1]=="\n")
1150
+    	if ($nb > 0 && $s[$nb - 1] == "\n")
1151 1151
     		$nb--;
1152 1152
     	$b = 0;
1153 1153
     	$b2 = '';
1154
-    	if($border)
1154
+    	if ($border)
1155 1155
     	{
1156
-    		if($border==1)
1156
+    		if ($border == 1)
1157 1157
     		{
1158 1158
     			$border = 'LTRB';
1159 1159
     			$b = 'LRT';
@@ -1162,11 +1162,11 @@  discard block
 block discarded – undo
1162 1162
     		else
1163 1163
     		{
1164 1164
     			$b2 = '';
1165
-    			if(strpos($border,'L')!==false)
1165
+    			if (strpos($border, 'L') !== false)
1166 1166
     				$b2 .= 'L';
1167
-    			if(strpos($border,'R')!==false)
1167
+    			if (strpos($border, 'R') !== false)
1168 1168
     				$b2 .= 'R';
1169
-    			$b = (strpos($border,'T')!==false) ? $b2.'T' : $b2;
1169
+    			$b = (strpos($border, 'T') !== false) ? $b2 . 'T' : $b2;
1170 1170
     		}
1171 1171
     	}
1172 1172
     	$sep = -1;
@@ -1176,80 +1176,80 @@  discard block
 block discarded – undo
1176 1176
     	$ns = 0;
1177 1177
     	$nl = 1;
1178 1178
     	$ls = 0;
1179
-    	while($i<$nb)
1179
+    	while ($i < $nb)
1180 1180
     	{
1181 1181
     		// Get next character
1182 1182
     		$c = $s[$i];
1183
-    		if($c=="\n")
1183
+    		if ($c == "\n")
1184 1184
     		{
1185 1185
     			// Explicit line break
1186
-    			if($this->ws>0)
1186
+    			if ($this->ws > 0)
1187 1187
     			{
1188 1188
     				$this->ws = 0;
1189 1189
     				$this->_out('0 Tw');
1190 1190
     			}
1191
-    			$this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill);
1191
+    			$this->Cell($w, $h, substr($s, $j, $i - $j), $b, 2, $align, $fill);
1192 1192
     			$i++;
1193 1193
     			$sep = -1;
1194 1194
     			$j = $i;
1195 1195
     			$l = 0;
1196 1196
     			$ns = 0;
1197 1197
     			$nl++;
1198
-    			if($border && $nl==2)
1198
+    			if ($border && $nl == 2)
1199 1199
     				$b = $b2;
1200 1200
     			continue;
1201 1201
     		}
1202
-    		if($c==' ')
1202
+    		if ($c == ' ')
1203 1203
     		{
1204 1204
     			$sep = $i;
1205 1205
     			$ls = $l;
1206 1206
     			$ns++;
1207 1207
     		}
1208 1208
     		$l += $cw[$c];
1209
-    		if($l>$wmax)
1209
+    		if ($l > $wmax)
1210 1210
     		{
1211 1211
     			// Automatic line break
1212
-    			if($sep==-1)
1212
+    			if ($sep == -1)
1213 1213
     			{
1214
-    				if($i==$j)
1214
+    				if ($i == $j)
1215 1215
     					$i++;
1216
-    				if($this->ws>0)
1216
+    				if ($this->ws > 0)
1217 1217
     				{
1218 1218
     					$this->ws = 0;
1219 1219
     					$this->_out('0 Tw');
1220 1220
     				}
1221
-    				$this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill);
1221
+    				$this->Cell($w, $h, substr($s, $j, $i - $j), $b, 2, $align, $fill);
1222 1222
     			}
1223 1223
     			else
1224 1224
     			{
1225
-    				if($align=='J')
1225
+    				if ($align == 'J')
1226 1226
     				{
1227
-    					$this->ws = ($ns>1) ? ($wmax-$ls)/1000*$this->FontSize/($ns-1) : 0;
1228
-    					$this->_out(sprintf('%.3F Tw',$this->ws*$this->k));
1227
+    					$this->ws = ($ns > 1) ? ($wmax - $ls) / 1000 * $this->FontSize / ($ns - 1) : 0;
1228
+    					$this->_out(sprintf('%.3F Tw', $this->ws * $this->k));
1229 1229
     				}
1230
-    				$this->Cell($w,$h,substr($s,$j,$sep-$j),$b,2,$align,$fill);
1231
-    				$i = $sep+1;
1230
+    				$this->Cell($w, $h, substr($s, $j, $sep - $j), $b, 2, $align, $fill);
1231
+    				$i = $sep + 1;
1232 1232
     			}
1233 1233
     			$sep = -1;
1234 1234
     			$j = $i;
1235 1235
     			$l = 0;
1236 1236
     			$ns = 0;
1237 1237
     			$nl++;
1238
-    			if($border && $nl==2)
1238
+    			if ($border && $nl == 2)
1239 1239
     				$b = $b2;
1240 1240
     		}
1241 1241
     		else
1242 1242
     			$i++;
1243 1243
     	}
1244 1244
     	// Last chunk
1245
-    	if($this->ws>0)
1245
+    	if ($this->ws > 0)
1246 1246
     	{
1247 1247
     		$this->ws = 0;
1248 1248
     		$this->_out('0 Tw');
1249 1249
     	}
1250
-    	if($border && strpos($border,'B')!==false)
1250
+    	if ($border && strpos($border, 'B') !== false)
1251 1251
     		$b .= 'B';
1252
-    	$this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill);
1252
+    	$this->Cell($w, $h, substr($s, $j, $i - $j), $b, 2, $align, $fill);
1253 1253
     	$this->x = $this->lMargin;
1254 1254
     }
1255 1255
     
@@ -1263,78 +1263,78 @@  discard block
 block discarded – undo
1263 1263
      * @param string $txt       String to print.
1264 1264
      * @param string|int $link  URL or identifier for internal link created by AddLink().
1265 1265
      */
1266
-    public function Write(float $h, string $txt, $link='') : void
1266
+    public function Write(float $h, string $txt, $link = '') : void
1267 1267
     {
1268 1268
     	// Output text in flowing mode
1269
-    	if(!isset($this->CurrentFont))
1269
+    	if (!isset($this->CurrentFont))
1270 1270
     		$this->Error('No font has been set');
1271 1271
     	$cw = &$this->CurrentFont['cw'];
1272
-    	$w = $this->w-$this->rMargin-$this->x;
1273
-    	$wmax = ($w-2*$this->cMargin)*1000/$this->FontSize;
1274
-    	$s = str_replace("\r",'',$txt);
1272
+    	$w = $this->w - $this->rMargin - $this->x;
1273
+    	$wmax = ($w - 2 * $this->cMargin) * 1000 / $this->FontSize;
1274
+    	$s = str_replace("\r", '', $txt);
1275 1275
     	$nb = strlen($s);
1276 1276
     	$sep = -1;
1277 1277
     	$i = 0;
1278 1278
     	$j = 0;
1279 1279
     	$l = 0;
1280 1280
     	$nl = 1;
1281
-    	while($i<$nb)
1281
+    	while ($i < $nb)
1282 1282
     	{
1283 1283
     		// Get next character
1284 1284
     		$c = $s[$i];
1285
-    		if($c=="\n")
1285
+    		if ($c == "\n")
1286 1286
     		{
1287 1287
     			// Explicit line break
1288
-    			$this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',false,$link);
1288
+    			$this->Cell($w, $h, substr($s, $j, $i - $j), 0, 2, '', false, $link);
1289 1289
     			$i++;
1290 1290
     			$sep = -1;
1291 1291
     			$j = $i;
1292 1292
     			$l = 0;
1293
-    			if($nl==1)
1293
+    			if ($nl == 1)
1294 1294
     			{
1295 1295
     				$this->x = $this->lMargin;
1296
-    				$w = $this->w-$this->rMargin-$this->x;
1297
-    				$wmax = ($w-2*$this->cMargin)*1000/$this->FontSize;
1296
+    				$w = $this->w - $this->rMargin - $this->x;
1297
+    				$wmax = ($w - 2 * $this->cMargin) * 1000 / $this->FontSize;
1298 1298
     			}
1299 1299
     			$nl++;
1300 1300
     			continue;
1301 1301
     		}
1302
-    		if($c==' ')
1302
+    		if ($c == ' ')
1303 1303
     			$sep = $i;
1304 1304
     		$l += $cw[$c];
1305
-    		if($l>$wmax)
1305
+    		if ($l > $wmax)
1306 1306
     		{
1307 1307
     			// Automatic line break
1308
-    			if($sep==-1)
1308
+    			if ($sep == -1)
1309 1309
     			{
1310
-    				if($this->x>$this->lMargin)
1310
+    				if ($this->x > $this->lMargin)
1311 1311
     				{
1312 1312
     					// Move to next line
1313 1313
     					$this->x = $this->lMargin;
1314 1314
     					$this->y += $h;
1315
-    					$w = $this->w-$this->rMargin-$this->x;
1316
-    					$wmax = ($w-2*$this->cMargin)*1000/$this->FontSize;
1315
+    					$w = $this->w - $this->rMargin - $this->x;
1316
+    					$wmax = ($w - 2 * $this->cMargin) * 1000 / $this->FontSize;
1317 1317
     					$i++;
1318 1318
     					$nl++;
1319 1319
     					continue;
1320 1320
     				}
1321
-    				if($i==$j)
1321
+    				if ($i == $j)
1322 1322
     					$i++;
1323
-    				$this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',false,$link);
1323
+    				$this->Cell($w, $h, substr($s, $j, $i - $j), 0, 2, '', false, $link);
1324 1324
     			}
1325 1325
     			else
1326 1326
     			{
1327
-    				$this->Cell($w,$h,substr($s,$j,$sep-$j),0,2,'',false,$link);
1328
-    				$i = $sep+1;
1327
+    				$this->Cell($w, $h, substr($s, $j, $sep - $j), 0, 2, '', false, $link);
1328
+    				$i = $sep + 1;
1329 1329
     			}
1330 1330
     			$sep = -1;
1331 1331
     			$j = $i;
1332 1332
     			$l = 0;
1333
-    			if($nl==1)
1333
+    			if ($nl == 1)
1334 1334
     			{
1335 1335
     				$this->x = $this->lMargin;
1336
-    				$w = $this->w-$this->rMargin-$this->x;
1337
-    				$wmax = ($w-2*$this->cMargin)*1000/$this->FontSize;
1336
+    				$w = $this->w - $this->rMargin - $this->x;
1337
+    				$wmax = ($w - 2 * $this->cMargin) * 1000 / $this->FontSize;
1338 1338
     			}
1339 1339
     			$nl++;
1340 1340
     		}
@@ -1342,8 +1342,8 @@  discard block
 block discarded – undo
1342 1342
     			$i++;
1343 1343
     	}
1344 1344
     	// Last chunk
1345
-    	if($i!=$j)
1346
-    		$this->Cell($l/1000*$this->FontSize,$h,substr($s,$j),0,0,'',false,$link);
1345
+    	if ($i != $j)
1346
+    		$this->Cell($l / 1000 * $this->FontSize, $h, substr($s, $j), 0, 0, '', false, $link);
1347 1347
     }
1348 1348
     
1349 1349
     /**
@@ -1353,11 +1353,11 @@  discard block
 block discarded – undo
1353 1353
      * @param float $h  The height of the break. <br/>
1354 1354
      *                  By default, the value equals the height of the last printed cell.
1355 1355
      */
1356
-    public function Ln(float $h=null) : void
1356
+    public function Ln(float $h = null) : void
1357 1357
     {
1358 1358
     	// Line feed; default value is the last cell height
1359 1359
     	$this->x = $this->lMargin;
1360
-    	if($h===null)
1360
+    	if ($h === null)
1361 1361
     		$this->y += $this->lasth;
1362 1362
     	else
1363 1363
     		$this->y += $h;
@@ -1409,69 +1409,69 @@  discard block
 block discarded – undo
1409 1409
      *                      If not specified, the type is inferred from the file extension. <br/>
1410 1410
      * @param string|int $link  URL or identifier for internal link created by AddLink().
1411 1411
      */
1412
-    public function Image(string $file, ?float $x=null, ?float $y=null, float $w=0, float $h=0, string $type='', $link='') : void
1412
+    public function Image(string $file, ?float $x = null, ?float $y = null, float $w = 0, float $h = 0, string $type = '', $link = '') : void
1413 1413
     {
1414 1414
     	// Put an image on the page
1415
-    	if($file=='')
1415
+    	if ($file == '')
1416 1416
     		$this->Error('Image file name is empty');
1417
-    	if(!isset($this->images[$file]))
1417
+    	if (!isset($this->images[$file]))
1418 1418
     	{
1419 1419
     		// First use of this image, get info
1420
-    		if($type=='')
1420
+    		if ($type == '')
1421 1421
     		{
1422
-    			$pos = strrpos($file,'.');
1423
-    			if(!$pos)
1424
-    				$this->Error('Image file has no extension and no type was specified: '.$file);
1425
-    			$type = substr($file,$pos+1);
1422
+    			$pos = strrpos($file, '.');
1423
+    			if (!$pos)
1424
+    				$this->Error('Image file has no extension and no type was specified: ' . $file);
1425
+    			$type = substr($file, $pos + 1);
1426 1426
     		}
1427 1427
     		$type = strtolower($type);
1428
-    		if($type=='jpeg')
1428
+    		if ($type == 'jpeg')
1429 1429
     			$type = 'jpg';
1430
-    		$mtd = '_parse'.$type;
1431
-    		if(!method_exists($this,$mtd))
1432
-    			$this->Error('Unsupported image type: '.$type);
1430
+    		$mtd = '_parse' . $type;
1431
+    		if (!method_exists($this, $mtd))
1432
+    			$this->Error('Unsupported image type: ' . $type);
1433 1433
     		$info = $this->$mtd($file);
1434
-    		$info['i'] = count($this->images)+1;
1434
+    		$info['i'] = count($this->images) + 1;
1435 1435
     		$this->images[$file] = $info;
1436 1436
     	}
1437 1437
     	else
1438 1438
     		$info = $this->images[$file];
1439 1439
     
1440 1440
     	// Automatic width and height calculation if needed
1441
-    	if($w==0 && $h==0)
1441
+    	if ($w == 0 && $h == 0)
1442 1442
     	{
1443 1443
     		// Put image at 96 dpi
1444 1444
     		$w = -96;
1445 1445
     		$h = -96;
1446 1446
     	}
1447
-    	if($w<0)
1448
-    		$w = -$info['w']*72/$w/$this->k;
1449
-    	if($h<0)
1450
-    		$h = -$info['h']*72/$h/$this->k;
1451
-    	if($w==0)
1452
-    		$w = $h*$info['w']/$info['h'];
1453
-    	if($h==0)
1454
-    		$h = $w*$info['h']/$info['w'];
1447
+    	if ($w < 0)
1448
+    		$w = -$info['w'] * 72 / $w / $this->k;
1449
+    	if ($h < 0)
1450
+    		$h = -$info['h'] * 72 / $h / $this->k;
1451
+    	if ($w == 0)
1452
+    		$w = $h * $info['w'] / $info['h'];
1453
+    	if ($h == 0)
1454
+    		$h = $w * $info['h'] / $info['w'];
1455 1455
     
1456 1456
     	// Flowing mode
1457
-    	if($y===null)
1457
+    	if ($y === null)
1458 1458
     	{
1459
-    		if($this->y+$h>$this->PageBreakTrigger && !$this->InHeader && !$this->InFooter && $this->AcceptPageBreak())
1459
+    		if ($this->y + $h > $this->PageBreakTrigger && !$this->InHeader && !$this->InFooter && $this->AcceptPageBreak())
1460 1460
     		{
1461 1461
     			// Automatic page break
1462 1462
     			$x2 = $this->x;
1463
-    			$this->addPage($this->CurOrientation,$this->CurPageSize,$this->CurRotation);
1463
+    			$this->addPage($this->CurOrientation, $this->CurPageSize, $this->CurRotation);
1464 1464
     			$this->x = $x2;
1465 1465
     		}
1466 1466
     		$y = $this->y;
1467 1467
     		$this->y += $h;
1468 1468
     	}
1469 1469
     
1470
-    	if($x===null)
1470
+    	if ($x === null)
1471 1471
     		$x = $this->x;
1472
-    	$this->_out(sprintf('q %.2F 0 0 %.2F %.2F %.2F cm /I%d Do Q',$w*$this->k,$h*$this->k,$x*$this->k,($this->h-($y+$h))*$this->k,$info['i']));
1473
-    	if($link)
1474
-    		$this->Link($x,$y,$w,$h,$link);
1472
+    	$this->_out(sprintf('q %.2F 0 0 %.2F %.2F %.2F cm /I%d Do Q', $w * $this->k, $h * $this->k, $x * $this->k, ($this->h - ($y + $h)) * $this->k, $info['i']));
1473
+    	if ($link)
1474
+    		$this->Link($x, $y, $w, $h, $link);
1475 1475
     }
1476 1476
     
1477 1477
     /**
@@ -1512,10 +1512,10 @@  discard block
 block discarded – undo
1512 1512
     public function SetX(float $x) : void
1513 1513
     {
1514 1514
     	// Set x position
1515
-    	if($x>=0)
1515
+    	if ($x >= 0)
1516 1516
     		$this->x = $x;
1517 1517
     	else
1518
-    		$this->x = $this->w+$x;
1518
+    		$this->x = $this->w + $x;
1519 1519
     }
1520 1520
 
1521 1521
     /**
@@ -1534,14 +1534,14 @@  discard block
 block discarded – undo
1534 1534
      * @param float $y
1535 1535
      * @param bool $resetX
1536 1536
      */
1537
-    public function SetY(float $y, bool $resetX=true) : void
1537
+    public function SetY(float $y, bool $resetX = true) : void
1538 1538
     {
1539 1539
     	// Set y position and optionally reset x
1540
-    	if($y>=0)
1540
+    	if ($y >= 0)
1541 1541
     		$this->y = $y;
1542 1542
     	else
1543
-    		$this->y = $this->h+$y;
1544
-    	if($resetX)
1543
+    		$this->y = $this->h + $y;
1544
+    	if ($resetX)
1545 1545
     		$this->x = $this->lMargin;
1546 1546
     }
1547 1547
     
@@ -1555,7 +1555,7 @@  discard block
 block discarded – undo
1555 1555
     {
1556 1556
     	// Set x and y positions
1557 1557
     	$this->setX($x);
1558
-    	$this->setY($y,false);
1558
+    	$this->setY($y, false);
1559 1559
     }
1560 1560
     
1561 1561
     /**
@@ -1576,31 +1576,31 @@  discard block
 block discarded – undo
1576 1576
      *                      The default value is false. <br/>
1577 1577
      * @return string
1578 1578
      */
1579
-    public function Output(string $dest='', string $name='', bool $isUTF8=false) : string
1579
+    public function Output(string $dest = '', string $name = '', bool $isUTF8 = false) : string
1580 1580
     {
1581 1581
     	// Output PDF to some destination
1582 1582
     	$this->Close();
1583
-    	if(strlen($name)==1 && strlen($dest)!=1)
1583
+    	if (strlen($name) == 1 && strlen($dest) != 1)
1584 1584
     	{
1585 1585
     		// Fix parameter order
1586 1586
     		$tmp = $dest;
1587 1587
     		$dest = $name;
1588 1588
     		$name = $tmp;
1589 1589
     	}
1590
-    	if($dest=='')
1590
+    	if ($dest == '')
1591 1591
     		$dest = 'I';
1592
-    	if($name=='')
1592
+    	if ($name == '')
1593 1593
     		$name = 'doc.pdf';
1594
-    	switch(strtoupper($dest))
1594
+    	switch (strtoupper($dest))
1595 1595
     	{
1596 1596
     		case 'I':
1597 1597
     			// Send to standard output
1598 1598
     			$this->_checkoutput();
1599
-    			if(PHP_SAPI!='cli')
1599
+    			if (PHP_SAPI != 'cli')
1600 1600
     			{
1601 1601
     				// We send to a browser
1602 1602
     				header('Content-Type: application/pdf; charset=UTF-8');
1603
-    				header('Content-Disposition: inline; '.$this->_httpencode('filename',$name,$isUTF8));
1603
+    				header('Content-Disposition: inline; ' . $this->_httpencode('filename', $name, $isUTF8));
1604 1604
     				header('Cache-Control: private, max-age=0, must-revalidate');
1605 1605
     				header('Pragma: public');
1606 1606
     			}
@@ -1610,21 +1610,21 @@  discard block
 block discarded – undo
1610 1610
     			// Download file
1611 1611
     			$this->_checkoutput();
1612 1612
     			header('Content-Type: application/x-download');
1613
-    			header('Content-Disposition: attachment; '.$this->_httpencode('filename',$name,$isUTF8));
1613
+    			header('Content-Disposition: attachment; ' . $this->_httpencode('filename', $name, $isUTF8));
1614 1614
     			header('Cache-Control: private, max-age=0, must-revalidate');
1615 1615
     			header('Pragma: public');
1616 1616
     			echo $this->buffer;
1617 1617
     			break;
1618 1618
     		case 'F':
1619 1619
     			// Save to local file
1620
-    			if(!file_put_contents($name,$this->buffer))
1621
-    				$this->Error('Unable to create output file: '.$name);
1620
+    			if (!file_put_contents($name, $this->buffer))
1621
+    				$this->Error('Unable to create output file: ' . $name);
1622 1622
     			break;
1623 1623
     		case 'S':
1624 1624
     			// Return as a string
1625 1625
     			return $this->buffer;
1626 1626
     		default:
1627
-    			$this->Error('Incorrect output destination: '.$dest);
1627
+    			$this->Error('Incorrect output destination: ' . $dest);
1628 1628
     	}
1629 1629
     	return '';
1630 1630
     }
@@ -1635,7 +1635,7 @@  discard block
 block discarded – undo
1635 1635
     protected function _dochecks() : void
1636 1636
     {
1637 1637
     	// Check mbstring overloading
1638
-    	if(ini_get('mbstring.func_overload') & 2)
1638
+    	if (ini_get('mbstring.func_overload') & 2)
1639 1639
     		$this->Error('mbstring overloading must be disabled');
1640 1640
     }
1641 1641
 
@@ -1644,17 +1644,17 @@  discard block
 block discarded – undo
1644 1644
      */
1645 1645
     protected function _checkoutput() : void
1646 1646
     {
1647
-    	if(PHP_SAPI!='cli')
1647
+    	if (PHP_SAPI != 'cli')
1648 1648
     	{
1649 1649
     	    $file = '';
1650 1650
     	    $line = 0;
1651
-    		if(headers_sent($file,$line))
1651
+    		if (headers_sent($file, $line))
1652 1652
     			$this->Error("Some data has already been output, can't send PDF file (output started at $file:$line)");
1653 1653
     	}
1654
-    	if(ob_get_length())
1654
+    	if (ob_get_length())
1655 1655
     	{
1656 1656
     		// The output buffer is not empty
1657
-    		if(preg_match('/^(\xEF\xBB\xBF)?\s*$/',ob_get_contents()))
1657
+    		if (preg_match('/^(\xEF\xBB\xBF)?\s*$/', ob_get_contents()))
1658 1658
     		{
1659 1659
     			// It contains only a UTF-8 BOM and/or whitespace, let's clean it
1660 1660
     			ob_clean();
@@ -1671,17 +1671,17 @@  discard block
 block discarded – undo
1671 1671
      */
1672 1672
     protected function _getpagesize($size) : array
1673 1673
     {
1674
-    	if(is_string($size))
1674
+    	if (is_string($size))
1675 1675
     	{
1676 1676
     		$size = strtolower($size);
1677
-    		if(!isset($this->StdPageSizes[$size]))
1678
-    			$this->Error('Unknown page size: '.$size);
1677
+    		if (!isset($this->StdPageSizes[$size]))
1678
+    			$this->Error('Unknown page size: ' . $size);
1679 1679
     		$a = $this->StdPageSizes[$size];
1680
-    		return array($a[0]/$this->k, $a[1]/$this->k);
1680
+    		return array($a[0] / $this->k, $a[1] / $this->k);
1681 1681
     	}
1682 1682
     	else
1683 1683
     	{
1684
-    		if($size[0]>$size[1])
1684
+    		if ($size[0] > $size[1])
1685 1685
     			return array($size[1], $size[0]);
1686 1686
     		else
1687 1687
     			return $size;
@@ -1703,18 +1703,18 @@  discard block
 block discarded – undo
1703 1703
     	$this->y = $this->tMargin;
1704 1704
     	$this->FontFamily = '';
1705 1705
     	// Check page size and orientation
1706
-    	if($orientation=='')
1706
+    	if ($orientation == '')
1707 1707
     		$orientation = $this->DefOrientation;
1708 1708
     	else
1709 1709
     		$orientation = strtoupper($orientation[0]);
1710
-    	if($size=='')
1710
+    	if ($size == '')
1711 1711
     		$size = $this->DefPageSize;
1712 1712
     	else
1713 1713
     		$size = $this->_getpagesize($size);
1714
-    	if($orientation!=$this->CurOrientation || $size[0]!=$this->CurPageSize[0] || $size[1]!=$this->CurPageSize[1])
1714
+    	if ($orientation != $this->CurOrientation || $size[0] != $this->CurPageSize[0] || $size[1] != $this->CurPageSize[1])
1715 1715
     	{
1716 1716
     		// New size or orientation
1717
-    		if($orientation=='P')
1717
+    		if ($orientation == 'P')
1718 1718
     		{
1719 1719
     			$this->w = $size[0];
1720 1720
     			$this->h = $size[1];
@@ -1724,18 +1724,18 @@  discard block
 block discarded – undo
1724 1724
     			$this->w = $size[1];
1725 1725
     			$this->h = $size[0];
1726 1726
     		}
1727
-    		$this->wPt = $this->w*$this->k;
1728
-    		$this->hPt = $this->h*$this->k;
1729
-    		$this->PageBreakTrigger = $this->h-$this->bMargin;
1727
+    		$this->wPt = $this->w * $this->k;
1728
+    		$this->hPt = $this->h * $this->k;
1729
+    		$this->PageBreakTrigger = $this->h - $this->bMargin;
1730 1730
     		$this->CurOrientation = $orientation;
1731 1731
     		$this->CurPageSize = $size;
1732 1732
     	}
1733
-    	if($orientation!=$this->DefOrientation || $size[0]!=$this->DefPageSize[0] || $size[1]!=$this->DefPageSize[1])
1733
+    	if ($orientation != $this->DefOrientation || $size[0] != $this->DefPageSize[0] || $size[1] != $this->DefPageSize[1])
1734 1734
     		$this->PageInfo[$this->page]['size'] = array($this->wPt, $this->hPt);
1735
-    	if($rotation!=0)
1735
+    	if ($rotation != 0)
1736 1736
     	{
1737
-    		if($rotation%90!=0)
1738
-    			$this->Error('Incorrect rotation value: '.$rotation);
1737
+    		if ($rotation % 90 != 0)
1738
+    			$this->Error('Incorrect rotation value: ' . $rotation);
1739 1739
     		$this->CurRotation = $rotation;
1740 1740
     		$this->PageInfo[$this->page]['rotation'] = $rotation;
1741 1741
     	}
@@ -1757,23 +1757,23 @@  discard block
 block discarded – undo
1757 1757
     protected function _loadfont(string $font) : array
1758 1758
     {
1759 1759
     	// Load a font definition file from the font directory
1760
-        if(strpos($font,'/')!==false || strpos($font,"\\")!==false) {
1761
-    		$this->Error('Incorrect font definition file name: '.$font);
1760
+        if (strpos($font, '/') !== false || strpos($font, "\\") !== false) {
1761
+    		$this->Error('Incorrect font definition file name: ' . $font);
1762 1762
         }
1763 1763
         // following vars must be initialized in the font definition file beeing included
1764 1764
     	$name = null; 
1765 1765
     	$enc = null;
1766 1766
     	$subsetted = null;
1767
-    	include($this->fontpath.$font);
1767
+    	include($this->fontpath . $font);
1768 1768
     	
1769 1769
     	// phpstan can't see the code dynamicly included before so assuming $name, $enc, $subsetted always set to null!
1770
-    	if(!isset($name)) {            /* @phpstan-ignore-line */
1770
+    	if (!isset($name)) {            /* @phpstan-ignore-line */
1771 1771
     		$this->Error('Could not include font definition file');
1772 1772
     	}
1773
-    	if(isset($enc)) {              /* @phpstan-ignore-line */
1773
+    	if (isset($enc)) {              /* @phpstan-ignore-line */
1774 1774
     		$enc = strtolower($enc);
1775 1775
     	}
1776
-    	if(!isset($subsetted)) {       /* @phpstan-ignore-line */
1776
+    	if (!isset($subsetted)) {       /* @phpstan-ignore-line */
1777 1777
     		$subsetted = false;
1778 1778
     	}
1779 1779
     	return get_defined_vars();
@@ -1788,9 +1788,9 @@  discard block
 block discarded – undo
1788 1788
     {
1789 1789
     	// Test if string is ASCII
1790 1790
     	$nb = strlen($s);
1791
-    	for($i=0;$i<$nb;$i++)
1791
+    	for ($i = 0; $i < $nb; $i++)
1792 1792
     	{
1793
-    		if(ord($s[$i])>127)
1793
+    		if (ord($s[$i]) > 127)
1794 1794
     			return false;
1795 1795
     	}
1796 1796
     	return true;
@@ -1805,14 +1805,14 @@  discard block
 block discarded – undo
1805 1805
     protected function _httpencode(string $param, string $value, bool $isUTF8) : string
1806 1806
     {
1807 1807
     	// Encode HTTP header field parameter
1808
-    	if($this->_isascii($value))
1809
-    		return $param.'="'.$value.'"';
1810
-    	if(!$isUTF8)
1808
+    	if ($this->_isascii($value))
1809
+    		return $param . '="' . $value . '"';
1810
+    	if (!$isUTF8)
1811 1811
     		$value = utf8_encode($value);
1812
-    	if(strpos($_SERVER['HTTP_USER_AGENT'],'MSIE')!==false)
1813
-    		return $param.'="'.rawurlencode($value).'"';
1812
+    	if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)
1813
+    		return $param . '="' . rawurlencode($value) . '"';
1814 1814
     	else
1815
-    		return $param."*=UTF-8''".rawurlencode($value);
1815
+    		return $param . "*=UTF-8''" . rawurlencode($value);
1816 1816
     }
1817 1817
     
1818 1818
     /**
@@ -1826,28 +1826,28 @@  discard block
 block discarded – undo
1826 1826
     	$res = "\xFE\xFF";
1827 1827
     	$nb = strlen($s);
1828 1828
     	$i = 0;
1829
-    	while($i<$nb)
1829
+    	while ($i < $nb)
1830 1830
     	{
1831 1831
     		$c1 = ord($s[$i++]);
1832
-    		if($c1>=224)
1832
+    		if ($c1 >= 224)
1833 1833
     		{
1834 1834
     			// 3-byte character
1835 1835
     			$c2 = ord($s[$i++]);
1836 1836
     			$c3 = ord($s[$i++]);
1837
-    			$res .= chr((($c1 & 0x0F)<<4) + (($c2 & 0x3C)>>2));
1838
-    			$res .= chr((($c2 & 0x03)<<6) + ($c3 & 0x3F));
1837
+    			$res .= chr((($c1 & 0x0F) << 4) + (($c2 & 0x3C) >> 2));
1838
+    			$res .= chr((($c2 & 0x03) << 6) + ($c3 & 0x3F));
1839 1839
     		}
1840
-    		elseif($c1>=192)
1840
+    		elseif ($c1 >= 192)
1841 1841
     		{
1842 1842
     			// 2-byte character
1843 1843
     			$c2 = ord($s[$i++]);
1844
-    			$res .= chr(($c1 & 0x1C)>>2);
1845
-    			$res .= chr((($c1 & 0x03)<<6) + ($c2 & 0x3F));
1844
+    			$res .= chr(($c1 & 0x1C) >> 2);
1845
+    			$res .= chr((($c1 & 0x03) << 6) + ($c2 & 0x3F));
1846 1846
     		}
1847 1847
     		else
1848 1848
     		{
1849 1849
     			// Single-byte character
1850
-    			$res .= "\0".chr($c1);
1850
+    			$res .= "\0" . chr($c1);
1851 1851
     		}
1852 1852
     	}
1853 1853
     	return $res;
@@ -1861,8 +1861,8 @@  discard block
 block discarded – undo
1861 1861
     protected function _escape(string $s) : string
1862 1862
     {
1863 1863
     	// Escape special characters
1864
-    	if(strpos($s,'(')!==false || strpos($s,')')!==false || strpos($s,'\\')!==false || strpos($s,"\r")!==false)
1865
-    		return str_replace(array('\\','(',')',"\r"), array('\\\\','\\(','\\)','\\r'), $s);
1864
+    	if (strpos($s, '(') !== false || strpos($s, ')') !== false || strpos($s, '\\') !== false || strpos($s, "\r") !== false)
1865
+    		return str_replace(array('\\', '(', ')', "\r"), array('\\\\', '\\(', '\\)', '\\r'), $s);
1866 1866
     	else
1867 1867
     		return $s;
1868 1868
     }
@@ -1875,9 +1875,9 @@  discard block
 block discarded – undo
1875 1875
     protected function _textstring(string $s) : string
1876 1876
     {
1877 1877
     	// Format a text string
1878
-    	if(!$this->_isascii($s))
1878
+    	if (!$this->_isascii($s))
1879 1879
     		$s = $this->_UTF8toUTF16($s);
1880
-    	return '('.$this->_escape($s).')';
1880
+    	return '(' . $this->_escape($s) . ')';
1881 1881
     }
1882 1882
     
1883 1883
     /**
@@ -1892,8 +1892,8 @@  discard block
 block discarded – undo
1892 1892
     	// Underline text
1893 1893
     	$up = $this->CurrentFont['up'];
1894 1894
     	$ut = $this->CurrentFont['ut'];
1895
-    	$w = $this->getStringWidth($txt)+$this->ws*substr_count($txt,' ');
1896
-    	return sprintf('%.2F %.2F %.2F %.2F re f',$x*$this->k,($this->h-($y-$up/1000*$this->FontSize))*$this->k,$w*$this->k,-$ut/1000*$this->FontSizePt);
1895
+    	$w = $this->getStringWidth($txt) + $this->ws * substr_count($txt, ' ');
1896
+    	return sprintf('%.2F %.2F %.2F %.2F re f', $x * $this->k, ($this->h - ($y - $up / 1000 * $this->FontSize)) * $this->k, $w * $this->k, -$ut / 1000 * $this->FontSizePt);
1897 1897
     }
1898 1898
     
1899 1899
     /**
@@ -1905,13 +1905,13 @@  discard block
 block discarded – undo
1905 1905
     {
1906 1906
     	// Extract info from a JPEG file
1907 1907
     	$a = getimagesize($file);
1908
-    	if(!$a)
1909
-    		$this->Error('Missing or incorrect image file: '.$file);
1910
-    	if($a[2]!=2)
1911
-    		$this->Error('Not a JPEG file: '.$file);
1912
-    	if(!isset($a['channels']) || $a['channels']==3)
1908
+    	if (!$a)
1909
+    		$this->Error('Missing or incorrect image file: ' . $file);
1910
+    	if ($a[2] != 2)
1911
+    		$this->Error('Not a JPEG file: ' . $file);
1912
+    	if (!isset($a['channels']) || $a['channels'] == 3)
1913 1913
     		$colspace = 'DeviceRGB';
1914
-    	elseif($a['channels']==4)
1914
+    	elseif ($a['channels'] == 4)
1915 1915
     		$colspace = 'DeviceCMYK';
1916 1916
     	else
1917 1917
     		$colspace = 'DeviceGray';
@@ -1928,10 +1928,10 @@  discard block
 block discarded – undo
1928 1928
     protected function _parsepng(string $file) : array
1929 1929
     {
1930 1930
     	// Extract info from a PNG file
1931
-    	$f = fopen($file,'rb');
1932
-    	if(!$f)
1933
-    		$this->Error('Can\'t open image file: '.$file);
1934
-    	$info = $this->_parsepngstream($f,$file);
1931
+    	$f = fopen($file, 'rb');
1932
+    	if (!$f)
1933
+    		$this->Error('Can\'t open image file: ' . $file);
1934
+    	$info = $this->_parsepngstream($f, $file);
1935 1935
     	fclose($f);
1936 1936
     	return $info;
1937 1937
     }
@@ -1945,36 +1945,36 @@  discard block
 block discarded – undo
1945 1945
     protected function _parsepngstream($f, string $file) : array
1946 1946
     {
1947 1947
     	// Check signature
1948
-    	if($this->_readstream($f,8)!=chr(137).'PNG'.chr(13).chr(10).chr(26).chr(10))
1949
-    		$this->Error('Not a PNG file: '.$file);
1948
+    	if ($this->_readstream($f, 8) != chr(137) . 'PNG' . chr(13) . chr(10) . chr(26) . chr(10))
1949
+    		$this->Error('Not a PNG file: ' . $file);
1950 1950
     
1951 1951
     	// Read header chunk
1952
-    	$this->_readstream($f,4);
1953
-    	if($this->_readstream($f,4)!='IHDR')
1954
-    		$this->Error('Incorrect PNG file: '.$file);
1952
+    	$this->_readstream($f, 4);
1953
+    	if ($this->_readstream($f, 4) != 'IHDR')
1954
+    		$this->Error('Incorrect PNG file: ' . $file);
1955 1955
     	$w = $this->_readint($f);
1956 1956
     	$h = $this->_readint($f);
1957
-    	$bpc = ord($this->_readstream($f,1));
1958
-    	if($bpc>8)
1959
-    		$this->Error('16-bit depth not supported: '.$file);
1960
-    	$ct = ord($this->_readstream($f,1));
1957
+    	$bpc = ord($this->_readstream($f, 1));
1958
+    	if ($bpc > 8)
1959
+    		$this->Error('16-bit depth not supported: ' . $file);
1960
+    	$ct = ord($this->_readstream($f, 1));
1961 1961
     	$colspace = '';
1962
-    	if($ct==0 || $ct==4)
1962
+    	if ($ct == 0 || $ct == 4)
1963 1963
     		$colspace = 'DeviceGray';
1964
-    	elseif($ct==2 || $ct==6)
1964
+    	elseif ($ct == 2 || $ct == 6)
1965 1965
     		$colspace = 'DeviceRGB';
1966
-    	elseif($ct==3)
1966
+    	elseif ($ct == 3)
1967 1967
     		$colspace = 'Indexed';
1968 1968
     	else
1969
-    		$this->Error('Unknown color type: '.$file);
1970
-    	if(ord($this->_readstream($f,1))!=0)
1971
-    		$this->Error('Unknown compression method: '.$file);
1972
-    	if(ord($this->_readstream($f,1))!=0)
1973
-    		$this->Error('Unknown filter method: '.$file);
1974
-    	if(ord($this->_readstream($f,1))!=0)
1975
-    		$this->Error('Interlacing not supported: '.$file);
1976
-    	$this->_readstream($f,4);
1977
-    	$dp = '/Predictor 15 /Colors '.($colspace=='DeviceRGB' ? 3 : 1).' /BitsPerComponent '.$bpc.' /Columns '.$w;
1969
+    		$this->Error('Unknown color type: ' . $file);
1970
+    	if (ord($this->_readstream($f, 1)) != 0)
1971
+    		$this->Error('Unknown compression method: ' . $file);
1972
+    	if (ord($this->_readstream($f, 1)) != 0)
1973
+    		$this->Error('Unknown filter method: ' . $file);
1974
+    	if (ord($this->_readstream($f, 1)) != 0)
1975
+    		$this->Error('Interlacing not supported: ' . $file);
1976
+    	$this->_readstream($f, 4);
1977
+    	$dp = '/Predictor 15 /Colors ' . ($colspace == 'DeviceRGB' ? 3 : 1) . ' /BitsPerComponent ' . $bpc . ' /Columns ' . $w;
1978 1978
     
1979 1979
     	// Scan chunks looking for palette, transparency and image data
1980 1980
     	$pal = '';
@@ -1983,86 +1983,86 @@  discard block
 block discarded – undo
1983 1983
     	do
1984 1984
     	{
1985 1985
     		$n = $this->_readint($f);
1986
-    		$type = $this->_readstream($f,4);
1987
-    		if($type=='PLTE')
1986
+    		$type = $this->_readstream($f, 4);
1987
+    		if ($type == 'PLTE')
1988 1988
     		{
1989 1989
     			// Read palette
1990
-    			$pal = $this->_readstream($f,$n);
1991
-    			$this->_readstream($f,4);
1990
+    			$pal = $this->_readstream($f, $n);
1991
+    			$this->_readstream($f, 4);
1992 1992
     		}
1993
-    		elseif($type=='tRNS')
1993
+    		elseif ($type == 'tRNS')
1994 1994
     		{
1995 1995
     			// Read transparency info
1996
-    			$t = $this->_readstream($f,$n);
1997
-    			if($ct==0)
1998
-    				$trns = array(ord(substr($t,1,1)));
1999
-    			elseif($ct==2)
2000
-    				$trns = array(ord(substr($t,1,1)), ord(substr($t,3,1)), ord(substr($t,5,1)));
1996
+    			$t = $this->_readstream($f, $n);
1997
+    			if ($ct == 0)
1998
+    				$trns = array(ord(substr($t, 1, 1)));
1999
+    			elseif ($ct == 2)
2000
+    				$trns = array(ord(substr($t, 1, 1)), ord(substr($t, 3, 1)), ord(substr($t, 5, 1)));
2001 2001
     			else
2002 2002
     			{
2003
-    				$pos = strpos($t,chr(0));
2004
-    				if($pos!==false)
2003
+    				$pos = strpos($t, chr(0));
2004
+    				if ($pos !== false)
2005 2005
     					$trns = array($pos);
2006 2006
     			}
2007
-    			$this->_readstream($f,4);
2007
+    			$this->_readstream($f, 4);
2008 2008
     		}
2009
-    		elseif($type=='IDAT')
2009
+    		elseif ($type == 'IDAT')
2010 2010
     		{
2011 2011
     			// Read image data block
2012
-    			$data .= $this->_readstream($f,$n);
2013
-    			$this->_readstream($f,4);
2012
+    			$data .= $this->_readstream($f, $n);
2013
+    			$this->_readstream($f, 4);
2014 2014
     		}
2015
-    		elseif($type=='IEND')
2015
+    		elseif ($type == 'IEND')
2016 2016
     			break;
2017 2017
     		else
2018
-    			$this->_readstream($f,$n+4);
2018
+    			$this->_readstream($f, $n + 4);
2019 2019
     	}
2020
-    	while($n);
2020
+    	while ($n);
2021 2021
     
2022
-    	if($colspace=='Indexed' && empty($pal))
2023
-    		$this->Error('Missing palette in '.$file);
2022
+    	if ($colspace == 'Indexed' && empty($pal))
2023
+    		$this->Error('Missing palette in ' . $file);
2024 2024
     	$info = array('w'=>$w, 'h'=>$h, 'cs'=>$colspace, 'bpc'=>$bpc, 'f'=>'FlateDecode', 'dp'=>$dp, 'pal'=>$pal, 'trns'=>$trns);
2025
-    	if($ct>=4)
2025
+    	if ($ct >= 4)
2026 2026
     	{
2027 2027
     		// Extract alpha channel
2028
-    		if(!function_exists('gzuncompress'))
2029
-    			$this->Error('Zlib not available, can\'t handle alpha channel: '.$file);
2028
+    		if (!function_exists('gzuncompress'))
2029
+    			$this->Error('Zlib not available, can\'t handle alpha channel: ' . $file);
2030 2030
     		$data = gzuncompress($data);
2031 2031
     		$color = '';
2032 2032
     		$alpha = '';
2033
-    		if($ct==4)
2033
+    		if ($ct == 4)
2034 2034
     		{
2035 2035
     			// Gray image
2036
-    			$len = 2*$w;
2037
-    			for($i=0;$i<$h;$i++)
2036
+    			$len = 2 * $w;
2037
+    			for ($i = 0; $i < $h; $i++)
2038 2038
     			{
2039
-    				$pos = (1+$len)*$i;
2039
+    				$pos = (1 + $len) * $i;
2040 2040
     				$color .= $data[$pos];
2041 2041
     				$alpha .= $data[$pos];
2042
-    				$line = substr($data,$pos+1,$len);
2043
-    				$color .= preg_replace('/(.)./s','$1',$line);
2044
-    				$alpha .= preg_replace('/.(.)/s','$1',$line);
2042
+    				$line = substr($data, $pos + 1, $len);
2043
+    				$color .= preg_replace('/(.)./s', '$1', $line);
2044
+    				$alpha .= preg_replace('/.(.)/s', '$1', $line);
2045 2045
     			}
2046 2046
     		}
2047 2047
     		else
2048 2048
     		{
2049 2049
     			// RGB image
2050
-    			$len = 4*$w;
2051
-    			for($i=0;$i<$h;$i++)
2050
+    			$len = 4 * $w;
2051
+    			for ($i = 0; $i < $h; $i++)
2052 2052
     			{
2053
-    				$pos = (1+$len)*$i;
2053
+    				$pos = (1 + $len) * $i;
2054 2054
     				$color .= $data[$pos];
2055 2055
     				$alpha .= $data[$pos];
2056
-    				$line = substr($data,$pos+1,$len);
2057
-    				$color .= preg_replace('/(.{3})./s','$1',$line);
2058
-    				$alpha .= preg_replace('/.{3}(.)/s','$1',$line);
2056
+    				$line = substr($data, $pos + 1, $len);
2057
+    				$color .= preg_replace('/(.{3})./s', '$1', $line);
2058
+    				$alpha .= preg_replace('/.{3}(.)/s', '$1', $line);
2059 2059
     			}
2060 2060
     		}
2061 2061
     		unset($data);
2062 2062
     		$data = gzcompress($color);
2063 2063
     		$info['smask'] = gzcompress($alpha);
2064 2064
     		$this->WithAlpha = true;
2065
-    		if($this->PDFVersion<'1.4')
2065
+    		if ($this->PDFVersion < '1.4')
2066 2066
     			$this->PDFVersion = '1.4';
2067 2067
     	}
2068 2068
     	$info['data'] = $data;
@@ -2079,15 +2079,15 @@  discard block
 block discarded – undo
2079 2079
     {
2080 2080
     	// Read n bytes from stream
2081 2081
     	$res = '';
2082
-    	while($n>0 && !feof($f))
2082
+    	while ($n > 0 && !feof($f))
2083 2083
     	{
2084
-    		$s = fread($f,$n);
2085
-    		if($s===false)
2084
+    		$s = fread($f, $n);
2085
+    		if ($s === false)
2086 2086
     			$this->Error('Error while reading stream');
2087 2087
     		$n -= strlen($s);
2088 2088
     		$res .= $s;
2089 2089
     	}
2090
-    	if($n>0)
2090
+    	if ($n > 0)
2091 2091
     		$this->Error('Unexpected end of stream');
2092 2092
     	return $res;
2093 2093
     }
@@ -2100,7 +2100,7 @@  discard block
 block discarded – undo
2100 2100
     protected function _readint($f) : int
2101 2101
     {
2102 2102
     	// Read a 4-byte integer from stream
2103
-    	$a = unpack('Ni',$this->_readstream($f,4));
2103
+    	$a = unpack('Ni', $this->_readstream($f, 4));
2104 2104
     	return $a['i'];
2105 2105
     }
2106 2106
     
@@ -2112,24 +2112,24 @@  discard block
 block discarded – undo
2112 2112
     protected function _parsegif(string $file) : array
2113 2113
     {
2114 2114
     	// Extract info from a GIF file (via PNG conversion)
2115
-    	if(!function_exists('imagepng'))
2115
+    	if (!function_exists('imagepng'))
2116 2116
     		$this->Error('GD extension is required for GIF support');
2117
-    	if(!function_exists('imagecreatefromgif'))
2117
+    	if (!function_exists('imagecreatefromgif'))
2118 2118
     		$this->Error('GD has no GIF read support');
2119 2119
     	$im = imagecreatefromgif($file);
2120
-    	if(!$im)
2121
-    		$this->Error('Missing or incorrect image file: '.$file);
2122
-    	imageinterlace($im,0);
2120
+    	if (!$im)
2121
+    		$this->Error('Missing or incorrect image file: ' . $file);
2122
+    	imageinterlace($im, 0);
2123 2123
     	ob_start();
2124 2124
     	imagepng($im);
2125 2125
     	$data = ob_get_clean();
2126 2126
     	imagedestroy($im);
2127
-    	$f = fopen('php://temp','rb+');
2128
-    	if(!$f)
2127
+    	$f = fopen('php://temp', 'rb+');
2128
+    	if (!$f)
2129 2129
     		$this->Error('Unable to create memory stream');
2130
-    	fwrite($f,$data);
2130
+    	fwrite($f, $data);
2131 2131
     	rewind($f);
2132
-    	$info = $this->_parsepngstream($f,$file);
2132
+    	$info = $this->_parsepngstream($f, $file);
2133 2133
     	fclose($f);
2134 2134
     	return $info;
2135 2135
     }
@@ -2141,13 +2141,13 @@  discard block
 block discarded – undo
2141 2141
     protected function _out(string $s) : void
2142 2142
     {
2143 2143
     	// Add a line to the document
2144
-    	if($this->state==2)
2145
-    		$this->pages[$this->page] .= $s."\n";
2146
-    	elseif($this->state==1)
2144
+    	if ($this->state == 2)
2145
+    		$this->pages[$this->page] .= $s . "\n";
2146
+    	elseif ($this->state == 1)
2147 2147
     		$this->_put($s);
2148
-    	elseif($this->state==0)
2148
+    	elseif ($this->state == 0)
2149 2149
     		$this->Error('No page has been added yet');
2150
-    	elseif($this->state==3)
2150
+    	elseif ($this->state == 3)
2151 2151
     		$this->Error('The document is closed');
2152 2152
     }
2153 2153
     
@@ -2157,7 +2157,7 @@  discard block
 block discarded – undo
2157 2157
      */
2158 2158
     protected function _put(string $s) : void
2159 2159
     {
2160
-    	$this->buffer .= $s."\n";
2160
+    	$this->buffer .= $s . "\n";
2161 2161
     }
2162 2162
     
2163 2163
     /**
@@ -2173,13 +2173,13 @@  discard block
 block discarded – undo
2173 2173
      * Begin a new object.
2174 2174
      * @param int $n
2175 2175
      */
2176
-    protected function _newobj(?int $n=null) : void
2176
+    protected function _newobj(?int $n = null) : void
2177 2177
     {
2178 2178
     	// Begin a new object
2179
-    	if($n===null)
2179
+    	if ($n === null)
2180 2180
     		$n = ++$this->n;
2181 2181
     	$this->offsets[$n] = $this->_getoffset();
2182
-    	$this->_put($n.' 0 obj');
2182
+    	$this->_put($n . ' 0 obj');
2183 2183
     }
2184 2184
     
2185 2185
     /**
@@ -2199,16 +2199,16 @@  discard block
 block discarded – undo
2199 2199
      */
2200 2200
     protected function _putstreamobject(string $data) : void
2201 2201
     {
2202
-    	if($this->compress)
2202
+    	if ($this->compress)
2203 2203
     	{
2204 2204
     		$entries = '/Filter /FlateDecode ';
2205 2205
     		$data = gzcompress($data);
2206 2206
     	}
2207 2207
     	else
2208 2208
     		$entries = '';
2209
-    	$entries .= '/Length '.strlen($data);
2209
+    	$entries .= '/Length ' . strlen($data);
2210 2210
     	$this->_newobj();
2211
-    	$this->_put('<<'.$entries.'>>');
2211
+    	$this->_put('<<' . $entries . '>>');
2212 2212
     	$this->_putstream($data);
2213 2213
     	$this->_put('endobj');
2214 2214
     }
@@ -2222,39 +2222,39 @@  discard block
 block discarded – undo
2222 2222
     	$this->_newobj();
2223 2223
     	$this->_put('<</Type /Page');
2224 2224
     	$this->_put('/Parent 1 0 R');
2225
-    	if(isset($this->PageInfo[$n]['size']))
2226
-    		$this->_put(sprintf('/MediaBox [0 0 %.2F %.2F]',$this->PageInfo[$n]['size'][0],$this->PageInfo[$n]['size'][1]));
2227
-    	if(isset($this->PageInfo[$n]['rotation']))
2228
-    		$this->_put('/Rotate '.$this->PageInfo[$n]['rotation']);
2225
+    	if (isset($this->PageInfo[$n]['size']))
2226
+    		$this->_put(sprintf('/MediaBox [0 0 %.2F %.2F]', $this->PageInfo[$n]['size'][0], $this->PageInfo[$n]['size'][1]));
2227
+    	if (isset($this->PageInfo[$n]['rotation']))
2228
+    		$this->_put('/Rotate ' . $this->PageInfo[$n]['rotation']);
2229 2229
     	$this->_put('/Resources 2 0 R');
2230
-    	if(isset($this->PageLinks[$n]))
2230
+    	if (isset($this->PageLinks[$n]))
2231 2231
     	{
2232 2232
     		// Links
2233 2233
     		$annots = '/Annots [';
2234
-    		foreach($this->PageLinks[$n] as $pl)
2234
+    		foreach ($this->PageLinks[$n] as $pl)
2235 2235
     		{
2236
-    			$rect = sprintf('%.2F %.2F %.2F %.2F',$pl[0],$pl[1],$pl[0]+$pl[2],$pl[1]-$pl[3]);
2237
-    			$annots .= '<</Type /Annot /Subtype /Link /Rect ['.$rect.'] /Border [0 0 0] ';
2238
-    			if(is_string($pl[4]))
2239
-    				$annots .= '/A <</S /URI /URI '.$this->_textstring($pl[4]).'>>>>';
2236
+    			$rect = sprintf('%.2F %.2F %.2F %.2F', $pl[0], $pl[1], $pl[0] + $pl[2], $pl[1] - $pl[3]);
2237
+    			$annots .= '<</Type /Annot /Subtype /Link /Rect [' . $rect . '] /Border [0 0 0] ';
2238
+    			if (is_string($pl[4]))
2239
+    				$annots .= '/A <</S /URI /URI ' . $this->_textstring($pl[4]) . '>>>>';
2240 2240
     			else
2241 2241
     			{
2242 2242
     				$l = $this->links[$pl[4]];
2243
-    				if(isset($this->PageInfo[$l[0]]['size']))
2243
+    				if (isset($this->PageInfo[$l[0]]['size']))
2244 2244
     					$h = $this->PageInfo[$l[0]]['size'][1];
2245 2245
     				else
2246
-    					$h = ($this->DefOrientation=='P') ? $this->DefPageSize[1]*$this->k : $this->DefPageSize[0]*$this->k;
2247
-    				$annots .= sprintf('/Dest [%d 0 R /XYZ 0 %.2F null]>>',$this->PageInfo[$l[0]]['n'],$h-$l[1]*$this->k);
2246
+    					$h = ($this->DefOrientation == 'P') ? $this->DefPageSize[1] * $this->k : $this->DefPageSize[0] * $this->k;
2247
+    				$annots .= sprintf('/Dest [%d 0 R /XYZ 0 %.2F null]>>', $this->PageInfo[$l[0]]['n'], $h - $l[1] * $this->k);
2248 2248
     			}
2249 2249
     		}
2250
-    		$this->_put($annots.']');
2250
+    		$this->_put($annots . ']');
2251 2251
     	}
2252
-    	if($this->WithAlpha)
2252
+    	if ($this->WithAlpha)
2253 2253
     		$this->_put('/Group <</Type /Group /S /Transparency /CS /DeviceRGB>>');
2254
-    	$this->_put('/Contents '.($this->n+1).' 0 R>>');
2254
+    	$this->_put('/Contents ' . ($this->n + 1) . ' 0 R>>');
2255 2255
     	$this->_put('endobj');
2256 2256
     	// Page content
2257
-    	if(!empty($this->AliasNbPages))
2257
+    	if (!empty($this->AliasNbPages))
2258 2258
     		$this->pages[$n] = str_replace($this->AliasNbPages, strval($this->page), $this->pages[$n]);
2259 2259
     	$this->_putstreamobject($this->pages[$n]);
2260 2260
     }
@@ -2265,19 +2265,19 @@  discard block
 block discarded – undo
2265 2265
     protected function _putpages() : void
2266 2266
     {
2267 2267
     	$nb = $this->page;
2268
-    	for($n=1;$n<=$nb;$n++)
2269
-    		$this->PageInfo[$n]['n'] = $this->n+1+2*($n-1);
2270
-    	for($n=1;$n<=$nb;$n++)
2268
+    	for ($n = 1; $n <= $nb; $n++)
2269
+    		$this->PageInfo[$n]['n'] = $this->n + 1 + 2 * ($n - 1);
2270
+    	for ($n = 1; $n <= $nb; $n++)
2271 2271
     		$this->_putpage($n);
2272 2272
     	// Pages root
2273 2273
     	$this->_newobj(1);
2274 2274
     	$this->_put('<</Type /Pages');
2275 2275
     	$kids = '/Kids [';
2276
-    	for($n=1;$n<=$nb;$n++)
2277
-    		$kids .= $this->PageInfo[$n]['n'].' 0 R ';
2278
-    	$this->_put($kids.']');
2279
-    	$this->_put('/Count '.$nb);
2280
-    	if($this->DefOrientation=='P')
2276
+    	for ($n = 1; $n <= $nb; $n++)
2277
+    		$kids .= $this->PageInfo[$n]['n'] . ' 0 R ';
2278
+    	$this->_put($kids . ']');
2279
+    	$this->_put('/Count ' . $nb);
2280
+    	if ($this->DefOrientation == 'P')
2281 2281
     	{
2282 2282
     		$w = $this->DefPageSize[0];
2283 2283
     		$h = $this->DefPageSize[1];
@@ -2287,7 +2287,7 @@  discard block
 block discarded – undo
2287 2287
     		$w = $this->DefPageSize[1];
2288 2288
     		$h = $this->DefPageSize[0];
2289 2289
     	}
2290
-    	$this->_put(sprintf('/MediaBox [0 0 %.2F %.2F]',$w*$this->k,$h*$this->k));
2290
+    	$this->_put(sprintf('/MediaBox [0 0 %.2F %.2F]', $w * $this->k, $h * $this->k));
2291 2291
     	$this->_put('>>');
2292 2292
     	$this->_put('endobj');
2293 2293
     }
@@ -2297,49 +2297,49 @@  discard block
 block discarded – undo
2297 2297
      */
2298 2298
     protected function _putfonts() : void
2299 2299
     {
2300
-    	foreach($this->FontFiles as $file=>$info)
2300
+    	foreach ($this->FontFiles as $file=>$info)
2301 2301
     	{
2302 2302
     		// Font file embedding
2303 2303
     		$this->_newobj();
2304 2304
     		$this->FontFiles[$file]['n'] = $this->n;
2305
-    		$font = file_get_contents($this->fontpath.$file,true);
2306
-    		if(!$font)
2307
-    			$this->Error('Font file not found: '.$file);
2308
-    		$compressed = (substr($file,-2)=='.z');
2309
-    		if(!$compressed && isset($info['length2']))
2310
-    			$font = substr($font,6,$info['length1']).substr($font,6+$info['length1']+6,$info['length2']);
2311
-    		$this->_put('<</Length '.strlen($font));
2312
-    		if($compressed)
2305
+    		$font = file_get_contents($this->fontpath . $file, true);
2306
+    		if (!$font)
2307
+    			$this->Error('Font file not found: ' . $file);
2308
+    		$compressed = (substr($file, -2) == '.z');
2309
+    		if (!$compressed && isset($info['length2']))
2310
+    			$font = substr($font, 6, $info['length1']) . substr($font, 6 + $info['length1'] + 6, $info['length2']);
2311
+    		$this->_put('<</Length ' . strlen($font));
2312
+    		if ($compressed)
2313 2313
     			$this->_put('/Filter /FlateDecode');
2314
-    		$this->_put('/Length1 '.$info['length1']);
2315
-    		if(isset($info['length2']))
2316
-    			$this->_put('/Length2 '.$info['length2'].' /Length3 0');
2314
+    		$this->_put('/Length1 ' . $info['length1']);
2315
+    		if (isset($info['length2']))
2316
+    			$this->_put('/Length2 ' . $info['length2'] . ' /Length3 0');
2317 2317
     		$this->_put('>>');
2318 2318
     		$this->_putstream($font);
2319 2319
     		$this->_put('endobj');
2320 2320
     	}
2321
-    	foreach($this->fonts as $k=>$font)
2321
+    	foreach ($this->fonts as $k=>$font)
2322 2322
     	{
2323 2323
     		// Encoding
2324
-    		if(isset($font['diff']))
2324
+    		if (isset($font['diff']))
2325 2325
     		{
2326
-    			if(!isset($this->encodings[$font['enc']]))
2326
+    			if (!isset($this->encodings[$font['enc']]))
2327 2327
     			{
2328 2328
     				$this->_newobj();
2329
-    				$this->_put('<</Type /Encoding /BaseEncoding /WinAnsiEncoding /Differences ['.$font['diff'].']>>');
2329
+    				$this->_put('<</Type /Encoding /BaseEncoding /WinAnsiEncoding /Differences [' . $font['diff'] . ']>>');
2330 2330
     				$this->_put('endobj');
2331 2331
     				$this->encodings[$font['enc']] = $this->n;
2332 2332
     			}
2333 2333
     		}
2334 2334
     		// ToUnicode CMap
2335 2335
     		$cmapkey = '';
2336
-    		if(isset($font['uv']))
2336
+    		if (isset($font['uv']))
2337 2337
     		{
2338
-    			if(isset($font['enc']))
2338
+    			if (isset($font['enc']))
2339 2339
     				$cmapkey = $font['enc'];
2340 2340
     			else
2341 2341
     				$cmapkey = $font['name'];
2342
-    			if(!isset($this->cmaps[$cmapkey]))
2342
+    			if (!isset($this->cmaps[$cmapkey]))
2343 2343
     			{
2344 2344
     				$cmap = $this->_tounicodecmap($font['uv']);
2345 2345
     				$this->_putstreamobject($cmap);
@@ -2347,67 +2347,67 @@  discard block
 block discarded – undo
2347 2347
     			}
2348 2348
     		}
2349 2349
     		// Font object
2350
-    		$this->fonts[$k]['n'] = $this->n+1;
2350
+    		$this->fonts[$k]['n'] = $this->n + 1;
2351 2351
     		$type = $font['type'];
2352 2352
     		$name = $font['name'];
2353
-    		if($font['subsetted'])
2354
-    			$name = 'AAAAAA+'.$name;
2355
-    		if($type=='Core')
2353
+    		if ($font['subsetted'])
2354
+    			$name = 'AAAAAA+' . $name;
2355
+    		if ($type == 'Core')
2356 2356
     		{
2357 2357
     			// Core font
2358 2358
     			$this->_newobj();
2359 2359
     			$this->_put('<</Type /Font');
2360
-    			$this->_put('/BaseFont /'.$name);
2360
+    			$this->_put('/BaseFont /' . $name);
2361 2361
     			$this->_put('/Subtype /Type1');
2362
-    			if($name!='Symbol' && $name!='ZapfDingbats')
2362
+    			if ($name != 'Symbol' && $name != 'ZapfDingbats')
2363 2363
     				$this->_put('/Encoding /WinAnsiEncoding');
2364
-    			if(isset($font['uv']))
2365
-    				$this->_put('/ToUnicode '.$this->cmaps[$cmapkey].' 0 R');
2364
+    			if (isset($font['uv']))
2365
+    				$this->_put('/ToUnicode ' . $this->cmaps[$cmapkey] . ' 0 R');
2366 2366
     			$this->_put('>>');
2367 2367
     			$this->_put('endobj');
2368 2368
     		}
2369
-    		elseif($type=='Type1' || $type=='TrueType')
2369
+    		elseif ($type == 'Type1' || $type == 'TrueType')
2370 2370
     		{
2371 2371
     			// Additional Type1 or TrueType/OpenType font
2372 2372
     			$this->_newobj();
2373 2373
     			$this->_put('<</Type /Font');
2374
-    			$this->_put('/BaseFont /'.$name);
2375
-    			$this->_put('/Subtype /'.$type);
2374
+    			$this->_put('/BaseFont /' . $name);
2375
+    			$this->_put('/Subtype /' . $type);
2376 2376
     			$this->_put('/FirstChar 32 /LastChar 255');
2377
-    			$this->_put('/Widths '.($this->n+1).' 0 R');
2378
-    			$this->_put('/FontDescriptor '.($this->n+2).' 0 R');
2379
-    			if(isset($font['diff']))
2380
-    				$this->_put('/Encoding '.$this->encodings[$font['enc']].' 0 R');
2377
+    			$this->_put('/Widths ' . ($this->n + 1) . ' 0 R');
2378
+    			$this->_put('/FontDescriptor ' . ($this->n + 2) . ' 0 R');
2379
+    			if (isset($font['diff']))
2380
+    				$this->_put('/Encoding ' . $this->encodings[$font['enc']] . ' 0 R');
2381 2381
     			else
2382 2382
     				$this->_put('/Encoding /WinAnsiEncoding');
2383
-    			if(isset($font['uv']))
2384
-    				$this->_put('/ToUnicode '.$this->cmaps[$cmapkey].' 0 R');
2383
+    			if (isset($font['uv']))
2384
+    				$this->_put('/ToUnicode ' . $this->cmaps[$cmapkey] . ' 0 R');
2385 2385
     			$this->_put('>>');
2386 2386
     			$this->_put('endobj');
2387 2387
     			// Widths
2388 2388
     			$this->_newobj();
2389 2389
     			$cw = &$font['cw'];
2390 2390
     			$s = '[';
2391
-    			for($i=32;$i<=255;$i++)
2392
-    				$s .= $cw[chr($i)].' ';
2393
-    			$this->_put($s.']');
2391
+    			for ($i = 32; $i <= 255; $i++)
2392
+    				$s .= $cw[chr($i)] . ' ';
2393
+    			$this->_put($s . ']');
2394 2394
     			$this->_put('endobj');
2395 2395
     			// Descriptor
2396 2396
     			$this->_newobj();
2397
-    			$s = '<</Type /FontDescriptor /FontName /'.$name;
2398
-    			foreach($font['desc'] as $k=>$v)
2399
-    				$s .= ' /'.$k.' '.$v;
2400
-    			if(!empty($font['file']))
2401
-    				$s .= ' /FontFile'.($type=='Type1' ? '' : '2').' '.$this->FontFiles[$font['file']]['n'].' 0 R';
2402
-    			$this->_put($s.'>>');
2397
+    			$s = '<</Type /FontDescriptor /FontName /' . $name;
2398
+    			foreach ($font['desc'] as $k=>$v)
2399
+    				$s .= ' /' . $k . ' ' . $v;
2400
+    			if (!empty($font['file']))
2401
+    				$s .= ' /FontFile' . ($type == 'Type1' ? '' : '2') . ' ' . $this->FontFiles[$font['file']]['n'] . ' 0 R';
2402
+    			$this->_put($s . '>>');
2403 2403
     			$this->_put('endobj');
2404 2404
     		}
2405 2405
     		else
2406 2406
     		{
2407 2407
     			// Allow for additional types
2408
-    			$mtd = '_put'.strtolower($type);
2409
-    			if(!method_exists($this,$mtd))
2410
-    				$this->Error('Unsupported font type: '.$type);
2408
+    			$mtd = '_put' . strtolower($type);
2409
+    			if (!method_exists($this, $mtd))
2410
+    				$this->Error('Unsupported font type: ' . $type);
2411 2411
     			$this->$mtd($font);
2412 2412
     		}
2413 2413
     	}
@@ -2423,16 +2423,16 @@  discard block
 block discarded – undo
2423 2423
     	$nbr = 0;
2424 2424
     	$chars = '';
2425 2425
     	$nbc = 0;
2426
-    	foreach($uv as $c=>$v)
2426
+    	foreach ($uv as $c=>$v)
2427 2427
     	{
2428
-    		if(is_array($v))
2428
+    		if (is_array($v))
2429 2429
     		{
2430
-    			$ranges .= sprintf("<%02X> <%02X> <%04X>\n",$c,$c+$v[1]-1,$v[0]);
2430
+    			$ranges .= sprintf("<%02X> <%02X> <%04X>\n", $c, $c + $v[1] - 1, $v[0]);
2431 2431
     			$nbr++;
2432 2432
     		}
2433 2433
     		else
2434 2434
     		{
2435
-    			$chars .= sprintf("<%02X> <%04X>\n",$c,$v);
2435
+    			$chars .= sprintf("<%02X> <%04X>\n", $c, $v);
2436 2436
     			$nbc++;
2437 2437
     		}
2438 2438
     	}
@@ -2449,13 +2449,13 @@  discard block
 block discarded – undo
2449 2449
     	$s .= "1 begincodespacerange\n";
2450 2450
     	$s .= "<00> <FF>\n";
2451 2451
     	$s .= "endcodespacerange\n";
2452
-    	if($nbr>0)
2452
+    	if ($nbr > 0)
2453 2453
     	{
2454 2454
     		$s .= "$nbr beginbfrange\n";
2455 2455
     		$s .= $ranges;
2456 2456
     		$s .= "endbfrange\n";
2457 2457
     	}
2458
-    	if($nbc>0)
2458
+    	if ($nbc > 0)
2459 2459
     	{
2460 2460
     		$s .= "$nbc beginbfchar\n";
2461 2461
     		$s .= $chars;
@@ -2473,7 +2473,7 @@  discard block
 block discarded – undo
2473 2473
      */
2474 2474
     protected function _putimages() : void
2475 2475
     {
2476
-    	foreach(array_keys($this->images) as $file)
2476
+    	foreach (array_keys($this->images) as $file)
2477 2477
     	{
2478 2478
     		$this->_putimage($this->images[$file]);
2479 2479
     		unset($this->images[$file]['data']);
@@ -2491,42 +2491,42 @@  discard block
 block discarded – undo
2491 2491
     	$info['n'] = $this->n;
2492 2492
     	$this->_put('<</Type /XObject');
2493 2493
     	$this->_put('/Subtype /Image');
2494
-    	$this->_put('/Width '.$info['w']);
2495
-    	$this->_put('/Height '.$info['h']);
2496
-    	if($info['cs']=='Indexed')
2497
-    		$this->_put('/ColorSpace [/Indexed /DeviceRGB '.(strlen($info['pal'])/3-1).' '.($this->n+1).' 0 R]');
2494
+    	$this->_put('/Width ' . $info['w']);
2495
+    	$this->_put('/Height ' . $info['h']);
2496
+    	if ($info['cs'] == 'Indexed')
2497
+    		$this->_put('/ColorSpace [/Indexed /DeviceRGB ' . (strlen($info['pal']) / 3 - 1) . ' ' . ($this->n + 1) . ' 0 R]');
2498 2498
     	else
2499 2499
     	{
2500
-    		$this->_put('/ColorSpace /'.$info['cs']);
2501
-    		if($info['cs']=='DeviceCMYK')
2500
+    		$this->_put('/ColorSpace /' . $info['cs']);
2501
+    		if ($info['cs'] == 'DeviceCMYK')
2502 2502
     			$this->_put('/Decode [1 0 1 0 1 0 1 0]');
2503 2503
     	}
2504
-    	$this->_put('/BitsPerComponent '.$info['bpc']);
2505
-    	if(isset($info['f']))
2506
-    		$this->_put('/Filter /'.$info['f']);
2507
-    	if(isset($info['dp']))
2508
-    		$this->_put('/DecodeParms <<'.$info['dp'].'>>');
2509
-    	if(isset($info['trns']) && is_array($info['trns']))
2504
+    	$this->_put('/BitsPerComponent ' . $info['bpc']);
2505
+    	if (isset($info['f']))
2506
+    		$this->_put('/Filter /' . $info['f']);
2507
+    	if (isset($info['dp']))
2508
+    		$this->_put('/DecodeParms <<' . $info['dp'] . '>>');
2509
+    	if (isset($info['trns']) && is_array($info['trns']))
2510 2510
     	{
2511 2511
     		$trns = '';
2512
-    		for($i=0;$i<count($info['trns']);$i++)
2513
-    			$trns .= $info['trns'][$i].' '.$info['trns'][$i].' ';
2514
-    		$this->_put('/Mask ['.$trns.']');
2512
+    		for ($i = 0; $i < count($info['trns']); $i++)
2513
+    			$trns .= $info['trns'][$i] . ' ' . $info['trns'][$i] . ' ';
2514
+    		$this->_put('/Mask [' . $trns . ']');
2515 2515
     	}
2516
-    	if(isset($info['smask']))
2517
-    		$this->_put('/SMask '.($this->n+1).' 0 R');
2518
-    	$this->_put('/Length '.strlen($info['data']).'>>');
2516
+    	if (isset($info['smask']))
2517
+    		$this->_put('/SMask ' . ($this->n + 1) . ' 0 R');
2518
+    	$this->_put('/Length ' . strlen($info['data']) . '>>');
2519 2519
     	$this->_putstream($info['data']);
2520 2520
     	$this->_put('endobj');
2521 2521
     	// Soft mask
2522
-    	if(isset($info['smask']))
2522
+    	if (isset($info['smask']))
2523 2523
     	{
2524
-    		$dp = '/Predictor 15 /Colors 1 /BitsPerComponent 8 /Columns '.$info['w'];
2524
+    		$dp = '/Predictor 15 /Colors 1 /BitsPerComponent 8 /Columns ' . $info['w'];
2525 2525
     		$smask = array('w'=>$info['w'], 'h'=>$info['h'], 'cs'=>'DeviceGray', 'bpc'=>8, 'f'=>$info['f'], 'dp'=>$dp, 'data'=>$info['smask']);
2526 2526
     		$this->_putimage($smask);
2527 2527
     	}
2528 2528
     	// Palette
2529
-    	if($info['cs']=='Indexed')
2529
+    	if ($info['cs'] == 'Indexed')
2530 2530
     		$this->_putstreamobject($info['pal']);
2531 2531
     }
2532 2532
     
@@ -2535,8 +2535,8 @@  discard block
 block discarded – undo
2535 2535
      */
2536 2536
     protected function _putxobjectdict() : void
2537 2537
     {
2538
-    	foreach($this->images as $image)
2539
-    		$this->_put('/I'.$image['i'].' '.$image['n'].' 0 R');
2538
+    	foreach ($this->images as $image)
2539
+    		$this->_put('/I' . $image['i'] . ' ' . $image['n'] . ' 0 R');
2540 2540
     }
2541 2541
     
2542 2542
     /**
@@ -2546,8 +2546,8 @@  discard block
 block discarded – undo
2546 2546
     {
2547 2547
     	$this->_put('/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]');
2548 2548
     	$this->_put('/Font <<');
2549
-    	foreach($this->fonts as $font)
2550
-    		$this->_put('/F'.$font['i'].' '.$font['n'].' 0 R');
2549
+    	foreach ($this->fonts as $font)
2550
+    		$this->_put('/F' . $font['i'] . ' ' . $font['n'] . ' 0 R');
2551 2551
     	$this->_put('>>');
2552 2552
     	$this->_put('/XObject <<');
2553 2553
     	$this->_putxobjectdict();
@@ -2574,10 +2574,10 @@  discard block
 block discarded – undo
2574 2574
      */
2575 2575
     protected function _putinfo() : void
2576 2576
     {
2577
-    	$this->metadata['Producer'] = 'FPDF '.FPDF_VERSION;
2578
-    	$this->metadata['CreationDate'] = 'D:'.@date('YmdHis');
2579
-    	foreach($this->metadata as $key=>$value)
2580
-    		$this->_put('/'.$key.' '.$this->_textstring($value));
2577
+    	$this->metadata['Producer'] = 'FPDF ' . FPDF_VERSION;
2578
+    	$this->metadata['CreationDate'] = 'D:' . @date('YmdHis');
2579
+    	foreach ($this->metadata as $key=>$value)
2580
+    		$this->_put('/' . $key . ' ' . $this->_textstring($value));
2581 2581
     }
2582 2582
     
2583 2583
     /**
@@ -2588,19 +2588,19 @@  discard block
 block discarded – undo
2588 2588
     	$n = $this->PageInfo[1]['n'];
2589 2589
     	$this->_put('/Type /Catalog');
2590 2590
     	$this->_put('/Pages 1 0 R');
2591
-    	if($this->ZoomMode=='fullpage')
2592
-    		$this->_put('/OpenAction ['.$n.' 0 R /Fit]');
2593
-    	elseif($this->ZoomMode=='fullwidth')
2594
-    		$this->_put('/OpenAction ['.$n.' 0 R /FitH null]');
2595
-    	elseif($this->ZoomMode=='real')
2596
-    		$this->_put('/OpenAction ['.$n.' 0 R /XYZ null null 1]');
2597
-    	elseif(!is_string($this->ZoomMode))
2598
-    		$this->_put('/OpenAction ['.$n.' 0 R /XYZ null null '.sprintf('%.2F',$this->ZoomMode/100).']');
2599
-    	if($this->LayoutMode=='single')
2591
+    	if ($this->ZoomMode == 'fullpage')
2592
+    		$this->_put('/OpenAction [' . $n . ' 0 R /Fit]');
2593
+    	elseif ($this->ZoomMode == 'fullwidth')
2594
+    		$this->_put('/OpenAction [' . $n . ' 0 R /FitH null]');
2595
+    	elseif ($this->ZoomMode == 'real')
2596
+    		$this->_put('/OpenAction [' . $n . ' 0 R /XYZ null null 1]');
2597
+    	elseif (!is_string($this->ZoomMode))
2598
+    		$this->_put('/OpenAction [' . $n . ' 0 R /XYZ null null ' . sprintf('%.2F', $this->ZoomMode / 100) . ']');
2599
+    	if ($this->LayoutMode == 'single')
2600 2600
     		$this->_put('/PageLayout /SinglePage');
2601
-    	elseif($this->LayoutMode=='continuous')
2601
+    	elseif ($this->LayoutMode == 'continuous')
2602 2602
     		$this->_put('/PageLayout /OneColumn');
2603
-    	elseif($this->LayoutMode=='two')
2603
+    	elseif ($this->LayoutMode == 'two')
2604 2604
     		$this->_put('/PageLayout /TwoColumnLeft');
2605 2605
     }
2606 2606
     
@@ -2609,7 +2609,7 @@  discard block
 block discarded – undo
2609 2609
      */
2610 2610
     protected function _putheader() : void
2611 2611
     {
2612
-    	$this->_put('%PDF-'.$this->PDFVersion);
2612
+    	$this->_put('%PDF-' . $this->PDFVersion);
2613 2613
     }
2614 2614
     
2615 2615
     /**
@@ -2617,9 +2617,9 @@  discard block
 block discarded – undo
2617 2617
      */
2618 2618
     protected function _puttrailer() : void
2619 2619
     {
2620
-    	$this->_put('/Size '.($this->n+1));
2621
-    	$this->_put('/Root '.$this->n.' 0 R');
2622
-    	$this->_put('/Info '.($this->n-1).' 0 R');
2620
+    	$this->_put('/Size ' . ($this->n + 1));
2621
+    	$this->_put('/Root ' . $this->n . ' 0 R');
2622
+    	$this->_put('/Info ' . ($this->n - 1) . ' 0 R');
2623 2623
     }
2624 2624
     
2625 2625
     /**
@@ -2645,10 +2645,10 @@  discard block
 block discarded – undo
2645 2645
     	// Cross-ref
2646 2646
     	$offset = $this->_getoffset();
2647 2647
     	$this->_put('xref');
2648
-    	$this->_put('0 '.($this->n+1));
2648
+    	$this->_put('0 ' . ($this->n + 1));
2649 2649
     	$this->_put('0000000000 65535 f ');
2650
-    	for($i=1;$i<=$this->n;$i++)
2651
-    		$this->_put(sprintf('%010d 00000 n ',$this->offsets[$i]));
2650
+    	for ($i = 1; $i <= $this->n; $i++)
2651
+    		$this->_put(sprintf('%010d 00000 n ', $this->offsets[$i]));
2652 2652
     	// Trailer
2653 2653
     	$this->_put('trailer');
2654 2654
     	$this->_put('<<');
Please login to merge, or discard this patch.