diff --git a/main/plugin/html2fpdf/credits.txt b/main/plugin/html2fpdf/credits.txt new file mode 100644 index 0000000000..c0e32e05db --- /dev/null +++ b/main/plugin/html2fpdf/credits.txt @@ -0,0 +1,23 @@ + ********* + *CREDITS* +__________ ********* +Thanks to: +¯¯¯¯¯¯¯¯¯¯ +-Olivier Plathey for the fpdf.php class [http://www.fpdf.org] +-Damon Kohler for the Flowing Block script [mailto:damonkohler@yahoo.com] +-Clément Lavoillotte for HTML-oriented FPDF idea +-Yamasoft for the gif.php class [http://www.yamasoft.com/] +-Jérôme Fenal for the _parsegif() function +-"VIETCOM" for the PDFTable code [http://www.freepgs.com/vietcom/tool/pdftable/] [mailto:vncommando@yahoo.com] +-Yukihiro O. for the SetDash() function [mailto:yukihiro_o@infoseek.jp] +-Ron Korving for the WordWrap() function +-Michel Poulain for the DisplayPreferences() function +-Patrick Benny for the MultiCellBlt() function idea [no longer in use] +-Seb for the _SetTextRendering() and SetTextOutline() functions [mailto:captainseb@wanadoo.fr] +-MorphSoft for the colornames list idea +-W3SCHOOLS for HTML-related reference info [http://www.w3schools.com/] +__________________ +Special Thanks to: +¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ +--- Montfort Cultural Association - the site for which I generated this script [http://www.montfort.org.br] + diff --git a/main/plugin/html2fpdf/font/courier.php b/main/plugin/html2fpdf/font/courier.php new file mode 100644 index 0000000000..913f9a4533 --- /dev/null +++ b/main/plugin/html2fpdf/font/courier.php @@ -0,0 +1,7 @@ + diff --git a/main/plugin/html2fpdf/font/helvetica.php b/main/plugin/html2fpdf/font/helvetica.php new file mode 100644 index 0000000000..ca94cdf21a --- /dev/null +++ b/main/plugin/html2fpdf/font/helvetica.php @@ -0,0 +1,15 @@ +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, + 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, + ','=>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, + '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, + '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, + '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, + 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, + 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, + 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, + 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, + 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, + 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); +?> diff --git a/main/plugin/html2fpdf/font/helveticab.php b/main/plugin/html2fpdf/font/helveticab.php new file mode 100644 index 0000000000..276cfa8cb8 --- /dev/null +++ b/main/plugin/html2fpdf/font/helveticab.php @@ -0,0 +1,15 @@ +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, + 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, + ','=>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, + '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, + '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, + '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, + 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, + 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, + 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, + 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, + 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, + 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); +?> diff --git a/main/plugin/html2fpdf/font/helveticabi.php b/main/plugin/html2fpdf/font/helveticabi.php new file mode 100644 index 0000000000..8d21774325 --- /dev/null +++ b/main/plugin/html2fpdf/font/helveticabi.php @@ -0,0 +1,15 @@ +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, + 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, + ','=>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, + '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, + '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, + '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, + 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, + 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, + 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, + 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, + 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, + 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); +?> diff --git a/main/plugin/html2fpdf/font/helveticai.php b/main/plugin/html2fpdf/font/helveticai.php new file mode 100644 index 0000000000..88bf4371bd --- /dev/null +++ b/main/plugin/html2fpdf/font/helveticai.php @@ -0,0 +1,15 @@ +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, + 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, + ','=>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, + '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, + '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, + '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, + 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, + 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, + 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, + 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, + 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, + 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); +?> diff --git a/main/plugin/html2fpdf/font/index.html b/main/plugin/html2fpdf/font/index.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/main/plugin/html2fpdf/font/makefont/cp1250.map b/main/plugin/html2fpdf/font/makefont/cp1250.map new file mode 100644 index 0000000000..ec110af061 --- /dev/null +++ b/main/plugin/html2fpdf/font/makefont/cp1250.map @@ -0,0 +1,251 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!89 U+2030 perthousand +!8A U+0160 Scaron +!8B U+2039 guilsinglleft +!8C U+015A Sacute +!8D U+0164 Tcaron +!8E U+017D Zcaron +!8F U+0179 Zacute +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!99 U+2122 trademark +!9A U+0161 scaron +!9B U+203A guilsinglright +!9C U+015B sacute +!9D U+0165 tcaron +!9E U+017E zcaron +!9F U+017A zacute +!A0 U+00A0 space +!A1 U+02C7 caron +!A2 U+02D8 breve +!A3 U+0141 Lslash +!A4 U+00A4 currency +!A5 U+0104 Aogonek +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+015E Scedilla +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+017B Zdotaccent +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+02DB ogonek +!B3 U+0142 lslash +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+0105 aogonek +!BA U+015F scedilla +!BB U+00BB guillemotright +!BC U+013D Lcaron +!BD U+02DD hungarumlaut +!BE U+013E lcaron +!BF U+017C zdotaccent +!C0 U+0154 Racute +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+0102 Abreve +!C4 U+00C4 Adieresis +!C5 U+0139 Lacute +!C6 U+0106 Cacute +!C7 U+00C7 Ccedilla +!C8 U+010C Ccaron +!C9 U+00C9 Eacute +!CA U+0118 Eogonek +!CB U+00CB Edieresis +!CC U+011A Ecaron +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+010E Dcaron +!D0 U+0110 Dcroat +!D1 U+0143 Nacute +!D2 U+0147 Ncaron +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+0150 Ohungarumlaut +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+0158 Rcaron +!D9 U+016E Uring +!DA U+00DA Uacute +!DB U+0170 Uhungarumlaut +!DC U+00DC Udieresis +!DD U+00DD Yacute +!DE U+0162 Tcommaaccent +!DF U+00DF germandbls +!E0 U+0155 racute +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+0103 abreve +!E4 U+00E4 adieresis +!E5 U+013A lacute +!E6 U+0107 cacute +!E7 U+00E7 ccedilla +!E8 U+010D ccaron +!E9 U+00E9 eacute +!EA U+0119 eogonek +!EB U+00EB edieresis +!EC U+011B ecaron +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+010F dcaron +!F0 U+0111 dcroat +!F1 U+0144 nacute +!F2 U+0148 ncaron +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+0151 ohungarumlaut +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+0159 rcaron +!F9 U+016F uring +!FA U+00FA uacute +!FB U+0171 uhungarumlaut +!FC U+00FC udieresis +!FD U+00FD yacute +!FE U+0163 tcommaaccent +!FF U+02D9 dotaccent diff --git a/main/plugin/html2fpdf/font/makefont/cp1251.map b/main/plugin/html2fpdf/font/makefont/cp1251.map new file mode 100644 index 0000000000..de6a198d99 --- /dev/null +++ b/main/plugin/html2fpdf/font/makefont/cp1251.map @@ -0,0 +1,255 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0402 afii10051 +!81 U+0403 afii10052 +!82 U+201A quotesinglbase +!83 U+0453 afii10100 +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!88 U+20AC Euro +!89 U+2030 perthousand +!8A U+0409 afii10058 +!8B U+2039 guilsinglleft +!8C U+040A afii10059 +!8D U+040C afii10061 +!8E U+040B afii10060 +!8F U+040F afii10145 +!90 U+0452 afii10099 +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!99 U+2122 trademark +!9A U+0459 afii10106 +!9B U+203A guilsinglright +!9C U+045A afii10107 +!9D U+045C afii10109 +!9E U+045B afii10108 +!9F U+045F afii10193 +!A0 U+00A0 space +!A1 U+040E afii10062 +!A2 U+045E afii10110 +!A3 U+0408 afii10057 +!A4 U+00A4 currency +!A5 U+0490 afii10050 +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+0401 afii10023 +!A9 U+00A9 copyright +!AA U+0404 afii10053 +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+0407 afii10056 +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+0406 afii10055 +!B3 U+0456 afii10103 +!B4 U+0491 afii10098 +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+0451 afii10071 +!B9 U+2116 afii61352 +!BA U+0454 afii10101 +!BB U+00BB guillemotright +!BC U+0458 afii10105 +!BD U+0405 afii10054 +!BE U+0455 afii10102 +!BF U+0457 afii10104 +!C0 U+0410 afii10017 +!C1 U+0411 afii10018 +!C2 U+0412 afii10019 +!C3 U+0413 afii10020 +!C4 U+0414 afii10021 +!C5 U+0415 afii10022 +!C6 U+0416 afii10024 +!C7 U+0417 afii10025 +!C8 U+0418 afii10026 +!C9 U+0419 afii10027 +!CA U+041A afii10028 +!CB U+041B afii10029 +!CC U+041C afii10030 +!CD U+041D afii10031 +!CE U+041E afii10032 +!CF U+041F afii10033 +!D0 U+0420 afii10034 +!D1 U+0421 afii10035 +!D2 U+0422 afii10036 +!D3 U+0423 afii10037 +!D4 U+0424 afii10038 +!D5 U+0425 afii10039 +!D6 U+0426 afii10040 +!D7 U+0427 afii10041 +!D8 U+0428 afii10042 +!D9 U+0429 afii10043 +!DA U+042A afii10044 +!DB U+042B afii10045 +!DC U+042C afii10046 +!DD U+042D afii10047 +!DE U+042E afii10048 +!DF U+042F afii10049 +!E0 U+0430 afii10065 +!E1 U+0431 afii10066 +!E2 U+0432 afii10067 +!E3 U+0433 afii10068 +!E4 U+0434 afii10069 +!E5 U+0435 afii10070 +!E6 U+0436 afii10072 +!E7 U+0437 afii10073 +!E8 U+0438 afii10074 +!E9 U+0439 afii10075 +!EA U+043A afii10076 +!EB U+043B afii10077 +!EC U+043C afii10078 +!ED U+043D afii10079 +!EE U+043E afii10080 +!EF U+043F afii10081 +!F0 U+0440 afii10082 +!F1 U+0441 afii10083 +!F2 U+0442 afii10084 +!F3 U+0443 afii10085 +!F4 U+0444 afii10086 +!F5 U+0445 afii10087 +!F6 U+0446 afii10088 +!F7 U+0447 afii10089 +!F8 U+0448 afii10090 +!F9 U+0449 afii10091 +!FA U+044A afii10092 +!FB U+044B afii10093 +!FC U+044C afii10094 +!FD U+044D afii10095 +!FE U+044E afii10096 +!FF U+044F afii10097 diff --git a/main/plugin/html2fpdf/font/makefont/cp1252.map b/main/plugin/html2fpdf/font/makefont/cp1252.map new file mode 100644 index 0000000000..dd490e5961 --- /dev/null +++ b/main/plugin/html2fpdf/font/makefont/cp1252.map @@ -0,0 +1,251 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!83 U+0192 florin +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!88 U+02C6 circumflex +!89 U+2030 perthousand +!8A U+0160 Scaron +!8B U+2039 guilsinglleft +!8C U+0152 OE +!8E U+017D Zcaron +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!98 U+02DC tilde +!99 U+2122 trademark +!9A U+0161 scaron +!9B U+203A guilsinglright +!9C U+0153 oe +!9E U+017E zcaron +!9F U+0178 Ydieresis +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+00D0 Eth +!D1 U+00D1 Ntilde +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+00DD Yacute +!DE U+00DE Thorn +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+00F0 eth +!F1 U+00F1 ntilde +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+00FD yacute +!FE U+00FE thorn +!FF U+00FF ydieresis diff --git a/main/plugin/html2fpdf/font/makefont/cp1253.map b/main/plugin/html2fpdf/font/makefont/cp1253.map new file mode 100644 index 0000000000..4bd826fb26 --- /dev/null +++ b/main/plugin/html2fpdf/font/makefont/cp1253.map @@ -0,0 +1,239 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!83 U+0192 florin +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!89 U+2030 perthousand +!8B U+2039 guilsinglleft +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!99 U+2122 trademark +!9B U+203A guilsinglright +!A0 U+00A0 space +!A1 U+0385 dieresistonos +!A2 U+0386 Alphatonos +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+2015 afii00208 +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+0384 tonos +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+0388 Epsilontonos +!B9 U+0389 Etatonos +!BA U+038A Iotatonos +!BB U+00BB guillemotright +!BC U+038C Omicrontonos +!BD U+00BD onehalf +!BE U+038E Upsilontonos +!BF U+038F Omegatonos +!C0 U+0390 iotadieresistonos +!C1 U+0391 Alpha +!C2 U+0392 Beta +!C3 U+0393 Gamma +!C4 U+0394 Delta +!C5 U+0395 Epsilon +!C6 U+0396 Zeta +!C7 U+0397 Eta +!C8 U+0398 Theta +!C9 U+0399 Iota +!CA U+039A Kappa +!CB U+039B Lambda +!CC U+039C Mu +!CD U+039D Nu +!CE U+039E Xi +!CF U+039F Omicron +!D0 U+03A0 Pi +!D1 U+03A1 Rho +!D3 U+03A3 Sigma +!D4 U+03A4 Tau +!D5 U+03A5 Upsilon +!D6 U+03A6 Phi +!D7 U+03A7 Chi +!D8 U+03A8 Psi +!D9 U+03A9 Omega +!DA U+03AA Iotadieresis +!DB U+03AB Upsilondieresis +!DC U+03AC alphatonos +!DD U+03AD epsilontonos +!DE U+03AE etatonos +!DF U+03AF iotatonos +!E0 U+03B0 upsilondieresistonos +!E1 U+03B1 alpha +!E2 U+03B2 beta +!E3 U+03B3 gamma +!E4 U+03B4 delta +!E5 U+03B5 epsilon +!E6 U+03B6 zeta +!E7 U+03B7 eta +!E8 U+03B8 theta +!E9 U+03B9 iota +!EA U+03BA kappa +!EB U+03BB lambda +!EC U+03BC mu +!ED U+03BD nu +!EE U+03BE xi +!EF U+03BF omicron +!F0 U+03C0 pi +!F1 U+03C1 rho +!F2 U+03C2 sigma1 +!F3 U+03C3 sigma +!F4 U+03C4 tau +!F5 U+03C5 upsilon +!F6 U+03C6 phi +!F7 U+03C7 chi +!F8 U+03C8 psi +!F9 U+03C9 omega +!FA U+03CA iotadieresis +!FB U+03CB upsilondieresis +!FC U+03CC omicrontonos +!FD U+03CD upsilontonos +!FE U+03CE omegatonos diff --git a/main/plugin/html2fpdf/font/makefont/cp1254.map b/main/plugin/html2fpdf/font/makefont/cp1254.map new file mode 100644 index 0000000000..829473b28c --- /dev/null +++ b/main/plugin/html2fpdf/font/makefont/cp1254.map @@ -0,0 +1,249 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!83 U+0192 florin +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!88 U+02C6 circumflex +!89 U+2030 perthousand +!8A U+0160 Scaron +!8B U+2039 guilsinglleft +!8C U+0152 OE +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!98 U+02DC tilde +!99 U+2122 trademark +!9A U+0161 scaron +!9B U+203A guilsinglright +!9C U+0153 oe +!9F U+0178 Ydieresis +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+011E Gbreve +!D1 U+00D1 Ntilde +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+0130 Idotaccent +!DE U+015E Scedilla +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+011F gbreve +!F1 U+00F1 ntilde +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+0131 dotlessi +!FE U+015F scedilla +!FF U+00FF ydieresis diff --git a/main/plugin/html2fpdf/font/makefont/cp1255.map b/main/plugin/html2fpdf/font/makefont/cp1255.map new file mode 100644 index 0000000000..079e10c61c --- /dev/null +++ b/main/plugin/html2fpdf/font/makefont/cp1255.map @@ -0,0 +1,233 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!83 U+0192 florin +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!88 U+02C6 circumflex +!89 U+2030 perthousand +!8B U+2039 guilsinglleft +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!98 U+02DC tilde +!99 U+2122 trademark +!9B U+203A guilsinglright +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+20AA afii57636 +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00D7 multiply +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD sfthyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 middot +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00F7 divide +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+05B0 afii57799 +!C1 U+05B1 afii57801 +!C2 U+05B2 afii57800 +!C3 U+05B3 afii57802 +!C4 U+05B4 afii57793 +!C5 U+05B5 afii57794 +!C6 U+05B6 afii57795 +!C7 U+05B7 afii57798 +!C8 U+05B8 afii57797 +!C9 U+05B9 afii57806 +!CB U+05BB afii57796 +!CC U+05BC afii57807 +!CD U+05BD afii57839 +!CE U+05BE afii57645 +!CF U+05BF afii57841 +!D0 U+05C0 afii57842 +!D1 U+05C1 afii57804 +!D2 U+05C2 afii57803 +!D3 U+05C3 afii57658 +!D4 U+05F0 afii57716 +!D5 U+05F1 afii57717 +!D6 U+05F2 afii57718 +!D7 U+05F3 gereshhebrew +!D8 U+05F4 gershayimhebrew +!E0 U+05D0 afii57664 +!E1 U+05D1 afii57665 +!E2 U+05D2 afii57666 +!E3 U+05D3 afii57667 +!E4 U+05D4 afii57668 +!E5 U+05D5 afii57669 +!E6 U+05D6 afii57670 +!E7 U+05D7 afii57671 +!E8 U+05D8 afii57672 +!E9 U+05D9 afii57673 +!EA U+05DA afii57674 +!EB U+05DB afii57675 +!EC U+05DC afii57676 +!ED U+05DD afii57677 +!EE U+05DE afii57678 +!EF U+05DF afii57679 +!F0 U+05E0 afii57680 +!F1 U+05E1 afii57681 +!F2 U+05E2 afii57682 +!F3 U+05E3 afii57683 +!F4 U+05E4 afii57684 +!F5 U+05E5 afii57685 +!F6 U+05E6 afii57686 +!F7 U+05E7 afii57687 +!F8 U+05E8 afii57688 +!F9 U+05E9 afii57689 +!FA U+05EA afii57690 +!FD U+200E afii299 +!FE U+200F afii300 diff --git a/main/plugin/html2fpdf/font/makefont/cp1257.map b/main/plugin/html2fpdf/font/makefont/cp1257.map new file mode 100644 index 0000000000..2f2ecfa21d --- /dev/null +++ b/main/plugin/html2fpdf/font/makefont/cp1257.map @@ -0,0 +1,244 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!89 U+2030 perthousand +!8B U+2039 guilsinglleft +!8D U+00A8 dieresis +!8E U+02C7 caron +!8F U+00B8 cedilla +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!99 U+2122 trademark +!9B U+203A guilsinglright +!9D U+00AF macron +!9E U+02DB ogonek +!A0 U+00A0 space +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00D8 Oslash +!A9 U+00A9 copyright +!AA U+0156 Rcommaaccent +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00C6 AE +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00F8 oslash +!B9 U+00B9 onesuperior +!BA U+0157 rcommaaccent +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00E6 ae +!C0 U+0104 Aogonek +!C1 U+012E Iogonek +!C2 U+0100 Amacron +!C3 U+0106 Cacute +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+0118 Eogonek +!C7 U+0112 Emacron +!C8 U+010C Ccaron +!C9 U+00C9 Eacute +!CA U+0179 Zacute +!CB U+0116 Edotaccent +!CC U+0122 Gcommaaccent +!CD U+0136 Kcommaaccent +!CE U+012A Imacron +!CF U+013B Lcommaaccent +!D0 U+0160 Scaron +!D1 U+0143 Nacute +!D2 U+0145 Ncommaaccent +!D3 U+00D3 Oacute +!D4 U+014C Omacron +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+0172 Uogonek +!D9 U+0141 Lslash +!DA U+015A Sacute +!DB U+016A Umacron +!DC U+00DC Udieresis +!DD U+017B Zdotaccent +!DE U+017D Zcaron +!DF U+00DF germandbls +!E0 U+0105 aogonek +!E1 U+012F iogonek +!E2 U+0101 amacron +!E3 U+0107 cacute +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+0119 eogonek +!E7 U+0113 emacron +!E8 U+010D ccaron +!E9 U+00E9 eacute +!EA U+017A zacute +!EB U+0117 edotaccent +!EC U+0123 gcommaaccent +!ED U+0137 kcommaaccent +!EE U+012B imacron +!EF U+013C lcommaaccent +!F0 U+0161 scaron +!F1 U+0144 nacute +!F2 U+0146 ncommaaccent +!F3 U+00F3 oacute +!F4 U+014D omacron +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+0173 uogonek +!F9 U+0142 lslash +!FA U+015B sacute +!FB U+016B umacron +!FC U+00FC udieresis +!FD U+017C zdotaccent +!FE U+017E zcaron +!FF U+02D9 dotaccent diff --git a/main/plugin/html2fpdf/font/makefont/cp1258.map b/main/plugin/html2fpdf/font/makefont/cp1258.map new file mode 100644 index 0000000000..fed915f715 --- /dev/null +++ b/main/plugin/html2fpdf/font/makefont/cp1258.map @@ -0,0 +1,247 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!83 U+0192 florin +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!88 U+02C6 circumflex +!89 U+2030 perthousand +!8B U+2039 guilsinglleft +!8C U+0152 OE +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!98 U+02DC tilde +!99 U+2122 trademark +!9B U+203A guilsinglright +!9C U+0153 oe +!9F U+0178 Ydieresis +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+0102 Abreve +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+0300 gravecomb +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+0110 Dcroat +!D1 U+00D1 Ntilde +!D2 U+0309 hookabovecomb +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+01A0 Ohorn +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+01AF Uhorn +!DE U+0303 tildecomb +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+0103 abreve +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+0301 acutecomb +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+0111 dcroat +!F1 U+00F1 ntilde +!F2 U+0323 dotbelowcomb +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+01A1 ohorn +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+01B0 uhorn +!FE U+20AB dong +!FF U+00FF ydieresis diff --git a/main/plugin/html2fpdf/font/makefont/cp874.map b/main/plugin/html2fpdf/font/makefont/cp874.map new file mode 100644 index 0000000000..1006e6b17f --- /dev/null +++ b/main/plugin/html2fpdf/font/makefont/cp874.map @@ -0,0 +1,225 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!85 U+2026 ellipsis +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!A0 U+00A0 space +!A1 U+0E01 kokaithai +!A2 U+0E02 khokhaithai +!A3 U+0E03 khokhuatthai +!A4 U+0E04 khokhwaithai +!A5 U+0E05 khokhonthai +!A6 U+0E06 khorakhangthai +!A7 U+0E07 ngonguthai +!A8 U+0E08 chochanthai +!A9 U+0E09 chochingthai +!AA U+0E0A chochangthai +!AB U+0E0B sosothai +!AC U+0E0C chochoethai +!AD U+0E0D yoyingthai +!AE U+0E0E dochadathai +!AF U+0E0F topatakthai +!B0 U+0E10 thothanthai +!B1 U+0E11 thonangmonthothai +!B2 U+0E12 thophuthaothai +!B3 U+0E13 nonenthai +!B4 U+0E14 dodekthai +!B5 U+0E15 totaothai +!B6 U+0E16 thothungthai +!B7 U+0E17 thothahanthai +!B8 U+0E18 thothongthai +!B9 U+0E19 nonuthai +!BA U+0E1A bobaimaithai +!BB U+0E1B poplathai +!BC U+0E1C phophungthai +!BD U+0E1D fofathai +!BE U+0E1E phophanthai +!BF U+0E1F fofanthai +!C0 U+0E20 phosamphaothai +!C1 U+0E21 momathai +!C2 U+0E22 yoyakthai +!C3 U+0E23 roruathai +!C4 U+0E24 ruthai +!C5 U+0E25 lolingthai +!C6 U+0E26 luthai +!C7 U+0E27 wowaenthai +!C8 U+0E28 sosalathai +!C9 U+0E29 sorusithai +!CA U+0E2A sosuathai +!CB U+0E2B hohipthai +!CC U+0E2C lochulathai +!CD U+0E2D oangthai +!CE U+0E2E honokhukthai +!CF U+0E2F paiyannoithai +!D0 U+0E30 saraathai +!D1 U+0E31 maihanakatthai +!D2 U+0E32 saraaathai +!D3 U+0E33 saraamthai +!D4 U+0E34 saraithai +!D5 U+0E35 saraiithai +!D6 U+0E36 sarauethai +!D7 U+0E37 saraueethai +!D8 U+0E38 sarauthai +!D9 U+0E39 sarauuthai +!DA U+0E3A phinthuthai +!DF U+0E3F bahtthai +!E0 U+0E40 saraethai +!E1 U+0E41 saraaethai +!E2 U+0E42 saraothai +!E3 U+0E43 saraaimaimuanthai +!E4 U+0E44 saraaimaimalaithai +!E5 U+0E45 lakkhangyaothai +!E6 U+0E46 maiyamokthai +!E7 U+0E47 maitaikhuthai +!E8 U+0E48 maiekthai +!E9 U+0E49 maithothai +!EA U+0E4A maitrithai +!EB U+0E4B maichattawathai +!EC U+0E4C thanthakhatthai +!ED U+0E4D nikhahitthai +!EE U+0E4E yamakkanthai +!EF U+0E4F fongmanthai +!F0 U+0E50 zerothai +!F1 U+0E51 onethai +!F2 U+0E52 twothai +!F3 U+0E53 threethai +!F4 U+0E54 fourthai +!F5 U+0E55 fivethai +!F6 U+0E56 sixthai +!F7 U+0E57 seventhai +!F8 U+0E58 eightthai +!F9 U+0E59 ninethai +!FA U+0E5A angkhankhuthai +!FB U+0E5B khomutthai diff --git a/main/plugin/html2fpdf/font/makefont/index.html b/main/plugin/html2fpdf/font/makefont/index.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/main/plugin/html2fpdf/font/makefont/iso-8859-1.map b/main/plugin/html2fpdf/font/makefont/iso-8859-1.map new file mode 100644 index 0000000000..61740a38fa --- /dev/null +++ b/main/plugin/html2fpdf/font/makefont/iso-8859-1.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+00D0 Eth +!D1 U+00D1 Ntilde +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+00DD Yacute +!DE U+00DE Thorn +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+00F0 eth +!F1 U+00F1 ntilde +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+00FD yacute +!FE U+00FE thorn +!FF U+00FF ydieresis diff --git a/main/plugin/html2fpdf/font/makefont/iso-8859-11.map b/main/plugin/html2fpdf/font/makefont/iso-8859-11.map new file mode 100644 index 0000000000..9168812066 --- /dev/null +++ b/main/plugin/html2fpdf/font/makefont/iso-8859-11.map @@ -0,0 +1,248 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+0E01 kokaithai +!A2 U+0E02 khokhaithai +!A3 U+0E03 khokhuatthai +!A4 U+0E04 khokhwaithai +!A5 U+0E05 khokhonthai +!A6 U+0E06 khorakhangthai +!A7 U+0E07 ngonguthai +!A8 U+0E08 chochanthai +!A9 U+0E09 chochingthai +!AA U+0E0A chochangthai +!AB U+0E0B sosothai +!AC U+0E0C chochoethai +!AD U+0E0D yoyingthai +!AE U+0E0E dochadathai +!AF U+0E0F topatakthai +!B0 U+0E10 thothanthai +!B1 U+0E11 thonangmonthothai +!B2 U+0E12 thophuthaothai +!B3 U+0E13 nonenthai +!B4 U+0E14 dodekthai +!B5 U+0E15 totaothai +!B6 U+0E16 thothungthai +!B7 U+0E17 thothahanthai +!B8 U+0E18 thothongthai +!B9 U+0E19 nonuthai +!BA U+0E1A bobaimaithai +!BB U+0E1B poplathai +!BC U+0E1C phophungthai +!BD U+0E1D fofathai +!BE U+0E1E phophanthai +!BF U+0E1F fofanthai +!C0 U+0E20 phosamphaothai +!C1 U+0E21 momathai +!C2 U+0E22 yoyakthai +!C3 U+0E23 roruathai +!C4 U+0E24 ruthai +!C5 U+0E25 lolingthai +!C6 U+0E26 luthai +!C7 U+0E27 wowaenthai +!C8 U+0E28 sosalathai +!C9 U+0E29 sorusithai +!CA U+0E2A sosuathai +!CB U+0E2B hohipthai +!CC U+0E2C lochulathai +!CD U+0E2D oangthai +!CE U+0E2E honokhukthai +!CF U+0E2F paiyannoithai +!D0 U+0E30 saraathai +!D1 U+0E31 maihanakatthai +!D2 U+0E32 saraaathai +!D3 U+0E33 saraamthai +!D4 U+0E34 saraithai +!D5 U+0E35 saraiithai +!D6 U+0E36 sarauethai +!D7 U+0E37 saraueethai +!D8 U+0E38 sarauthai +!D9 U+0E39 sarauuthai +!DA U+0E3A phinthuthai +!DF U+0E3F bahtthai +!E0 U+0E40 saraethai +!E1 U+0E41 saraaethai +!E2 U+0E42 saraothai +!E3 U+0E43 saraaimaimuanthai +!E4 U+0E44 saraaimaimalaithai +!E5 U+0E45 lakkhangyaothai +!E6 U+0E46 maiyamokthai +!E7 U+0E47 maitaikhuthai +!E8 U+0E48 maiekthai +!E9 U+0E49 maithothai +!EA U+0E4A maitrithai +!EB U+0E4B maichattawathai +!EC U+0E4C thanthakhatthai +!ED U+0E4D nikhahitthai +!EE U+0E4E yamakkanthai +!EF U+0E4F fongmanthai +!F0 U+0E50 zerothai +!F1 U+0E51 onethai +!F2 U+0E52 twothai +!F3 U+0E53 threethai +!F4 U+0E54 fourthai +!F5 U+0E55 fivethai +!F6 U+0E56 sixthai +!F7 U+0E57 seventhai +!F8 U+0E58 eightthai +!F9 U+0E59 ninethai +!FA U+0E5A angkhankhuthai +!FB U+0E5B khomutthai diff --git a/main/plugin/html2fpdf/font/makefont/iso-8859-15.map b/main/plugin/html2fpdf/font/makefont/iso-8859-15.map new file mode 100644 index 0000000000..6c2b571279 --- /dev/null +++ b/main/plugin/html2fpdf/font/makefont/iso-8859-15.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+20AC Euro +!A5 U+00A5 yen +!A6 U+0160 Scaron +!A7 U+00A7 section +!A8 U+0161 scaron +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+017D Zcaron +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+017E zcaron +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+0152 OE +!BD U+0153 oe +!BE U+0178 Ydieresis +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+00D0 Eth +!D1 U+00D1 Ntilde +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+00DD Yacute +!DE U+00DE Thorn +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+00F0 eth +!F1 U+00F1 ntilde +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+00FD yacute +!FE U+00FE thorn +!FF U+00FF ydieresis diff --git a/main/plugin/html2fpdf/font/makefont/iso-8859-16.map b/main/plugin/html2fpdf/font/makefont/iso-8859-16.map new file mode 100644 index 0000000000..202c8fe594 --- /dev/null +++ b/main/plugin/html2fpdf/font/makefont/iso-8859-16.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+0104 Aogonek +!A2 U+0105 aogonek +!A3 U+0141 Lslash +!A4 U+20AC Euro +!A5 U+201E quotedblbase +!A6 U+0160 Scaron +!A7 U+00A7 section +!A8 U+0161 scaron +!A9 U+00A9 copyright +!AA U+0218 Scommaaccent +!AB U+00AB guillemotleft +!AC U+0179 Zacute +!AD U+00AD hyphen +!AE U+017A zacute +!AF U+017B Zdotaccent +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+010C Ccaron +!B3 U+0142 lslash +!B4 U+017D Zcaron +!B5 U+201D quotedblright +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+017E zcaron +!B9 U+010D ccaron +!BA U+0219 scommaaccent +!BB U+00BB guillemotright +!BC U+0152 OE +!BD U+0153 oe +!BE U+0178 Ydieresis +!BF U+017C zdotaccent +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+0102 Abreve +!C4 U+00C4 Adieresis +!C5 U+0106 Cacute +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+0110 Dcroat +!D1 U+0143 Nacute +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+0150 Ohungarumlaut +!D6 U+00D6 Odieresis +!D7 U+015A Sacute +!D8 U+0170 Uhungarumlaut +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+0118 Eogonek +!DE U+021A Tcommaaccent +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+0103 abreve +!E4 U+00E4 adieresis +!E5 U+0107 cacute +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+0111 dcroat +!F1 U+0144 nacute +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+0151 ohungarumlaut +!F6 U+00F6 odieresis +!F7 U+015B sacute +!F8 U+0171 uhungarumlaut +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+0119 eogonek +!FE U+021B tcommaaccent +!FF U+00FF ydieresis diff --git a/main/plugin/html2fpdf/font/makefont/iso-8859-2.map b/main/plugin/html2fpdf/font/makefont/iso-8859-2.map new file mode 100644 index 0000000000..65ae09f958 --- /dev/null +++ b/main/plugin/html2fpdf/font/makefont/iso-8859-2.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+0104 Aogonek +!A2 U+02D8 breve +!A3 U+0141 Lslash +!A4 U+00A4 currency +!A5 U+013D Lcaron +!A6 U+015A Sacute +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+0160 Scaron +!AA U+015E Scedilla +!AB U+0164 Tcaron +!AC U+0179 Zacute +!AD U+00AD hyphen +!AE U+017D Zcaron +!AF U+017B Zdotaccent +!B0 U+00B0 degree +!B1 U+0105 aogonek +!B2 U+02DB ogonek +!B3 U+0142 lslash +!B4 U+00B4 acute +!B5 U+013E lcaron +!B6 U+015B sacute +!B7 U+02C7 caron +!B8 U+00B8 cedilla +!B9 U+0161 scaron +!BA U+015F scedilla +!BB U+0165 tcaron +!BC U+017A zacute +!BD U+02DD hungarumlaut +!BE U+017E zcaron +!BF U+017C zdotaccent +!C0 U+0154 Racute +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+0102 Abreve +!C4 U+00C4 Adieresis +!C5 U+0139 Lacute +!C6 U+0106 Cacute +!C7 U+00C7 Ccedilla +!C8 U+010C Ccaron +!C9 U+00C9 Eacute +!CA U+0118 Eogonek +!CB U+00CB Edieresis +!CC U+011A Ecaron +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+010E Dcaron +!D0 U+0110 Dcroat +!D1 U+0143 Nacute +!D2 U+0147 Ncaron +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+0150 Ohungarumlaut +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+0158 Rcaron +!D9 U+016E Uring +!DA U+00DA Uacute +!DB U+0170 Uhungarumlaut +!DC U+00DC Udieresis +!DD U+00DD Yacute +!DE U+0162 Tcommaaccent +!DF U+00DF germandbls +!E0 U+0155 racute +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+0103 abreve +!E4 U+00E4 adieresis +!E5 U+013A lacute +!E6 U+0107 cacute +!E7 U+00E7 ccedilla +!E8 U+010D ccaron +!E9 U+00E9 eacute +!EA U+0119 eogonek +!EB U+00EB edieresis +!EC U+011B ecaron +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+010F dcaron +!F0 U+0111 dcroat +!F1 U+0144 nacute +!F2 U+0148 ncaron +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+0151 ohungarumlaut +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+0159 rcaron +!F9 U+016F uring +!FA U+00FA uacute +!FB U+0171 uhungarumlaut +!FC U+00FC udieresis +!FD U+00FD yacute +!FE U+0163 tcommaaccent +!FF U+02D9 dotaccent diff --git a/main/plugin/html2fpdf/font/makefont/iso-8859-4.map b/main/plugin/html2fpdf/font/makefont/iso-8859-4.map new file mode 100644 index 0000000000..a7d87bf3ef --- /dev/null +++ b/main/plugin/html2fpdf/font/makefont/iso-8859-4.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+0104 Aogonek +!A2 U+0138 kgreenlandic +!A3 U+0156 Rcommaaccent +!A4 U+00A4 currency +!A5 U+0128 Itilde +!A6 U+013B Lcommaaccent +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+0160 Scaron +!AA U+0112 Emacron +!AB U+0122 Gcommaaccent +!AC U+0166 Tbar +!AD U+00AD hyphen +!AE U+017D Zcaron +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+0105 aogonek +!B2 U+02DB ogonek +!B3 U+0157 rcommaaccent +!B4 U+00B4 acute +!B5 U+0129 itilde +!B6 U+013C lcommaaccent +!B7 U+02C7 caron +!B8 U+00B8 cedilla +!B9 U+0161 scaron +!BA U+0113 emacron +!BB U+0123 gcommaaccent +!BC U+0167 tbar +!BD U+014A Eng +!BE U+017E zcaron +!BF U+014B eng +!C0 U+0100 Amacron +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+012E Iogonek +!C8 U+010C Ccaron +!C9 U+00C9 Eacute +!CA U+0118 Eogonek +!CB U+00CB Edieresis +!CC U+0116 Edotaccent +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+012A Imacron +!D0 U+0110 Dcroat +!D1 U+0145 Ncommaaccent +!D2 U+014C Omacron +!D3 U+0136 Kcommaaccent +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+0172 Uogonek +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+0168 Utilde +!DE U+016A Umacron +!DF U+00DF germandbls +!E0 U+0101 amacron +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+012F iogonek +!E8 U+010D ccaron +!E9 U+00E9 eacute +!EA U+0119 eogonek +!EB U+00EB edieresis +!EC U+0117 edotaccent +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+012B imacron +!F0 U+0111 dcroat +!F1 U+0146 ncommaaccent +!F2 U+014D omacron +!F3 U+0137 kcommaaccent +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+0173 uogonek +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+0169 utilde +!FE U+016B umacron +!FF U+02D9 dotaccent diff --git a/main/plugin/html2fpdf/font/makefont/iso-8859-5.map b/main/plugin/html2fpdf/font/makefont/iso-8859-5.map new file mode 100644 index 0000000000..f9cd4edcf8 --- /dev/null +++ b/main/plugin/html2fpdf/font/makefont/iso-8859-5.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+0401 afii10023 +!A2 U+0402 afii10051 +!A3 U+0403 afii10052 +!A4 U+0404 afii10053 +!A5 U+0405 afii10054 +!A6 U+0406 afii10055 +!A7 U+0407 afii10056 +!A8 U+0408 afii10057 +!A9 U+0409 afii10058 +!AA U+040A afii10059 +!AB U+040B afii10060 +!AC U+040C afii10061 +!AD U+00AD hyphen +!AE U+040E afii10062 +!AF U+040F afii10145 +!B0 U+0410 afii10017 +!B1 U+0411 afii10018 +!B2 U+0412 afii10019 +!B3 U+0413 afii10020 +!B4 U+0414 afii10021 +!B5 U+0415 afii10022 +!B6 U+0416 afii10024 +!B7 U+0417 afii10025 +!B8 U+0418 afii10026 +!B9 U+0419 afii10027 +!BA U+041A afii10028 +!BB U+041B afii10029 +!BC U+041C afii10030 +!BD U+041D afii10031 +!BE U+041E afii10032 +!BF U+041F afii10033 +!C0 U+0420 afii10034 +!C1 U+0421 afii10035 +!C2 U+0422 afii10036 +!C3 U+0423 afii10037 +!C4 U+0424 afii10038 +!C5 U+0425 afii10039 +!C6 U+0426 afii10040 +!C7 U+0427 afii10041 +!C8 U+0428 afii10042 +!C9 U+0429 afii10043 +!CA U+042A afii10044 +!CB U+042B afii10045 +!CC U+042C afii10046 +!CD U+042D afii10047 +!CE U+042E afii10048 +!CF U+042F afii10049 +!D0 U+0430 afii10065 +!D1 U+0431 afii10066 +!D2 U+0432 afii10067 +!D3 U+0433 afii10068 +!D4 U+0434 afii10069 +!D5 U+0435 afii10070 +!D6 U+0436 afii10072 +!D7 U+0437 afii10073 +!D8 U+0438 afii10074 +!D9 U+0439 afii10075 +!DA U+043A afii10076 +!DB U+043B afii10077 +!DC U+043C afii10078 +!DD U+043D afii10079 +!DE U+043E afii10080 +!DF U+043F afii10081 +!E0 U+0440 afii10082 +!E1 U+0441 afii10083 +!E2 U+0442 afii10084 +!E3 U+0443 afii10085 +!E4 U+0444 afii10086 +!E5 U+0445 afii10087 +!E6 U+0446 afii10088 +!E7 U+0447 afii10089 +!E8 U+0448 afii10090 +!E9 U+0449 afii10091 +!EA U+044A afii10092 +!EB U+044B afii10093 +!EC U+044C afii10094 +!ED U+044D afii10095 +!EE U+044E afii10096 +!EF U+044F afii10097 +!F0 U+2116 afii61352 +!F1 U+0451 afii10071 +!F2 U+0452 afii10099 +!F3 U+0453 afii10100 +!F4 U+0454 afii10101 +!F5 U+0455 afii10102 +!F6 U+0456 afii10103 +!F7 U+0457 afii10104 +!F8 U+0458 afii10105 +!F9 U+0459 afii10106 +!FA U+045A afii10107 +!FB U+045B afii10108 +!FC U+045C afii10109 +!FD U+00A7 section +!FE U+045E afii10110 +!FF U+045F afii10193 diff --git a/main/plugin/html2fpdf/font/makefont/iso-8859-7.map b/main/plugin/html2fpdf/font/makefont/iso-8859-7.map new file mode 100644 index 0000000000..e163796b1c --- /dev/null +++ b/main/plugin/html2fpdf/font/makefont/iso-8859-7.map @@ -0,0 +1,250 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+2018 quoteleft +!A2 U+2019 quoteright +!A3 U+00A3 sterling +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AF U+2015 afii00208 +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+0384 tonos +!B5 U+0385 dieresistonos +!B6 U+0386 Alphatonos +!B7 U+00B7 periodcentered +!B8 U+0388 Epsilontonos +!B9 U+0389 Etatonos +!BA U+038A Iotatonos +!BB U+00BB guillemotright +!BC U+038C Omicrontonos +!BD U+00BD onehalf +!BE U+038E Upsilontonos +!BF U+038F Omegatonos +!C0 U+0390 iotadieresistonos +!C1 U+0391 Alpha +!C2 U+0392 Beta +!C3 U+0393 Gamma +!C4 U+0394 Delta +!C5 U+0395 Epsilon +!C6 U+0396 Zeta +!C7 U+0397 Eta +!C8 U+0398 Theta +!C9 U+0399 Iota +!CA U+039A Kappa +!CB U+039B Lambda +!CC U+039C Mu +!CD U+039D Nu +!CE U+039E Xi +!CF U+039F Omicron +!D0 U+03A0 Pi +!D1 U+03A1 Rho +!D3 U+03A3 Sigma +!D4 U+03A4 Tau +!D5 U+03A5 Upsilon +!D6 U+03A6 Phi +!D7 U+03A7 Chi +!D8 U+03A8 Psi +!D9 U+03A9 Omega +!DA U+03AA Iotadieresis +!DB U+03AB Upsilondieresis +!DC U+03AC alphatonos +!DD U+03AD epsilontonos +!DE U+03AE etatonos +!DF U+03AF iotatonos +!E0 U+03B0 upsilondieresistonos +!E1 U+03B1 alpha +!E2 U+03B2 beta +!E3 U+03B3 gamma +!E4 U+03B4 delta +!E5 U+03B5 epsilon +!E6 U+03B6 zeta +!E7 U+03B7 eta +!E8 U+03B8 theta +!E9 U+03B9 iota +!EA U+03BA kappa +!EB U+03BB lambda +!EC U+03BC mu +!ED U+03BD nu +!EE U+03BE xi +!EF U+03BF omicron +!F0 U+03C0 pi +!F1 U+03C1 rho +!F2 U+03C2 sigma1 +!F3 U+03C3 sigma +!F4 U+03C4 tau +!F5 U+03C5 upsilon +!F6 U+03C6 phi +!F7 U+03C7 chi +!F8 U+03C8 psi +!F9 U+03C9 omega +!FA U+03CA iotadieresis +!FB U+03CB upsilondieresis +!FC U+03CC omicrontonos +!FD U+03CD upsilontonos +!FE U+03CE omegatonos diff --git a/main/plugin/html2fpdf/font/makefont/iso-8859-9.map b/main/plugin/html2fpdf/font/makefont/iso-8859-9.map new file mode 100644 index 0000000000..48c123ae6f --- /dev/null +++ b/main/plugin/html2fpdf/font/makefont/iso-8859-9.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+011E Gbreve +!D1 U+00D1 Ntilde +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+0130 Idotaccent +!DE U+015E Scedilla +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+011F gbreve +!F1 U+00F1 ntilde +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+0131 dotlessi +!FE U+015F scedilla +!FF U+00FF ydieresis diff --git a/main/plugin/html2fpdf/font/makefont/koi8-r.map b/main/plugin/html2fpdf/font/makefont/koi8-r.map new file mode 100644 index 0000000000..6ad5d05d0d --- /dev/null +++ b/main/plugin/html2fpdf/font/makefont/koi8-r.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+2500 SF100000 +!81 U+2502 SF110000 +!82 U+250C SF010000 +!83 U+2510 SF030000 +!84 U+2514 SF020000 +!85 U+2518 SF040000 +!86 U+251C SF080000 +!87 U+2524 SF090000 +!88 U+252C SF060000 +!89 U+2534 SF070000 +!8A U+253C SF050000 +!8B U+2580 upblock +!8C U+2584 dnblock +!8D U+2588 block +!8E U+258C lfblock +!8F U+2590 rtblock +!90 U+2591 ltshade +!91 U+2592 shade +!92 U+2593 dkshade +!93 U+2320 integraltp +!94 U+25A0 filledbox +!95 U+2219 periodcentered +!96 U+221A radical +!97 U+2248 approxequal +!98 U+2264 lessequal +!99 U+2265 greaterequal +!9A U+00A0 space +!9B U+2321 integralbt +!9C U+00B0 degree +!9D U+00B2 twosuperior +!9E U+00B7 periodcentered +!9F U+00F7 divide +!A0 U+2550 SF430000 +!A1 U+2551 SF240000 +!A2 U+2552 SF510000 +!A3 U+0451 afii10071 +!A4 U+2553 SF520000 +!A5 U+2554 SF390000 +!A6 U+2555 SF220000 +!A7 U+2556 SF210000 +!A8 U+2557 SF250000 +!A9 U+2558 SF500000 +!AA U+2559 SF490000 +!AB U+255A SF380000 +!AC U+255B SF280000 +!AD U+255C SF270000 +!AE U+255D SF260000 +!AF U+255E SF360000 +!B0 U+255F SF370000 +!B1 U+2560 SF420000 +!B2 U+2561 SF190000 +!B3 U+0401 afii10023 +!B4 U+2562 SF200000 +!B5 U+2563 SF230000 +!B6 U+2564 SF470000 +!B7 U+2565 SF480000 +!B8 U+2566 SF410000 +!B9 U+2567 SF450000 +!BA U+2568 SF460000 +!BB U+2569 SF400000 +!BC U+256A SF540000 +!BD U+256B SF530000 +!BE U+256C SF440000 +!BF U+00A9 copyright +!C0 U+044E afii10096 +!C1 U+0430 afii10065 +!C2 U+0431 afii10066 +!C3 U+0446 afii10088 +!C4 U+0434 afii10069 +!C5 U+0435 afii10070 +!C6 U+0444 afii10086 +!C7 U+0433 afii10068 +!C8 U+0445 afii10087 +!C9 U+0438 afii10074 +!CA U+0439 afii10075 +!CB U+043A afii10076 +!CC U+043B afii10077 +!CD U+043C afii10078 +!CE U+043D afii10079 +!CF U+043E afii10080 +!D0 U+043F afii10081 +!D1 U+044F afii10097 +!D2 U+0440 afii10082 +!D3 U+0441 afii10083 +!D4 U+0442 afii10084 +!D5 U+0443 afii10085 +!D6 U+0436 afii10072 +!D7 U+0432 afii10067 +!D8 U+044C afii10094 +!D9 U+044B afii10093 +!DA U+0437 afii10073 +!DB U+0448 afii10090 +!DC U+044D afii10095 +!DD U+0449 afii10091 +!DE U+0447 afii10089 +!DF U+044A afii10092 +!E0 U+042E afii10048 +!E1 U+0410 afii10017 +!E2 U+0411 afii10018 +!E3 U+0426 afii10040 +!E4 U+0414 afii10021 +!E5 U+0415 afii10022 +!E6 U+0424 afii10038 +!E7 U+0413 afii10020 +!E8 U+0425 afii10039 +!E9 U+0418 afii10026 +!EA U+0419 afii10027 +!EB U+041A afii10028 +!EC U+041B afii10029 +!ED U+041C afii10030 +!EE U+041D afii10031 +!EF U+041E afii10032 +!F0 U+041F afii10033 +!F1 U+042F afii10049 +!F2 U+0420 afii10034 +!F3 U+0421 afii10035 +!F4 U+0422 afii10036 +!F5 U+0423 afii10037 +!F6 U+0416 afii10024 +!F7 U+0412 afii10019 +!F8 U+042C afii10046 +!F9 U+042B afii10045 +!FA U+0417 afii10025 +!FB U+0428 afii10042 +!FC U+042D afii10047 +!FD U+0429 afii10043 +!FE U+0427 afii10041 +!FF U+042A afii10044 diff --git a/main/plugin/html2fpdf/font/makefont/koi8-u.map b/main/plugin/html2fpdf/font/makefont/koi8-u.map new file mode 100644 index 0000000000..40a7e4fd7e --- /dev/null +++ b/main/plugin/html2fpdf/font/makefont/koi8-u.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+2500 SF100000 +!81 U+2502 SF110000 +!82 U+250C SF010000 +!83 U+2510 SF030000 +!84 U+2514 SF020000 +!85 U+2518 SF040000 +!86 U+251C SF080000 +!87 U+2524 SF090000 +!88 U+252C SF060000 +!89 U+2534 SF070000 +!8A U+253C SF050000 +!8B U+2580 upblock +!8C U+2584 dnblock +!8D U+2588 block +!8E U+258C lfblock +!8F U+2590 rtblock +!90 U+2591 ltshade +!91 U+2592 shade +!92 U+2593 dkshade +!93 U+2320 integraltp +!94 U+25A0 filledbox +!95 U+2022 bullet +!96 U+221A radical +!97 U+2248 approxequal +!98 U+2264 lessequal +!99 U+2265 greaterequal +!9A U+00A0 space +!9B U+2321 integralbt +!9C U+00B0 degree +!9D U+00B2 twosuperior +!9E U+00B7 periodcentered +!9F U+00F7 divide +!A0 U+2550 SF430000 +!A1 U+2551 SF240000 +!A2 U+2552 SF510000 +!A3 U+0451 afii10071 +!A4 U+0454 afii10101 +!A5 U+2554 SF390000 +!A6 U+0456 afii10103 +!A7 U+0457 afii10104 +!A8 U+2557 SF250000 +!A9 U+2558 SF500000 +!AA U+2559 SF490000 +!AB U+255A SF380000 +!AC U+255B SF280000 +!AD U+0491 afii10098 +!AE U+255D SF260000 +!AF U+255E SF360000 +!B0 U+255F SF370000 +!B1 U+2560 SF420000 +!B2 U+2561 SF190000 +!B3 U+0401 afii10023 +!B4 U+0404 afii10053 +!B5 U+2563 SF230000 +!B6 U+0406 afii10055 +!B7 U+0407 afii10056 +!B8 U+2566 SF410000 +!B9 U+2567 SF450000 +!BA U+2568 SF460000 +!BB U+2569 SF400000 +!BC U+256A SF540000 +!BD U+0490 afii10050 +!BE U+256C SF440000 +!BF U+00A9 copyright +!C0 U+044E afii10096 +!C1 U+0430 afii10065 +!C2 U+0431 afii10066 +!C3 U+0446 afii10088 +!C4 U+0434 afii10069 +!C5 U+0435 afii10070 +!C6 U+0444 afii10086 +!C7 U+0433 afii10068 +!C8 U+0445 afii10087 +!C9 U+0438 afii10074 +!CA U+0439 afii10075 +!CB U+043A afii10076 +!CC U+043B afii10077 +!CD U+043C afii10078 +!CE U+043D afii10079 +!CF U+043E afii10080 +!D0 U+043F afii10081 +!D1 U+044F afii10097 +!D2 U+0440 afii10082 +!D3 U+0441 afii10083 +!D4 U+0442 afii10084 +!D5 U+0443 afii10085 +!D6 U+0436 afii10072 +!D7 U+0432 afii10067 +!D8 U+044C afii10094 +!D9 U+044B afii10093 +!DA U+0437 afii10073 +!DB U+0448 afii10090 +!DC U+044D afii10095 +!DD U+0449 afii10091 +!DE U+0447 afii10089 +!DF U+044A afii10092 +!E0 U+042E afii10048 +!E1 U+0410 afii10017 +!E2 U+0411 afii10018 +!E3 U+0426 afii10040 +!E4 U+0414 afii10021 +!E5 U+0415 afii10022 +!E6 U+0424 afii10038 +!E7 U+0413 afii10020 +!E8 U+0425 afii10039 +!E9 U+0418 afii10026 +!EA U+0419 afii10027 +!EB U+041A afii10028 +!EC U+041B afii10029 +!ED U+041C afii10030 +!EE U+041D afii10031 +!EF U+041E afii10032 +!F0 U+041F afii10033 +!F1 U+042F afii10049 +!F2 U+0420 afii10034 +!F3 U+0421 afii10035 +!F4 U+0422 afii10036 +!F5 U+0423 afii10037 +!F6 U+0416 afii10024 +!F7 U+0412 afii10019 +!F8 U+042C afii10046 +!F9 U+042B afii10045 +!FA U+0417 afii10025 +!FB U+0428 afii10042 +!FC U+042D afii10047 +!FD U+0429 afii10043 +!FE U+0427 afii10041 +!FF U+042A afii10044 diff --git a/main/plugin/html2fpdf/font/makefont/makefont.php b/main/plugin/html2fpdf/font/makefont/makefont.php new file mode 100644 index 0000000000..769e8f30f2 --- /dev/null +++ b/main/plugin/html2fpdf/font/makefont/makefont.php @@ -0,0 +1,400 @@ +Error: encoding not found: '.$enc); + $cc2gn=array(); + foreach($a as $l) + { + if($l{0}=='!') + { + $e=preg_split('/[ \\t]+/',chop($l)); + $cc=hexdec(substr($e[0],1)); + $gn=$e[2]; + $cc2gn[$cc]=$gn; + } + } + for($i=0;$i<=255;$i++) + if(!isset($cc2gn[$i])) + $cc2gn[$i]='.notdef'; + return $cc2gn; +} + +function ReadAFM($file,&$map) +{ + //Read a font metric file + $a=file($file); + if(empty($a)) + die('File not found'); + $widths=array(); + $fm=array(); + $fix=array('Edot'=>'Edotaccent','edot'=>'edotaccent','Idot'=>'Idotaccent','Zdot'=>'Zdotaccent','zdot'=>'zdotaccent', + 'Odblacute'=>'Ohungarumlaut','odblacute'=>'ohungarumlaut','Udblacute'=>'Uhungarumlaut','udblacute'=>'uhungarumlaut', + 'Gcedilla'=>'Gcommaaccent','gcedilla'=>'gcommaaccent','Kcedilla'=>'Kcommaaccent','kcedilla'=>'kcommaaccent', + 'Lcedilla'=>'Lcommaaccent','lcedilla'=>'lcommaaccent','Ncedilla'=>'Ncommaaccent','ncedilla'=>'ncommaaccent', + 'Rcedilla'=>'Rcommaaccent','rcedilla'=>'rcommaaccent','Scedilla'=>'Scommaaccent','scedilla'=>'scommaaccent', + 'Tcedilla'=>'Tcommaaccent','tcedilla'=>'tcommaaccent','Dslash'=>'Dcroat','dslash'=>'dcroat','Dmacron'=>'Dcroat','dmacron'=>'dcroat', + 'combininggraveaccent'=>'gravecomb','combininghookabove'=>'hookabovecomb','combiningtildeaccent'=>'tildecomb', + 'combiningacuteaccent'=>'acutecomb','combiningdotbelow'=>'dotbelowcomb','dongsign'=>'dong'); + foreach($a as $l) + { + $e=explode(' ',chop($l)); + if(count($e)<2) + continue; + $code=$e[0]; + $param=$e[1]; + if($code=='C') + { + //Character metrics + $cc=(int)$e[1]; + $w=$e[4]; + $gn=$e[7]; + if(substr($gn,-4)=='20AC') + $gn='Euro'; + if(isset($fix[$gn])) + { + //Fix incorrect glyph name + foreach($map as $c=>$n) + if($n==$fix[$gn]) + $map[$c]=$gn; + } + if(empty($map)) + { + //Symbolic font: use built-in encoding + $widths[$cc]=$w; + } + else + { + $widths[$gn]=$w; + if($gn=='X') + $fm['CapXHeight']=$e[13]; + } + if($gn=='.notdef') + $fm['MissingWidth']=$w; + } + elseif($code=='FontName') + $fm['FontName']=$param; + elseif($code=='Weight') + $fm['Weight']=$param; + elseif($code=='ItalicAngle') + $fm['ItalicAngle']=(double)$param; + elseif($code=='Ascender') + $fm['Ascender']=(int)$param; + elseif($code=='Descender') + $fm['Descender']=(int)$param; + elseif($code=='UnderlineThickness') + $fm['UnderlineThickness']=(int)$param; + elseif($code=='UnderlinePosition') + $fm['UnderlinePosition']=(int)$param; + elseif($code=='IsFixedPitch') + $fm['IsFixedPitch']=($param=='true'); + elseif($code=='FontBBox') + $fm['FontBBox']=array($e[1],$e[2],$e[3],$e[4]); + elseif($code=='CapHeight') + $fm['CapHeight']=(int)$param; + elseif($code=='StdVW') + $fm['StdVW']=(int)$param; + } + if(!isset($fm['FontName'])) + die('FontName not found'); + if(!empty($map)) + { + if(!isset($widths['.notdef'])) + $widths['.notdef']=600; + if(!isset($widths['Delta']) and isset($widths['increment'])) + $widths['Delta']=$widths['increment']; + //Order widths according to map + for($i=0;$i<=255;$i++) + { + if(!isset($widths[$map[$i]])) + { + echo 'Warning: character '.$map[$i].' is missing
'; + $widths[$i]=$widths['.notdef']; + } + else + $widths[$i]=$widths[$map[$i]]; + } + } + $fm['Widths']=$widths; + return $fm; +} + +function MakeFontDescriptor($fm,$symbolic) +{ + //Ascent + $asc=(isset($fm['Ascender']) ? $fm['Ascender'] : 1000); + $fd="array('Ascent'=>".$asc; + //Descent + $desc=(isset($fm['Descender']) ? $fm['Descender'] : -200); + $fd.=",'Descent'=>".$desc; + //CapHeight + if(isset($fm['CapHeight'])) + $ch=$fm['CapHeight']; + elseif(isset($fm['CapXHeight'])) + $ch=$fm['CapXHeight']; + else + $ch=$asc; + $fd.=",'CapHeight'=>".$ch; + //Flags + $flags=0; + if(isset($fm['IsFixedPitch']) and $fm['IsFixedPitch']) + $flags+=1<<0; + if($symbolic) + $flags+=1<<2; + if(!$symbolic) + $flags+=1<<5; + if(isset($fm['ItalicAngle']) and $fm['ItalicAngle']!=0) + $flags+=1<<6; + $fd.=",'Flags'=>".$flags; + //FontBBox + if(isset($fm['FontBBox'])) + $fbb=$fm['FontBBox']; + else + $fbb=array(0,$des-100,1000,$asc+100); + $fd.=",'FontBBox'=>'[".$fbb[0].' '.$fbb[1].' '.$fbb[2].' '.$fbb[3]."]'"; + //ItalicAngle + $ia=(isset($fm['ItalicAngle']) ? $fm['ItalicAngle'] : 0); + $fd.=",'ItalicAngle'=>".$ia; + //StemV + if(isset($fm['StdVW'])) + $stemv=$fm['StdVW']; + elseif(isset($fm['Weight']) and eregi('(bold|black)',$fm['Weight'])) + $stemv=120; + else + $stemv=70; + $fd.=",'StemV'=>".$stemv; + //MissingWidth + if(isset($fm['MissingWidth'])) + $fd.=",'MissingWidth'=>".$fm['MissingWidth']; + $fd.=')'; + return $fd; +} + +function MakeWidthArray($fm) +{ + //Make character width array + $s="array(\n\t"; + $cw=$fm['Widths']; + for($i=0;$i<=255;$i++) + { + if(chr($i)=="'") + $s.="'\\''"; + elseif(chr($i)=="\\") + $s.="'\\\\'"; + elseif($i>=32 and $i<=126) + $s.="'".chr($i)."'"; + else + $s.="chr($i)"; + $s.='=>'.$fm['Widths'][$i]; + if($i<255) + $s.=','; + if(($i+1)%22==0) + $s.="\n\t"; + } + $s.=')'; + return $s; +} + +function MakeFontEncoding($map) +{ + //Build differences from reference encoding + $ref=ReadMap('cp1252'); + $s=''; + $last=0; + for($i=32;$i<=255;$i++) + { + if($map[$i]!=$ref[$i]) + { + if($i!=$last+1) + $s.=$i.' '; + $last=$i; + $s.='/'.$map[$i].' '; + } + } + return chop($s); +} + +function SaveToFile($file,$s,$mode='t') +{ + $f=fopen($file,'w'.$mode); + if(!$f) + die('Can\'t write to file '.$file); + fwrite($f,$s,strlen($s)); + fclose($f); +} + +function ReadShort($f) +{ + $a=unpack('n1n',fread($f,2)); + return $a['n']; +} + +function ReadLong($f) +{ + $a=unpack('N1N',fread($f,4)); + return $a['N']; +} + +function CheckTTF($file) +{ + //Check if font license allows embedding + $f=fopen($file,'rb'); + if(!$f) + die('Error: Can\'t open '.$file); + //Extract number of tables + fseek($f,4,SEEK_CUR); + $nb=ReadShort($f); + fseek($f,6,SEEK_CUR); + //Seek OS/2 table + $found=false; + for($i=0;$i<$nb;$i++) + { + if(fread($f,4)=='OS/2') + { + $found=true; + break; + } + fseek($f,12,SEEK_CUR); + } + if(!$found) + { + fclose($f); + return; + } + fseek($f,4,SEEK_CUR); + $offset=ReadLong($f); + fseek($f,$offset,SEEK_SET); + //Extract fsType flags + fseek($f,8,SEEK_CUR); + $fsType=ReadShort($f); + $rl=($fsType & 0x02)!=0; + $pp=($fsType & 0x04)!=0; + $e=($fsType & 0x08)!=0; + fclose($f); + if($rl and !$pp and !$e) + echo 'Warning: font license does not allow embedding'; +} + +/******************************************************************************* +* $fontfile: path to TTF file (or empty string if not to be embedded) * +* $afmfile: path to AFM file * +* $enc: font encoding (or empty string for symbolic fonts) * +* $patch: optional patch for encoding * +* $type : font type if $fontfile is empty * +*******************************************************************************/ +function MakeFont($fontfile,$afmfile,$enc='cp1252',$patch=array(),$type='TrueType') +{ + //Generate a font definition file + set_magic_quotes_runtime(0); + if($enc) + { + $map=ReadMap($enc); + foreach($patch as $cc=>$gn) + $map[$cc]=$gn; + } + else + $map=array(); + if(!file_exists($afmfile)) + die('Error: AFM file not found: '.$afmfile); + $fm=ReadAFM($afmfile,$map); + if($enc) + $diff=MakeFontEncoding($map); + else + $diff=''; + $fd=MakeFontDescriptor($fm,empty($map)); + //Find font type + if($fontfile) + { + $ext=strtolower(substr($fontfile,-3)); + if($ext=='ttf') + $type='TrueType'; + elseif($ext=='pfb') + $type='Type1'; + else + die('Error: unrecognized font file extension: '.$ext); + } + else + { + if($type!='TrueType' and $type!='Type1') + die('Error: incorrect font type: '.$type); + } + //Start generation + $s='Error: font file not found: '.$fontfile); + if($type=='TrueType') + CheckTTF($fontfile); + $f=fopen($fontfile,'rb'); + if(!$f) + die('Error: Can\'t open '.$fontfile); + $file=fread($f,filesize($fontfile)); + fclose($f); + if($type=='Type1') + { + //Find first two sections and discard third one + $pos=strpos($file,'eexec'); + if(!$pos) + die('Error: font file does not seem to be valid Type1'); + $size1=$pos+6; + $pos=strpos($file,'00000000'); + if(!$pos) + die('Error: font file does not seem to be valid Type1'); + $size2=$pos-$size1; + $file=substr($file,0,$size1+$size2); + } + if(function_exists('gzcompress')) + { + $cmp=$basename.'.z'; + SaveToFile($cmp,gzcompress($file),'b'); + $s.='$file=\''.$cmp."';\n"; + echo 'Font file compressed ('.$cmp.')
'; + } + else + { + $s.='$file=\''.basename($fontfile)."';\n"; + echo 'Notice: font file could not be compressed (gzcompress not available)
'; + } + if($type=='Type1') + { + $s.='$size1='.$size1.";\n"; + $s.='$size2='.$size2.";\n"; + } + else + $s.='$originalsize='.filesize($fontfile).";\n"; + } + else + { + //Not embedded font + $s.='$file='."'';\n"; + } + $s.="?>\n"; + SaveToFile($basename.'.php',$s); + echo 'Font definition file generated ('.$basename.'.php'.')
'; +} +?> diff --git a/main/plugin/html2fpdf/font/symbol.php b/main/plugin/html2fpdf/font/symbol.php new file mode 100644 index 0000000000..43b50e4511 --- /dev/null +++ b/main/plugin/html2fpdf/font/symbol.php @@ -0,0 +1,15 @@ +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, + 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,'"'=>713,'#'=>500,'$'=>549,'%'=>833,'&'=>778,'\''=>439,'('=>333,')'=>333,'*'=>500,'+'=>549, + ','=>250,'-'=>549,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>549,'='=>549,'>'=>549,'?'=>444,'@'=>549,'A'=>722, + 'B'=>667,'C'=>722,'D'=>612,'E'=>611,'F'=>763,'G'=>603,'H'=>722,'I'=>333,'J'=>631,'K'=>722,'L'=>686,'M'=>889,'N'=>722,'O'=>722,'P'=>768,'Q'=>741,'R'=>556,'S'=>592,'T'=>611,'U'=>690,'V'=>439,'W'=>768, + 'X'=>645,'Y'=>795,'Z'=>611,'['=>333,'\\'=>863,']'=>333,'^'=>658,'_'=>500,'`'=>500,'a'=>631,'b'=>549,'c'=>549,'d'=>494,'e'=>439,'f'=>521,'g'=>411,'h'=>603,'i'=>329,'j'=>603,'k'=>549,'l'=>549,'m'=>576, + 'n'=>521,'o'=>549,'p'=>549,'q'=>521,'r'=>549,'s'=>603,'t'=>439,'u'=>576,'v'=>713,'w'=>686,'x'=>493,'y'=>686,'z'=>494,'{'=>480,'|'=>200,'}'=>480,'~'=>549,chr(127)=>0,chr(128)=>0,chr(129)=>0,chr(130)=>0,chr(131)=>0, + chr(132)=>0,chr(133)=>0,chr(134)=>0,chr(135)=>0,chr(136)=>0,chr(137)=>0,chr(138)=>0,chr(139)=>0,chr(140)=>0,chr(141)=>0,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, + chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>750,chr(161)=>620,chr(162)=>247,chr(163)=>549,chr(164)=>167,chr(165)=>713,chr(166)=>500,chr(167)=>753,chr(168)=>753,chr(169)=>753,chr(170)=>753,chr(171)=>1042,chr(172)=>987,chr(173)=>603,chr(174)=>987,chr(175)=>603, + chr(176)=>400,chr(177)=>549,chr(178)=>411,chr(179)=>549,chr(180)=>549,chr(181)=>713,chr(182)=>494,chr(183)=>460,chr(184)=>549,chr(185)=>549,chr(186)=>549,chr(187)=>549,chr(188)=>1000,chr(189)=>603,chr(190)=>1000,chr(191)=>658,chr(192)=>823,chr(193)=>686,chr(194)=>795,chr(195)=>987,chr(196)=>768,chr(197)=>768, + chr(198)=>823,chr(199)=>768,chr(200)=>768,chr(201)=>713,chr(202)=>713,chr(203)=>713,chr(204)=>713,chr(205)=>713,chr(206)=>713,chr(207)=>713,chr(208)=>768,chr(209)=>713,chr(210)=>790,chr(211)=>790,chr(212)=>890,chr(213)=>823,chr(214)=>549,chr(215)=>250,chr(216)=>713,chr(217)=>603,chr(218)=>603,chr(219)=>1042, + chr(220)=>987,chr(221)=>603,chr(222)=>987,chr(223)=>603,chr(224)=>494,chr(225)=>329,chr(226)=>790,chr(227)=>790,chr(228)=>786,chr(229)=>713,chr(230)=>384,chr(231)=>384,chr(232)=>384,chr(233)=>384,chr(234)=>384,chr(235)=>384,chr(236)=>494,chr(237)=>494,chr(238)=>494,chr(239)=>494,chr(240)=>0,chr(241)=>329, + chr(242)=>274,chr(243)=>686,chr(244)=>686,chr(245)=>686,chr(246)=>384,chr(247)=>384,chr(248)=>384,chr(249)=>384,chr(250)=>384,chr(251)=>384,chr(252)=>494,chr(253)=>494,chr(254)=>494,chr(255)=>0); +?> diff --git a/main/plugin/html2fpdf/font/times.php b/main/plugin/html2fpdf/font/times.php new file mode 100644 index 0000000000..837c706e08 --- /dev/null +++ b/main/plugin/html2fpdf/font/times.php @@ -0,0 +1,15 @@ +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, + 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,'"'=>408,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>180,'('=>333,')'=>333,'*'=>500,'+'=>564, + ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>564,'='=>564,'>'=>564,'?'=>444,'@'=>921,'A'=>722, + 'B'=>667,'C'=>667,'D'=>722,'E'=>611,'F'=>556,'G'=>722,'H'=>722,'I'=>333,'J'=>389,'K'=>722,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>556,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>722,'W'=>944, + 'X'=>722,'Y'=>722,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>469,'_'=>500,'`'=>333,'a'=>444,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778, + 'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>333,'s'=>389,'t'=>278,'u'=>500,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>480,'|'=>200,'}'=>480,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500, + chr(132)=>444,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>889,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>444,chr(148)=>444,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>980, + 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)=>200,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>564,chr(173)=>333,chr(174)=>760,chr(175)=>333, + chr(176)=>400,chr(177)=>564,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>453,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)=>444,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722, + 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)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>564,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>722,chr(222)=>556,chr(223)=>500,chr(224)=>444,chr(225)=>444,chr(226)=>444,chr(227)=>444,chr(228)=>444,chr(229)=>444,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, + chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>564,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>500,chr(254)=>500,chr(255)=>500); +?> diff --git a/main/plugin/html2fpdf/font/timesb.php b/main/plugin/html2fpdf/font/timesb.php new file mode 100644 index 0000000000..09cff86ac4 --- /dev/null +++ b/main/plugin/html2fpdf/font/timesb.php @@ -0,0 +1,15 @@ +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, + 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, + ','=>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, + '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, + '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, + '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, + 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, + 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, + 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, + 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, + 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, + 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); +?> diff --git a/main/plugin/html2fpdf/font/timesbi.php b/main/plugin/html2fpdf/font/timesbi.php new file mode 100644 index 0000000000..b4e38d763b --- /dev/null +++ b/main/plugin/html2fpdf/font/timesbi.php @@ -0,0 +1,15 @@ +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, + 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,'!'=>389,'"'=>555,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570, + ','=>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,'@'=>832,'A'=>667, + 'B'=>667,'C'=>667,'D'=>722,'E'=>667,'F'=>667,'G'=>722,'H'=>778,'I'=>389,'J'=>500,'K'=>667,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>611,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>667,'W'=>889, + 'X'=>667,'Y'=>611,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>570,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778, + 'n'=>556,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>556,'v'=>444,'w'=>667,'x'=>500,'y'=>444,'z'=>389,'{'=>348,'|'=>220,'}'=>348,'~'=>570,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500, + 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)=>944,chr(141)=>350,chr(142)=>611,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, + chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>389,chr(159)=>611,chr(160)=>250,chr(161)=>389,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)=>266,chr(171)=>500,chr(172)=>606,chr(173)=>333,chr(174)=>747,chr(175)=>333, + chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>576,chr(182)=>500,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>300,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667, + chr(198)=>944,chr(199)=>667,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)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>570,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>611,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)=>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, + 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)=>444,chr(254)=>500,chr(255)=>444); +?> diff --git a/main/plugin/html2fpdf/font/timesi.php b/main/plugin/html2fpdf/font/timesi.php new file mode 100644 index 0000000000..0ba2b7773d --- /dev/null +++ b/main/plugin/html2fpdf/font/timesi.php @@ -0,0 +1,15 @@ +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, + 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, + ','=>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, + '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, + '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, + '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, + 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, + 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, + 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, + 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, + 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, + 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); +?> diff --git a/main/plugin/html2fpdf/font/zapfdingbats.php b/main/plugin/html2fpdf/font/zapfdingbats.php new file mode 100644 index 0000000000..1f926a8c3f --- /dev/null +++ b/main/plugin/html2fpdf/font/zapfdingbats.php @@ -0,0 +1,15 @@ +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, + 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, + ','=>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, + '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, + '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, + '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, + 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, + 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, + 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, + 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, + 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, + 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); +?> diff --git a/main/plugin/html2fpdf/fpdf.php b/main/plugin/html2fpdf/fpdf.php new file mode 100644 index 0000000000..6cd8b3616c --- /dev/null +++ b/main/plugin/html2fpdf/fpdf.php @@ -0,0 +1,2309 @@ +_dochecks(); + //Initialization of properties + $this->page=0; + $this->n=2; + $this->buffer=''; + $this->pages=array(); + $this->OrientationChanges=array(); + $this->state=0; + $this->fonts=array(); + $this->FontFiles=array(); + $this->diffs=array(); + $this->images=array(); + $this->links=array(); + $this->InFooter=false; + $this->lasth=0; + $this->FontFamily=''; + $this->FontStyle=''; + $this->FontSizePt=12; + $this->underline=false; + $this->DrawColor='0 G'; + $this->FillColor='0 g'; + $this->TextColor='0 g'; + $this->ColorFlag=false; + $this->ws=0; + //Standard fonts + $this->CoreFonts=array('courier'=>'Courier','courierB'=>'Courier-Bold','courierI'=>'Courier-Oblique','courierBI'=>'Courier-BoldOblique', + 'helvetica'=>'Helvetica','helveticaB'=>'Helvetica-Bold','helveticaI'=>'Helvetica-Oblique','helveticaBI'=>'Helvetica-BoldOblique', + 'times'=>'Times-Roman','timesB'=>'Times-Bold','timesI'=>'Times-Italic','timesBI'=>'Times-BoldItalic', + 'symbol'=>'Symbol','zapfdingbats'=>'ZapfDingbats'); + //Scale factor + if($unit=='pt') $this->k=1; + elseif($unit=='mm') $this->k=72/25.4; + elseif($unit=='cm') $this->k=72/2.54; + elseif($unit=='in') $this->k=72; + else $this->Error('Incorrect unit: '.$unit); + //Page format + if(is_string($format)) + { + $format=strtolower($format); + if($format=='a3') $format=array(841.89,1190.55); + elseif($format=='a4') $format=array(595.28,841.89); + elseif($format=='a5') $format=array(420.94,595.28); + elseif($format=='letter') $format=array(612,792); + elseif($format=='legal') $format=array(612,1008); + else $this->Error('Unknown page format: '.$format); + $this->fwPt=$format[0]; + $this->fhPt=$format[1]; + } + else + { + $this->fwPt=$format[0]*$this->k; + $this->fhPt=$format[1]*$this->k; + } + $this->fw=$this->fwPt/$this->k; + $this->fh=$this->fhPt/$this->k; + //Page orientation + $orientation=strtolower($orientation); + if($orientation=='p' or $orientation=='portrait') + { + $this->DefOrientation='P'; + $this->wPt=$this->fwPt; + $this->hPt=$this->fhPt; + } + elseif($orientation=='l' or $orientation=='landscape') + { + $this->DefOrientation='L'; + $this->wPt=$this->fhPt; + $this->hPt=$this->fwPt; + } + else $this->Error('Incorrect orientation: '.$orientation); + $this->CurOrientation=$this->DefOrientation; + $this->w=$this->wPt/$this->k; + $this->h=$this->hPt/$this->k; + //Page margins (1 cm) + $margin=28.35/$this->k; + $this->SetMargins($margin,$margin); + //Interior cell margin (1 mm) + $this->cMargin=$margin/10; + //Line width (0.2 mm) + $this->LineWidth=.567/$this->k; + //Automatic page break + $this->SetAutoPageBreak(true,2*$margin); + //Full width display mode + $this->SetDisplayMode('fullwidth'); + //Compression + $this->SetCompression(true); +} + +function SetMargins($left,$top,$right=-1) +{ + //Set left, top and right margins + $this->lMargin=$left; + $this->tMargin=$top; + if($right==-1) $right=$left; + $this->rMargin=$right; +} + +function SetLeftMargin($margin) +{ + //Set left margin + $this->lMargin=$margin; + if($this->page>0 and $this->x<$margin) $this->x=$margin; +} + +function SetTopMargin($margin) +{ + //Set top margin + $this->tMargin=$margin; +} + +function SetRightMargin($margin) +{ + //Set right margin + $this->rMargin=$margin; +} + +function SetAutoPageBreak($auto,$margin=0) +{ + //Set auto page break mode and triggering margin + $this->AutoPageBreak=$auto; + $this->bMargin=$margin; + $this->PageBreakTrigger=$this->h-$margin; +} + +function SetDisplayMode($zoom,$layout='continuous') +{ + //Set display mode in viewer + if($zoom=='fullpage' or $zoom=='fullwidth' or $zoom=='real' or $zoom=='default' or !is_string($zoom)) + $this->ZoomMode=$zoom; + else + $this->Error('Incorrect zoom display mode: '.$zoom); + if($layout=='single' or $layout=='continuous' or $layout=='two' or $layout=='default') + $this->LayoutMode=$layout; + else + $this->Error('Incorrect layout display mode: '.$layout); +} + +function SetCompression($compress) +{ + //Set page compression + if(function_exists('gzcompress')) $this->compress=$compress; + else $this->compress=false; +} + +function SetTitle($title) +{ + //Title of document + $this->title=$title; +} + +function SetSubject($subject) +{ + //Subject of document + $this->subject=$subject; +} + +function SetAuthor($author) +{ + //Author of document + $this->author=$author; +} + +function SetKeywords($keywords) +{ + //Keywords of document + $this->keywords=$keywords; +} + +function SetCreator($creator) +{ + //Creator of document + $this->creator=$creator; +} + +function AliasNbPages($alias='{nb}') +{ + //Define an alias for total number of pages + $this->AliasNbPages=$alias; +} + +function Error($msg) +{ + //Fatal error + die('FPDF error: '.$msg); +} + +function Open() +{ + //Begin document + if($this->state==0) $this->_begindoc(); +} + +function Close() +{ + //Terminate document + if($this->state==3) return; + if($this->page==0) $this->AddPage(); + //Page footer + $this->InFooter=true; + $this->Footer(); + $this->InFooter=false; + //Close page + $this->_endpage(); + //Close document + $this->_enddoc(); +} + +function AddPage($orientation='') +{ + //Start a new page + if($this->state==0) $this->Open(); + $family=$this->FontFamily; + $style=$this->FontStyle.($this->underline ? 'U' : ''); + $size=$this->FontSizePt; + $lw=$this->LineWidth; + $dc=$this->DrawColor; + $fc=$this->FillColor; + $tc=$this->TextColor; + $cf=$this->ColorFlag; + if($this->page>0) + { + //Page footer + $this->InFooter=true; + $this->Footer(); + $this->InFooter=false; + //Close page + $this->_endpage(); + } + //Start new page + $this->_beginpage($orientation); + //Set line cap style to square + $this->_out('2 J'); + //Set line width + $this->LineWidth=$lw; + $this->_out(sprintf('%.2f w',$lw*$this->k)); + //Set font + if($family) $this->SetFont($family,$style,$size); + //Set colors + $this->DrawColor=$dc; + if($dc!='0 G') $this->_out($dc); + $this->FillColor=$fc; + if($fc!='0 g') $this->_out($fc); + $this->TextColor=$tc; + $this->ColorFlag=$cf; + //Page header + $this->Header(); + //Restore line width + if($this->LineWidth!=$lw) + { + $this->LineWidth=$lw; + $this->_out(sprintf('%.2f w',$lw*$this->k)); + } + //Restore font + if($family) $this->SetFont($family,$style,$size); + //Restore colors + if($this->DrawColor!=$dc) + { + $this->DrawColor=$dc; + $this->_out($dc); + } + if($this->FillColor!=$fc) + { + $this->FillColor=$fc; + $this->_out($fc); + } + $this->TextColor=$tc; + $this->ColorFlag=$cf; +} + +function Header() +{ + //To be implemented in your own inherited class +} + +function Footer() +{ + //To be implemented in your own inherited class +} + +function PageNo() +{ + //Get current page number + return $this->page; +} + +function SetDrawColor($r,$g=-1,$b=-1) +{ + //Set color for all stroking operations + if(($r==0 and $g==0 and $b==0) or $g==-1) $this->DrawColor=sprintf('%.3f G',$r/255); + else $this->DrawColor=sprintf('%.3f %.3f %.3f RG',$r/255,$g/255,$b/255); + if($this->page>0) $this->_out($this->DrawColor); +} + +function SetFillColor($r,$g=-1,$b=-1) +{ + //Set color for all filling operations + if(($r==0 and $g==0 and $b==0) or $g==-1) $this->FillColor=sprintf('%.3f g',$r/255); + else$this->FillColor=sprintf('%.3f %.3f %.3f rg',$r/255,$g/255,$b/255); + $this->ColorFlag = ($this->FillColor != $this->TextColor); + if($this->page>0) $this->_out($this->FillColor); +} + +function SetTextColor($r,$g=-1,$b=-1) +{ + //Set color for text + if(($r==0 and $g==0 and $b==0) or $g==-1) $this->TextColor=sprintf('%.3f g',$r/255); + else $this->TextColor=sprintf('%.3f %.3f %.3f rg',$r/255,$g/255,$b/255); + $this->ColorFlag = ($this->FillColor != $this->TextColor); +} + +function GetStringWidth($s) +{ + //Get width of a string in the current font + $s=(string)$s; + $cw=&$this->CurrentFont['cw']; + $w=0; + $l=strlen($s); + for($i=0;$i<$l;$i++) $w+=$cw[$s{$i}]; + return $w*$this->FontSize/1000; +} + +function SetLineWidth($width) +{ + //Set line width + $this->LineWidth=$width; + if($this->page>0) $this->_out(sprintf('%.2f w',$width*$this->k)); +} + +function Line($x1,$y1,$x2,$y2) +{ + //Draw a line + $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)); +} + +function Rect($x,$y,$w,$h,$style='') +{ + //Draw a rectangle + if($style=='F') $op='f'; + elseif($style=='FD' or $style=='DF') $op='B'; + else $op='S'; + $this->_out(sprintf('%.2f %.2f %.2f %.2f re %s',$x*$this->k,($this->h-$y)*$this->k,$w*$this->k,-$h*$this->k,$op)); +} + +function AddFont($family,$style='',$file='') +{ + //Add a TrueType or Type1 font + $family=strtolower($family); + if($family=='arial') $family='helvetica'; + $style=strtoupper($style); + if($style=='IB') $style='BI'; + if(isset($this->fonts[$family.$style])) $this->Error('Font already added: '.$family.' '.$style); + if($file=='') $file=str_replace(' ','',$family).strtolower($style).'.php'; + if(defined('FPDF_FONTPATH')) $file=FPDF_FONTPATH.$file; + include($file); + if(!isset($name)) $this->Error('Could not include font definition file'); + $i=count($this->fonts)+1; + $this->fonts[$family.$style]=array('i'=>$i,'type'=>$type,'name'=>$name,'desc'=>$desc,'up'=>$up,'ut'=>$ut,'cw'=>$cw,'enc'=>$enc,'file'=>$file); + if($diff) + { + //Search existing encodings + $d=0; + $nb=count($this->diffs); + for($i=1;$i<=$nb;$i++) + if($this->diffs[$i]==$diff) + { + $d=$i; + break; + } + if($d==0) + { + $d=$nb+1; + $this->diffs[$d]=$diff; + } + $this->fonts[$family.$style]['diff']=$d; + } + if($file) + { + if($type=='TrueType') $this->FontFiles[$file]=array('length1'=>$originalsize); + else $this->FontFiles[$file]=array('length1'=>$size1,'length2'=>$size2); + } +} + +function SetFont($family,$style='',$size=0) +{ + //Select a font; size given in points + global $fpdf_charwidths; + + $family=strtolower($family); + if($family=='') $family=$this->FontFamily; + //EDITEI - now understands: monospace,serif,sans [serif] + if($family=='monospace') $family='courier'; + if($family=='serif') $family='times'; + if($family=='sans') $family='arial'; + if($family=='arial') $family='helvetica'; + elseif($family=='symbol' or $family=='zapfdingbats') $style=''; + $style=strtoupper($style); + if(is_int(strpos($style,'U'))) + { + $this->underline=true; + $style=str_replace('U','',$style); + } + else $this->underline=false; + if ($style=='IB') $style='BI'; + if ($size==0) $size=$this->FontSizePt; + //Test if font is already selected + if($this->FontFamily==$family and $this->FontStyle==$style and $this->FontSizePt==$size) return; + //Test if used for the first time + $fontkey=$family.$style; + if(!isset($this->fonts[$fontkey])) + { + //Check if one of the standard fonts + if(isset($this->CoreFonts[$fontkey])) + { + if(!isset($fpdf_charwidths[$fontkey])) + { + //Load metric file + $file=$family; + if($family=='times' or $family=='helvetica') $file.=strtolower($style); + $file.='.php'; + if(defined('FPDF_FONTPATH')) $file=FPDF_FONTPATH.$file; + include($file); + if(!isset($fpdf_charwidths[$fontkey])) $this->Error('Could not include font metric file'); + } + $i=count($this->fonts)+1; + $this->fonts[$fontkey]=array('i'=>$i,'type'=>'core','name'=>$this->CoreFonts[$fontkey],'up'=>-100,'ut'=>50,'cw'=>$fpdf_charwidths[$fontkey]); + } + else $this->Error('Undefined font: '.$family.' '.$style); + } + //Select it + $this->FontFamily=$family; + $this->FontStyle=$style; + $this->FontSizePt=$size; + $this->FontSize=$size/$this->k; + $this->CurrentFont=&$this->fonts[$fontkey]; + if($this->page>0) + $this->_out(sprintf('BT /F%d %.2f Tf ET',$this->CurrentFont['i'],$this->FontSizePt)); +} + +function SetFontSize($size) +{ + //Set font size in points + if($this->FontSizePt==$size) return; + $this->FontSizePt=$size; + $this->FontSize=$size/$this->k; + if($this->page>0) + $this->_out(sprintf('BT /F%d %.2f Tf ET',$this->CurrentFont['i'],$this->FontSizePt)); +} + +function AddLink() +{ + //Create a new internal link + $n=count($this->links)+1; + $this->links[$n]=array(0,0); + return $n; +} + +function SetLink($link,$y=0,$page=-1) +{ + //Set destination of internal link + if($y==-1) $y=$this->y; + if($page==-1) $page=$this->page; + $this->links[$link]=array($page,$y); +} + +function Link($x,$y,$w,$h,$link) +{ + //Put a link on the page + $this->PageLinks[$this->page][]=array($x*$this->k,$this->hPt-$y*$this->k,$w*$this->k,$h*$this->k,$link); +} + +function Text($x,$y,$txt) +{ + //Output a string + $s=sprintf('BT %.2f %.2f Td (%s) Tj ET',$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt)); + if($this->underline and $txt!='') $s.=' '.$this->_dounderline($x,$y,$txt); + if($this->ColorFlag) $s='q '.$this->TextColor.' '.$s.' Q'; + $this->_out($s); +} + +function AcceptPageBreak() +{ + //Accept automatic page break or not + return $this->AutoPageBreak; +} + +function Cell($w,$h=0,$txt='',$border=0,$ln=0,$align='',$fill=0,$link='',$currentx=0) //EDITEI +{ + //Output a cell + $k=$this->k; + if($this->y+$h>$this->PageBreakTrigger and !$this->InFooter and $this->AcceptPageBreak()) + { + //Automatic page break + $x=$this->x;//Current X position + $ws=$this->ws;//Word Spacing + if($ws>0) + { + $this->ws=0; + $this->_out('0 Tw'); + } + $this->AddPage($this->CurOrientation); + $this->x=$x; + if($ws>0) + { + $this->ws=$ws; + $this->_out(sprintf('%.3f Tw',$ws*$k)); + } + } + if($w==0) $w = $this->w-$this->rMargin-$this->x; + $s=''; + if($fill==1 or $border==1) + { + if ($fill==1) $op=($border==1) ? 'B' : 'f'; + else $op='S'; +//$op='S';//DEBUG + $s=sprintf('%.2f %.2f %.2f %.2f re %s ',$this->x*$k,($this->h-$this->y)*$k,$w*$k,-$h*$k,$op); + } + if(is_string($border)) + { + $x=$this->x; + $y=$this->y; + if(is_int(strpos($border,'L'))) + $s.=sprintf('%.2f %.2f m %.2f %.2f l S ',$x*$k,($this->h-$y)*$k,$x*$k,($this->h-($y+$h))*$k); + if(is_int(strpos($border,'T'))) + $s.=sprintf('%.2f %.2f m %.2f %.2f l S ',$x*$k,($this->h-$y)*$k,($x+$w)*$k,($this->h-$y)*$k); + if(is_int(strpos($border,'R'))) + $s.=sprintf('%.2f %.2f m %.2f %.2f l S ',($x+$w)*$k,($this->h-$y)*$k,($x+$w)*$k,($this->h-($y+$h))*$k); + if(is_int(strpos($border,'B'))) + $s.=sprintf('%.2f %.2f m %.2f %.2f l S ',$x*$k,($this->h-($y+$h))*$k,($x+$w)*$k,($this->h-($y+$h))*$k); + } + if($txt!='') + { + if($align=='R') $dx=$w-$this->cMargin-$this->GetStringWidth($txt); + elseif($align=='C') $dx=($w-$this->GetStringWidth($txt))/2; + elseif($align=='L' or $align=='J') $dx=$this->cMargin; + else $dx = 0; + if($this->ColorFlag) $s.='q '.$this->TextColor.' '; + $txt2=str_replace(')','\\)',str_replace('(','\\(',str_replace('\\','\\\\',$txt))); + //Check whether we are going to outline text or not + if($this->outline_on) + { + $s.=' '.sprintf('%.2f w',$this->LineWidth*$this->k).' '; + $s.=" $this->DrawColor "; + $s.=" 2 Tr "; + } + //Superscript and Subscript Y coordinate adjustment + $adjusty = 0; + if($this->SUB) $adjusty = 1; + if($this->SUP) $adjusty = -1; + //End of coordinate adjustment + $s.=sprintf('BT %.2f %.2f Td (%s) Tj ET',($this->x+$dx)*$k,($this->h-(($this->y+$adjusty)+.5*$h+.3*$this->FontSize))*$k,$txt2); //EDITEI + if($this->underline) + $s.=' '.$this->_dounderline($this->x+$dx,$this->y+.5*$h+.3*$this->FontSize+$adjusty,$txt2); + //Superscript and Subscript Y coordinate adjustment (now for striked-through texts) + $adjusty = 1.6; + if($this->SUB) $adjusty = 3.05; + if($this->SUP) $adjusty = 1.1; + //End of coordinate adjustment + if($this->strike) //EDITEI + $s.=' '.$this->_dounderline($this->x+$dx,$this->y+$adjusty,$txt); + if($this->ColorFlag) $s.=' Q'; + if($link!='') $this->Link($this->x+$dx,$this->y+.5*$h-.5*$this->FontSize,$this->GetStringWidth($txt),$this->FontSize,$link); + } + if($s) $this->_out($s); + $this->lasth=$h; + if( strpos($txt,"\n") !== false) $ln=1; //EDITEI - cell now recognizes \n! << comes from
tag + if($ln>0) + { + //Go to next line + $this->y += $h; + if($ln==1) //EDITEI + { + //Move to next line + if ($currentx != 0) $this->x=$currentx; + else $this->x=$this->lMargin; + } + } + else $this->x+=$w; +} + +//EDITEI +function MultiCell($w,$h,$txt,$border=0,$align='J',$fill=0,$link='') +{ + //Output text with automatic or explicit line breaks + $cw=&$this->CurrentFont['cw']; + if($w==0) $w=$this->w-$this->rMargin-$this->x; + $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; + $s=str_replace("\r",'',$txt); + $nb=strlen($s); + if($nb>0 and $s[$nb-1]=="\n") $nb--; + $b=0; + if($border) + { + if($border==1) + { + $border='LTRB'; + $b='LRT'; + $b2='LR'; + } + else + { + $b2=''; + if(is_int(strpos($border,'L'))) $b2.='L'; + if(is_int(strpos($border,'R'))) $b2.='R'; + $b=is_int(strpos($border,'T')) ? $b2.'T' : $b2; + } + } + $sep=-1; + $i=0; + $j=0; + $l=0; + $ns=0; + $nl=1; + while($i<$nb) + { + //Get next character + $c=$s{$i}; + if($c=="\n") + { + //Explicit line break + if($this->ws>0) + { + $this->ws=0; + $this->_out('0 Tw'); + } + $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill,$link); + $i++; + $sep=-1; + $j=$i; + $l=0; + $ns=0; + $nl++; + if($border and $nl==2) $b=$b2; + continue; + } + if($c==' ') + { + $sep=$i; + $ls=$l; + $ns++; + } + $l+=$cw[$c]; + if($l>$wmax) + { + //Automatic line break + if($sep==-1) + { + if($i==$j) $i++; + if($this->ws>0) + { + $this->ws=0; + $this->_out('0 Tw'); + } + $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill,$link); + } + else + { + if($align=='J') + { + $this->ws=($ns>1) ? ($wmax-$ls)/1000*$this->FontSize/($ns-1) : 0; + $this->_out(sprintf('%.3f Tw',$this->ws*$this->k)); + } + $this->Cell($w,$h,substr($s,$j,$sep-$j),$b,2,$align,$fill,$link); + $i=$sep+1; + } + $sep=-1; + $j=$i; + $l=0; + $ns=0; + $nl++; + if($border and $nl==2) $b=$b2; + } + else $i++; + } + //Last chunk + if($this->ws>0) + { + $this->ws=0; + $this->_out('0 Tw'); + } + if($border and is_int(strpos($border,'B'))) $b.='B'; + $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill,$link); + $this->x=$this->lMargin; +} + +function Write($h,$txt,$currentx=0,$link='') //EDITEI +{ + //Output text in flowing mode + $cw=&$this->CurrentFont['cw']; + $w=$this->w-$this->rMargin-$this->x; + $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; + $s=str_replace("\r",'',$txt); + $nb=strlen($s); + $sep=-1; + $i=0; + $j=0; + $l=0; + $nl=1; + while($i<$nb) + { + //Get next character + $c=$s{$i}; + if($c=="\n") + { + //Explicit line break + $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link); + $i++; + $sep=-1; + $j=$i; + $l=0; + if($nl==1) + { + if ($currentx != 0) $this->x=$currentx;//EDITEI + else $this->x=$this->lMargin; + $w=$this->w-$this->rMargin-$this->x; + $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; + } + $nl++; + continue; + } + if($c == ' ') $sep=$i; + $l += $cw[$c]; + if($l > $wmax) + { + //Automatic line break + if($sep==-1) + { + if($this->x > $this->lMargin) + { + //Move to next line + if ($currentx != 0) $this->x=$currentx;//EDITEI + else $this->x=$this->lMargin; + $this->y+=$h; + $w=$this->w-$this->rMargin-$this->x; + $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; + $i++; + $nl++; + continue; + } + if($i==$j) $i++; + $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link); + } + else + { + $this->Cell($w,$h,substr($s,$j,$sep-$j),0,2,'',0,$link); + $i=$sep+1; + } + $sep=-1; + $j=$i; + $l=0; + if($nl==1) + { + if ($currentx != 0) $this->x=$currentx;//EDITEI + else $this->x=$this->lMargin; + $w=$this->w-$this->rMargin-$this->x; + $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; + } + $nl++; + } + else $i++; + } + //Last chunk + if($i!=$j) $this->Cell($l/1000*$this->FontSize,$h,substr($s,$j),0,0,'',0,$link); +} + +//-------------------------FLOWING BLOCK------------------------------------// +//EDITEI some things (added/changed) // +//The following functions were originally written by Damon Kohler // +//--------------------------------------------------------------------------// + +function saveFont() +{ + $saved = array(); + $saved[ 'family' ] = $this->FontFamily; + $saved[ 'style' ] = $this->FontStyle; + $saved[ 'sizePt' ] = $this->FontSizePt; + $saved[ 'size' ] = $this->FontSize; + $saved[ 'curr' ] =& $this->CurrentFont; + $saved[ 'color' ] = $this->TextColor; //EDITEI + $saved[ 'bgcolor' ] = $this->FillColor; //EDITEI + $saved[ 'HREF' ] = $this->HREF; //EDITEI + $saved[ 'underline' ] = $this->underline; //EDITEI + $saved[ 'strike' ] = $this->strike; //EDITEI + $saved[ 'SUP' ] = $this->SUP; //EDITEI + $saved[ 'SUB' ] = $this->SUB; //EDITEI + $saved[ 'linewidth' ] = $this->LineWidth; //EDITEI + $saved[ 'drawcolor' ] = $this->DrawColor; //EDITEI + $saved[ 'is_outline' ] = $this->outline_on; //EDITEI + + return $saved; +} + +function restoreFont( $saved ) +{ + $this->FontFamily = $saved[ 'family' ]; + $this->FontStyle = $saved[ 'style' ]; + $this->FontSizePt = $saved[ 'sizePt' ]; + $this->FontSize = $saved[ 'size' ]; + $this->CurrentFont =& $saved[ 'curr' ]; + $this->TextColor = $saved[ 'color' ]; //EDITEI + $this->FillColor = $saved[ 'bgcolor' ]; //EDITEI + $this->ColorFlag = ($this->FillColor != $this->TextColor); //Restore ColorFlag as well + $this->HREF = $saved[ 'HREF' ]; //EDITEI + $this->underline = $saved[ 'underline' ]; //EDITEI + $this->strike = $saved[ 'strike' ]; //EDITEI + $this->SUP = $saved[ 'SUP' ]; //EDITEI + $this->SUB = $saved[ 'SUB' ]; //EDITEI + $this->LineWidth = $saved[ 'linewidth' ]; //EDITEI + $this->DrawColor = $saved[ 'drawcolor' ]; //EDITEI + $this->outline_on = $saved[ 'is_outline' ]; //EDITEI + + if( $this->page > 0) + $this->_out( sprintf( 'BT /F%d %.2f Tf ET', $this->CurrentFont[ 'i' ], $this->FontSizePt ) ); +} + +function newFlowingBlock( $w, $h, $b = 0, $a = 'J', $f = 0 , $is_table = false ) +{ + // cell width in points + if ($is_table) $this->flowingBlockAttr[ 'width' ] = ($w * $this->k); + else $this->flowingBlockAttr[ 'width' ] = ($w * $this->k) - (2*$this->cMargin*$this->k); + // line height in user units + $this->flowingBlockAttr[ 'is_table' ] = $is_table; + $this->flowingBlockAttr[ 'height' ] = $h; + $this->flowingBlockAttr[ 'lineCount' ] = 0; + $this->flowingBlockAttr[ 'border' ] = $b; + $this->flowingBlockAttr[ 'align' ] = $a; + $this->flowingBlockAttr[ 'fill' ] = $f; + $this->flowingBlockAttr[ 'font' ] = array(); + $this->flowingBlockAttr[ 'content' ] = array(); + $this->flowingBlockAttr[ 'contentWidth' ] = 0; +} + +function finishFlowingBlock($outofblock=false) +{ + if (!$outofblock) $currentx = $this->x; //EDITEI - in order to make the Cell method work better + //prints out the last chunk + $is_table = $this->flowingBlockAttr[ 'is_table' ]; + $maxWidth =& $this->flowingBlockAttr[ 'width' ]; + $lineHeight =& $this->flowingBlockAttr[ 'height' ]; + $border =& $this->flowingBlockAttr[ 'border' ]; + $align =& $this->flowingBlockAttr[ 'align' ]; + $fill =& $this->flowingBlockAttr[ 'fill' ]; + $content =& $this->flowingBlockAttr[ 'content' ]; + $font =& $this->flowingBlockAttr[ 'font' ]; + $contentWidth =& $this->flowingBlockAttr[ 'contentWidth' ]; + $lineCount =& $this->flowingBlockAttr[ 'lineCount' ]; + + // set normal spacing + $this->_out( sprintf( '%.3f Tw', 0 ) ); + $this->ws = 0; + + // the amount of space taken up so far in user units + $usedWidth = 0; + + // Print out each chunk + //EDITEI - Print content according to alignment + $empty = $maxWidth - $contentWidth; + $empty /= $this->k; + $b = ''; //do not use borders + $arraysize = count($content); + $margins = (2*$this->cMargin); + if ($outofblock) + { + $align = 'C'; + $empty = 0; + $margins = $this->cMargin; + } + switch($align) + { + case 'R': + foreach ( $content as $k => $chunk ) + { + $this->restoreFont( $font[ $k ] ); + $stringWidth = $this->GetStringWidth( $chunk ) + ( $this->ws * substr_count( $chunk, ' ' ) / $this->k ); + // determine which borders should be used + $b = ''; + if ( $lineCount == 1 && is_int( strpos( $border, 'T' ) ) ) $b .= 'T'; + if ( $k == count( $content ) - 1 && is_int( strpos( $border, 'R' ) ) ) $b .= 'R'; + + if ($k == $arraysize-1 and !$outofblock) $skipln = 1; + else $skipln = 0; + + if ($arraysize == 1) $this->Cell( $stringWidth + $margins + $empty, $lineHeight, $chunk, $b, $skipln, $align, $fill, $this->HREF , $currentx ); //mono-style line + elseif ($k == 0) $this->Cell( $stringWidth + ($margins/2) + $empty, $lineHeight, $chunk, $b, 0, 'R', $fill, $this->HREF );//first part + elseif ($k == $arraysize-1 ) $this->Cell( $stringWidth + ($margins/2), $lineHeight, $chunk, $b, $skipln, '', $fill, $this->HREF, $currentx );//last part + else $this->Cell( $stringWidth , $lineHeight, $chunk, $b, 0, '', $fill, $this->HREF );//middle part + } + break; + case 'L': + case 'J': + foreach ( $content as $k => $chunk ) + { + $this->restoreFont( $font[ $k ] ); + $stringWidth = $this->GetStringWidth( $chunk ) + ( $this->ws * substr_count( $chunk, ' ' ) / $this->k ); + // determine which borders should be used + $b = ''; + if ( $lineCount == 1 && is_int( strpos( $border, 'T' ) ) ) $b .= 'T'; + if ( $k == 0 && is_int( strpos( $border, 'L' ) ) ) $b .= 'L'; + + if ($k == $arraysize-1 and !$outofblock) $skipln = 1; + else $skipln = 0; + + if (!$is_table and !$outofblock and !$fill and $align=='L' and $k == 0) {$align='';$margins=0;} //Remove margins in this special (though often) case + + if ($arraysize == 1) $this->Cell( $stringWidth + $margins + $empty, $lineHeight, $chunk, $b, $skipln, $align, $fill, $this->HREF , $currentx ); //mono-style line + elseif ($k == 0) $this->Cell( $stringWidth + ($margins/2), $lineHeight, $chunk, $b, $skipln, $align, $fill, $this->HREF );//first part + elseif ($k == $arraysize-1 ) $this->Cell( $stringWidth + ($margins/2) + $empty, $lineHeight, $chunk, $b, $skipln, '', $fill, $this->HREF, $currentx );//last part + else $this->Cell( $stringWidth , $lineHeight, $chunk, $b, $skipln, '', $fill, $this->HREF );//middle part + } + break; + case 'C': + foreach ( $content as $k => $chunk ) + { + $this->restoreFont( $font[ $k ] ); + $stringWidth = $this->GetStringWidth( $chunk ) + ( $this->ws * substr_count( $chunk, ' ' ) / $this->k ); + // determine which borders should be used + $b = ''; + if ( $lineCount == 1 && is_int( strpos( $border, 'T' ) ) ) $b .= 'T'; + + if ($k == $arraysize-1 and !$outofblock) $skipln = 1; + else $skipln = 0; + + if ($arraysize == 1) $this->Cell( $stringWidth + $margins + $empty, $lineHeight, $chunk, $b, $skipln, $align, $fill, $this->HREF , $currentx ); //mono-style line + elseif ($k == 0) $this->Cell( $stringWidth + ($margins/2) + ($empty/2), $lineHeight, $chunk, $b, 0, 'R', $fill, $this->HREF );//first part + elseif ($k == $arraysize-1 ) $this->Cell( $stringWidth + ($margins/2) + ($empty/2), $lineHeight, $chunk, $b, $skipln, 'L', $fill, $this->HREF, $currentx );//last part + else $this->Cell( $stringWidth , $lineHeight, $chunk, $b, 0, '', $fill, $this->HREF );//middle part + } + break; + default: break; + } +} + +function WriteFlowingBlock( $s , $outofblock = false ) +{ + if (!$outofblock) $currentx = $this->x; //EDITEI - in order to make the Cell method work better + $is_table = $this->flowingBlockAttr[ 'is_table' ]; + // width of all the content so far in points + $contentWidth =& $this->flowingBlockAttr[ 'contentWidth' ]; + // cell width in points + $maxWidth =& $this->flowingBlockAttr[ 'width' ]; + $lineCount =& $this->flowingBlockAttr[ 'lineCount' ]; + // line height in user units + $lineHeight =& $this->flowingBlockAttr[ 'height' ]; + $border =& $this->flowingBlockAttr[ 'border' ]; + $align =& $this->flowingBlockAttr[ 'align' ]; + $fill =& $this->flowingBlockAttr[ 'fill' ]; + $content =& $this->flowingBlockAttr[ 'content' ]; + $font =& $this->flowingBlockAttr[ 'font' ]; + + $font[] = $this->saveFont(); + $content[] = ''; + + $currContent =& $content[ count( $content ) - 1 ]; + + // where the line should be cutoff if it is to be justified + $cutoffWidth = $contentWidth; + + // for every character in the string + for ( $i = 0; $i < strlen( $s ); $i++ ) + { + // extract the current character + $c = $s{$i}; + // get the width of the character in points + $cw = $this->CurrentFont[ 'cw' ][ $c ] * ( $this->FontSizePt / 1000 ); + + if ( $c == ' ' ) + { + $currContent .= ' '; + $cutoffWidth = $contentWidth; + $contentWidth += $cw; + continue; + } + // try adding another char + if ( $contentWidth + $cw > $maxWidth ) + { + // it won't fit, output what we already have + $lineCount++; + //Readjust MaxSize in order to use the whole page width + if ($outofblock and ($lineCount == 1) ) $maxWidth = $this->pgwidth * $this->k; + // contains any content that didn't make it into this print + $savedContent = ''; + $savedFont = array(); + // first, cut off and save any partial words at the end of the string + $words = explode( ' ', $currContent ); + + // if it looks like we didn't finish any words for this chunk + if ( count( $words ) == 1 ) + { + // save and crop off the content currently on the stack + $savedContent = array_pop( $content ); + $savedFont = array_pop( $font ); + + // trim any trailing spaces off the last bit of content + $currContent =& $content[ count( $content ) - 1 ]; + $currContent = rtrim( $currContent ); + } + else // otherwise, we need to find which bit to cut off + { + $lastContent = ''; + for ( $w = 0; $w < count( $words ) - 1; $w++) $lastContent .= "{$words[ $w ]} "; + + $savedContent = $words[ count( $words ) - 1 ]; + $savedFont = $this->saveFont(); + // replace the current content with the cropped version + $currContent = rtrim( $lastContent ); + } + // update $contentWidth and $cutoffWidth since they changed with cropping + $contentWidth = 0; + foreach ( $content as $k => $chunk ) + { + $this->restoreFont( $font[ $k ] ); + $contentWidth += $this->GetStringWidth( $chunk ) * $this->k; + } + $cutoffWidth = $contentWidth; + // if it's justified, we need to find the char spacing + if( $align == 'J' ) + { + // count how many spaces there are in the entire content string + $numSpaces = 0; + foreach ( $content as $chunk ) $numSpaces += substr_count( $chunk, ' ' ); + // if there's more than one space, find word spacing in points + if ( $numSpaces > 0 ) $this->ws = ( $maxWidth - $cutoffWidth ) / $numSpaces; + else $this->ws = 0; + $this->_out( sprintf( '%.3f Tw', $this->ws ) ); + } + // otherwise, we want normal spacing + else $this->_out( sprintf( '%.3f Tw', 0 ) ); + + //EDITEI - Print content according to alignment + if (!isset($numSpaces)) $numSpaces = 0; + $contentWidth -= ($this->ws*$numSpaces); + $empty = $maxWidth - $contentWidth - 2*($this->ws*$numSpaces); + $empty /= $this->k; + $b = ''; //do not use borders + /*'If' below used in order to fix "first-line of other page with justify on" bug*/ + if($this->y+$this->divheight>$this->PageBreakTrigger and !$this->InFooter and $this->AcceptPageBreak()) + { + $bak_x=$this->x;//Current X position + $ws=$this->ws;//Word Spacing + if($ws>0) + { + $this->ws=0; + $this->_out('0 Tw'); + } + $this->AddPage($this->CurOrientation); + $this->x=$bak_x; + if($ws>0) + { + $this->ws=$ws; + $this->_out(sprintf('%.3f Tw',$ws)); + } + } + $arraysize = count($content); + $margins = (2*$this->cMargin); + if ($outofblock) + { + $align = 'C'; + $empty = 0; + $margins = $this->cMargin; + } + switch($align) + { + case 'R': + foreach ( $content as $k => $chunk ) + { + $this->restoreFont( $font[ $k ] ); + $stringWidth = $this->GetStringWidth( $chunk ) + ( $this->ws * substr_count( $chunk, ' ' ) / $this->k ); + // determine which borders should be used + $b = ''; + if ( $lineCount == 1 && is_int( strpos( $border, 'T' ) ) ) $b .= 'T'; + if ( $k == count( $content ) - 1 && is_int( strpos( $border, 'R' ) ) ) $b .= 'R'; + + if ($arraysize == 1) $this->Cell( $stringWidth + $margins + $empty, $lineHeight, $chunk, $b, 1, $align, $fill, $this->HREF , $currentx ); //mono-style line + elseif ($k == 0) $this->Cell( $stringWidth + ($margins/2) + $empty, $lineHeight, $chunk, $b, 0, 'R', $fill, $this->HREF );//first part + elseif ($k == $arraysize-1 ) $this->Cell( $stringWidth + ($margins/2), $lineHeight, $chunk, $b, 1, '', $fill, $this->HREF, $currentx );//last part + else $this->Cell( $stringWidth , $lineHeight, $chunk, $b, 0, '', $fill, $this->HREF );//middle part + } + break; + case 'L': + case 'J': + foreach ( $content as $k => $chunk ) + { + $this->restoreFont( $font[ $k ] ); + $stringWidth = $this->GetStringWidth( $chunk ) + ( $this->ws * substr_count( $chunk, ' ' ) / $this->k ); + // determine which borders should be used + $b = ''; + if ( $lineCount == 1 && is_int( strpos( $border, 'T' ) ) ) $b .= 'T'; + if ( $k == 0 && is_int( strpos( $border, 'L' ) ) ) $b .= 'L'; + + if (!$is_table and !$outofblock and !$fill and $align=='L' and $k == 0) + { + //Remove margins in this special (though often) case + $align=''; + $margins=0; + } + + if ($arraysize == 1) $this->Cell( $stringWidth + $margins + $empty, $lineHeight, $chunk, $b, 1, $align, $fill, $this->HREF , $currentx ); //mono-style line + elseif ($k == 0) $this->Cell( $stringWidth + ($margins/2), $lineHeight, $chunk, $b, 0, $align, $fill, $this->HREF );//first part + elseif ($k == $arraysize-1 ) $this->Cell( $stringWidth + ($margins/2) + $empty, $lineHeight, $chunk, $b, 1, '', $fill, $this->HREF, $currentx );//last part + else $this->Cell( $stringWidth , $lineHeight, $chunk, $b, 0, '', $fill, $this->HREF );//middle part + + if (!$is_table and !$outofblock and !$fill and $align=='' and $k == 0) + { + $align = 'L'; + $margins = (2*$this->cMargin); + } + } + break; + case 'C': + foreach ( $content as $k => $chunk ) + { + $this->restoreFont( $font[ $k ] ); + $stringWidth = $this->GetStringWidth( $chunk ) + ( $this->ws * substr_count( $chunk, ' ' ) / $this->k ); + // determine which borders should be used + $b = ''; + if ( $lineCount == 1 && is_int( strpos( $border, 'T' ) ) ) $b .= 'T'; + + if ($arraysize == 1) $this->Cell( $stringWidth + $margins + $empty, $lineHeight, $chunk, $b, 1, $align, $fill, $this->HREF , $currentx ); //mono-style line + elseif ($k == 0) $this->Cell( $stringWidth + ($margins/2) + ($empty/2), $lineHeight, $chunk, $b, 0, 'R', $fill, $this->HREF );//first part + elseif ($k == $arraysize-1 ) $this->Cell( $stringWidth + ($margins/2) + ($empty/2), $lineHeight, $chunk, $b, 1, 'L', $fill, $this->HREF, $currentx );//last part + else $this->Cell( $stringWidth , $lineHeight, $chunk, $b, 0, '', $fill, $this->HREF );//middle part + } + break; + default: break; + } + // move on to the next line, reset variables, tack on saved content and current char + $this->restoreFont( $savedFont ); + $font = array( $savedFont ); + $content = array( $savedContent . $s{ $i } ); + + $currContent =& $content[ 0 ]; + $contentWidth = $this->GetStringWidth( $currContent ) * $this->k; + $cutoffWidth = $contentWidth; + } + // another character will fit, so add it on + else + { + $contentWidth += $cw; + $currContent .= $s{ $i }; + } + } +} +//----------------------END OF FLOWING BLOCK------------------------------------// + +//EDITEI +//Thanks to Ron Korving for the WordWrap() function +function WordWrap(&$text, $maxwidth) +{ + $biggestword=0;//EDITEI + $toonarrow=false;//EDITEI + + $text = trim($text); + if ($text==='') return 0; + $space = $this->GetStringWidth(' '); + $lines = explode("\n", $text); + $text = ''; + $count = 0; + + foreach ($lines as $line) + { + $words = preg_split('/ +/', $line); + $width = 0; + + foreach ($words as $word) + { + $wordwidth = $this->GetStringWidth($word); + + //EDITEI + //Warn user that maxwidth is insufficient + if ($wordwidth > $maxwidth) + { + if ($wordwidth > $biggestword) $biggestword = $wordwidth; + $toonarrow=true;//EDITEI + } + if ($width + $wordwidth <= $maxwidth) + { + $width += $wordwidth + $space; + $text .= $word.' '; + } + else + { + $width = $wordwidth + $space; + $text = rtrim($text)."\n".$word.' '; + $count++; + } + } + $text = rtrim($text)."\n"; + $count++; + } + $text = rtrim($text); + + //Return -(wordsize) if word is bigger than maxwidth + if ($toonarrow) return -$biggestword; + else return $count; +} + +//EDITEI +//Thanks to Seb(captainseb@wanadoo.fr) for the _SetTextRendering() and SetTextOutline() functions +/** +* Set Text Rendering Mode +* @param int $mode Set the rendering mode. +* @see SetTextOutline() +*/ +//This function is not being currently used +function _SetTextRendering($mode) { +if (!(($mode == 0) || ($mode == 1) || ($mode == 2))) +$this->Error("Text rendering mode should be 0, 1 or 2 (value : $mode)"); +$this->_out($mode.' Tr'); +} + +/** +* Set Text Ouline On/Off +* @param mixed $width If set to false the text rending mode is set to fill, else it's the width of the outline +* @param int $r If g et b are given, red component; if not, indicates the gray level. Value between 0 and 255 +* @param int $g Green component (between 0 and 255) +* @param int $b Blue component (between 0 and 255) +* @see _SetTextRendering() +*/ +function SetTextOutline($width, $r=0, $g=-1, $b=-1) //EDITEI +{ + if ($width == false) //Now resets all values + { + $this->outline_on = false; + $this->SetLineWidth(0.2); + $this->SetDrawColor(0); + $this->_setTextRendering(0); + $this->_out('0 Tr'); + } + else + { + $this->SetLineWidth($width); + $this->SetDrawColor($r, $g , $b); + $this->_out('2 Tr'); //Fixed + } +} + +//function Circle() thanks to Olivier PLATHEY +//EDITEI +function Circle($x,$y,$r,$style='') +{ + $this->Ellipse($x,$y,$r,$r,$style); +} + +//function Ellipse() thanks to Olivier PLATHEY +//EDITEI +function Ellipse($x,$y,$rx,$ry,$style='D') +{ + if($style=='F') $op='f'; + elseif($style=='FD' or $style=='DF') $op='B'; + else $op='S'; + $lx=4/3*(M_SQRT2-1)*$rx; + $ly=4/3*(M_SQRT2-1)*$ry; + $k=$this->k; + $h=$this->h; + $this->_out(sprintf('%.2f %.2f m %.2f %.2f %.2f %.2f %.2f %.2f c', + ($x+$rx)*$k,($h-$y)*$k, + ($x+$rx)*$k,($h-($y-$ly))*$k, + ($x+$lx)*$k,($h-($y-$ry))*$k, + $x*$k,($h-($y-$ry))*$k)); + $this->_out(sprintf('%.2f %.2f %.2f %.2f %.2f %.2f c', + ($x-$lx)*$k,($h-($y-$ry))*$k, + ($x-$rx)*$k,($h-($y-$ly))*$k, + ($x-$rx)*$k,($h-$y)*$k)); + $this->_out(sprintf('%.2f %.2f %.2f %.2f %.2f %.2f c', + ($x-$rx)*$k,($h-($y+$ly))*$k, + ($x-$lx)*$k,($h-($y+$ry))*$k, + $x*$k,($h-($y+$ry))*$k)); + $this->_out(sprintf('%.2f %.2f %.2f %.2f %.2f %.2f c %s', + ($x+$lx)*$k,($h-($y+$ry))*$k, + ($x+$rx)*$k,($h-($y+$ly))*$k, + ($x+$rx)*$k,($h-$y)*$k, + $op)); +} + +function Image($file,$x,$y,$w=0,$h=0,$type='',$link='',$paint=true) +{ + //Put an image on the page + if(!isset($this->images[$file])) + { + //First use of image, get info + if($type=='') + { + $pos=strrpos($file,'.'); + if(!$pos) $this->Error('Image file has no extension and no type was specified: '.$file); + $type=substr($file,$pos+1); + } + $type=strtolower($type); + $mqr=get_magic_quotes_runtime(); + set_magic_quotes_runtime(0); + if($type=='jpg' or $type=='jpeg') $info=$this->_parsejpg($file); + elseif($type=='png') $info=$this->_parsepng($file); + elseif($type=='gif') $info=$this->_parsegif($file); //EDITEI - GIF format included + else + { + //Allow for additional formats + $mtd='_parse'.$type; + if(!method_exists($this,$mtd)) $this->Error('Unsupported image type: '.$type); + $info=$this->$mtd($file); + } + set_magic_quotes_runtime($mqr); + $info['i']=count($this->images)+1; + $this->images[$file]=$info; + } + else $info=$this->images[$file]; + //Automatic width and height calculation if needed + if($w==0 and $h==0) + { + //Put image at 72 dpi + $w=$info['w']/$this->k; + $h=$info['h']/$this->k; + } + if($w==0) $w=$h*$info['w']/$info['h']; + if($h==0) $h=$w*$info['h']/$info['w']; + + $changedpage = false; //EDITEI + + //Avoid drawing out of the paper(exceeding width limits). //EDITEI + if ( ($x + $w) > $this->fw ) + { + $x = $this->lMargin; + $y += 5; + } + //Avoid drawing out of the page. //EDITEI + if ( ($y + $h) > $this->fh ) + { + $this->AddPage(); + $y = $tMargin + 10; // +10 to avoid drawing too close to border of page + $changedpage = true; + } + + $outstring = 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']); + + if($paint) //EDITEI + { + $this->_out($outstring); + if($link) $this->Link($x,$y,$w,$h,$link); + } + + //Avoid writing text on top of the image. //EDITEI + if ($changedpage) $this->y = $y + $h; + else $this->y = $y + $h; + + //Return width-height array //EDITEI + $sizesarray['WIDTH'] = $w; + $sizesarray['HEIGHT'] = $h; + $sizesarray['X'] = $x; //Position before painting image + $sizesarray['Y'] = $y; //Position before painting image + $sizesarray['OUTPUT'] = $outstring; + return $sizesarray; +} + +//EDITEI - Done after reading a little about PDF reference guide +function DottedRect($x=100,$y=150,$w=50,$h=50) +{ + $x *= $this->k ; + $y = ($this->h-$y)*$this->k; + $w *= $this->k ; + $h *= $this->k ;// - h? + + $herex = $x; + $herey = $y; + + //Make fillcolor == drawcolor + $bak_fill = $this->FillColor; + $this->FillColor = $this->DrawColor; + $this->FillColor = str_replace('RG','rg',$this->FillColor); + $this->_out($this->FillColor); + + while ($herex < ($x + $w)) //draw from upper left to upper right + { + $this->DrawDot($herex,$herey); + $herex += (3*$this->k); + } + $herex = $x + $w; + while ($herey > ($y - $h)) //draw from upper right to lower right + { + $this->DrawDot($herex,$herey); + $herey -= (3*$this->k); + } + $herey = $y - $h; + while ($herex > $x) //draw from lower right to lower left + { + $this->DrawDot($herex,$herey); + $herex -= (3*$this->k); + } + $herex = $x; + while ($herey < $y) //draw from lower left to upper left + { + $this->DrawDot($herex,$herey); + $herey += (3*$this->k); + } + $herey = $y; + + $this->FillColor = $bak_fill; + $this->_out($this->FillColor); //return fillcolor back to normal +} + +//EDITEI - Done after reading a little about PDF reference guide +function DrawDot($x,$y) //center x y +{ + $op = 'B'; // draw Filled Dots + //F == fill //S == stroke //B == stroke and fill + $r = 0.5 * $this->k; //raio + + //Start Point + $x1 = $x - $r; + $y1 = $y; + //End Point + $x2 = $x + $r; + $y2 = $y; + //Auxiliar Point + $x3 = $x; + $y3 = $y + (2*$r);// 2*raio to make a round (not oval) shape + + //Round join and cap + $s="\n".'1 J'."\n"; + $s.='1 j'."\n"; + + //Upper circle + $s.=sprintf('%.3f %.3f m'."\n",$x1,$y1); //x y start drawing + $s.=sprintf('%.3f %.3f %.3f %.3f %.3f %.3f c'."\n",$x1,$y1,$x3,$y3,$x2,$y2);//Bezier curve + //Lower circle + $y3 = $y - (2*$r); + $s.=sprintf("\n".'%.3f %.3f m'."\n",$x1,$y1); //x y start drawing + $s.=sprintf('%.3f %.3f %.3f %.3f %.3f %.3f c'."\n",$x1,$y1,$x3,$y3,$x2,$y2); + $s.=$op."\n"; //stroke and fill + + //Draw in PDF file + $this->_out($s); +} + +function SetDash($black=false,$white=false) +{ + if($black and $white) $s=sprintf('[%.3f %.3f] 0 d',$black*$this->k,$white*$this->k); + else $s='[] 0 d'; + $this->_out($s); +} + +function Bookmark($txt,$level=0,$y=0) +{ + if($y == -1) $y = $this->GetY(); + $this->outlines[]=array('t'=>$txt,'l'=>$level,'y'=>$y,'p'=>$this->PageNo()); +} + +function DisplayPreferences($preferences) +{ + $this->DisplayPreferences .= $preferences; +} + +function _putbookmarks() +{ + $nb=count($this->outlines); + if($nb==0) return; + $lru=array(); + $level=0; + foreach($this->outlines as $i=>$o) + { + if($o['l']>0) + { + $parent=$lru[$o['l']-1]; + //Set parent and last pointers + $this->outlines[$i]['parent']=$parent; + $this->outlines[$parent]['last']=$i; + if($o['l']>$level) + { + //Level increasing: set first pointer + $this->outlines[$parent]['first']=$i; + } + } + else + $this->outlines[$i]['parent']=$nb; + if($o['l']<=$level and $i>0) + { + //Set prev and next pointers + $prev=$lru[$o['l']]; + $this->outlines[$prev]['next']=$i; + $this->outlines[$i]['prev']=$prev; + } + $lru[$o['l']]=$i; + $level=$o['l']; + } + //Outline items + $n=$this->n+1; + foreach($this->outlines as $i=>$o) + { + $this->_newobj(); + $this->_out('<_textstring($o['t'])); + $this->_out('/Parent '.($n+$o['parent']).' 0 R'); + if(isset($o['prev'])) + $this->_out('/Prev '.($n+$o['prev']).' 0 R'); + if(isset($o['next'])) + $this->_out('/Next '.($n+$o['next']).' 0 R'); + if(isset($o['first'])) + $this->_out('/First '.($n+$o['first']).' 0 R'); + if(isset($o['last'])) + $this->_out('/Last '.($n+$o['last']).' 0 R'); + $this->_out(sprintf('/Dest [%d 0 R /XYZ 0 %.2f null]',1+2*$o['p'],($this->h-$o['y'])*$this->k)); + $this->_out('/Count 0>>'); + $this->_out('endobj'); + } + //Outline root + $this->_newobj(); + $this->OutlineRoot=$this->n; + $this->_out('<_out('/Last '.($n+$lru[0]).' 0 R>>'); + $this->_out('endobj'); +} + +function Ln($h='') +{ + //Line feed; default value is last cell height + $this->x=$this->lMargin; + if(is_string($h)) $this->y+=$this->lasth; + else $this->y+=$h; +} + +function GetX() +{ + //Get x position + return $this->x; +} + +function SetX($x) +{ + //Set x position + if($x >= 0) $this->x=$x; + else $this->x = $this->w + $x; +} + +function GetY() +{ + //Get y position + return $this->y; +} + +function SetY($y) +{ + //Set y position and reset x + $this->x=$this->lMargin; + if($y>=0) + $this->y=$y; + else + $this->y=$this->h+$y; +} + +function SetXY($x,$y) +{ + //Set x and y positions + $this->SetY($y); + $this->SetX($x); +} + +function Output($name='',$dest='') +{ + //Output PDF to some destination + global $HTTP_SERVER_VARS; + + //Finish document if necessary + if($this->state < 3) $this->Close(); + //Normalize parameters + if(is_bool($dest)) $dest=$dest ? 'D' : 'F'; + $dest=strtoupper($dest); + if($dest=='') + { + if($name=='') + { + $name='doc.pdf'; + $dest='I'; + } + else + $dest='F'; + } + switch($dest) + { + case 'I': + //Send to standard output + if(isset($HTTP_SERVER_VARS['SERVER_NAME'])) + { + //We send to a browser + Header('Content-Type: application/pdf'); + if(headers_sent()) + $this->Error('Some data has already been output to browser, can\'t send PDF file'); + Header('Content-Length: '.strlen($this->buffer)); + Header('Content-disposition: inline; filename='.$name); + } + echo $this->buffer; + break; + case 'D': + //Download file + if(isset($HTTP_SERVER_VARS['HTTP_USER_AGENT']) and strpos($HTTP_SERVER_VARS['HTTP_USER_AGENT'],'MSIE')) + Header('Content-Type: application/force-download'); + else + Header('Content-Type: application/octet-stream'); + if(headers_sent()) + $this->Error('Some data has already been output to browser, can\'t send PDF file'); + Header('Content-Length: '.strlen($this->buffer)); + Header('Content-disposition: attachment; filename='.$name); + echo $this->buffer; + break; + case 'F': + //Save to local file + $f=fopen($name,'wb'); + if(!$f) $this->Error('Unable to create output file: '.$name); + fwrite($f,$this->buffer,strlen($this->buffer)); + fclose($f); + break; + case 'S': + //Return as a string + return $this->buffer; + default: + $this->Error('Incorrect output destination: '.$dest); + } + return ''; +} + +/******************************************************************************* +* * +* Protected methods * +* * +*******************************************************************************/ +function _dochecks() +{ + //Check for locale-related bug + if(1.1==1) + $this->Error('Don\'t alter the locale before including class file'); + //Check for decimal separator + if(sprintf('%.1f',1.0)!='1.0') + setlocale(LC_NUMERIC,'C'); +} + +function _begindoc() +{ + //Start document + $this->state=1; + $this->_out('%PDF-1.3'); +} + +function _putpages() +{ + $nb=$this->page; + if(!empty($this->AliasNbPages)) + { + //Replace number of pages + for($n=1;$n<=$nb;$n++) + $this->pages[$n]=str_replace($this->AliasNbPages,$nb,$this->pages[$n]); + } + if($this->DefOrientation=='P') + { + $wPt=$this->fwPt; + $hPt=$this->fhPt; + } + else + { + $wPt=$this->fhPt; + $hPt=$this->fwPt; + } + $filter=($this->compress) ? '/Filter /FlateDecode ' : ''; + for($n=1;$n<=$nb;$n++) + { + //Page + $this->_newobj(); + $this->_out('<_out('/Parent 1 0 R'); + if(isset($this->OrientationChanges[$n])) + $this->_out(sprintf('/MediaBox [0 0 %.2f %.2f]',$hPt,$wPt)); + $this->_out('/Resources 2 0 R'); + if(isset($this->PageLinks[$n])) + { + //Links + $annots='/Annots ['; + foreach($this->PageLinks[$n] as $pl) + { + $rect=sprintf('%.2f %.2f %.2f %.2f',$pl[0],$pl[1],$pl[0]+$pl[2],$pl[1]-$pl[3]); + $annots.='<_textstring($pl[4]).'>>>>'; + else + { + $l=$this->links[$pl[4]]; + $h=isset($this->OrientationChanges[$l[0]]) ? $wPt : $hPt; + $annots.=sprintf('/Dest [%d 0 R /XYZ 0 %.2f null]>>',1+2*$l[0],$h-$l[1]*$this->k); + } + } + $this->_out($annots.']'); + } + $this->_out('/Contents '.($this->n+1).' 0 R>>'); + $this->_out('endobj'); + //Page content + $p=($this->compress) ? gzcompress($this->pages[$n]) : $this->pages[$n]; + $this->_newobj(); + $this->_out('<<'.$filter.'/Length '.strlen($p).'>>'); + $this->_putstream($p); + $this->_out('endobj'); + } + //Pages root + $this->offsets[1]=strlen($this->buffer); + $this->_out('1 0 obj'); + $this->_out('<_out($kids.']'); + $this->_out('/Count '.$nb); + $this->_out(sprintf('/MediaBox [0 0 %.2f %.2f]',$wPt,$hPt)); + $this->_out('>>'); + $this->_out('endobj'); +} + +function _putfonts() +{ + $nf=$this->n; + foreach($this->diffs as $diff) + { + //Encodings + $this->_newobj(); + $this->_out('<>'); + $this->_out('endobj'); + } + $mqr=get_magic_quotes_runtime(); + set_magic_quotes_runtime(0); + foreach($this->FontFiles as $file=>$info) + { + //Font file embedding + $this->_newobj(); + $this->FontFiles[$file]['n']=$this->n; + if(defined('FPDF_FONTPATH')) + $file=FPDF_FONTPATH.$file; + $size=filesize($file); + if(!$size) + $this->Error('Font file not found'); + $this->_out('<_out('/Filter /FlateDecode'); + $this->_out('/Length1 '.$info['length1']); + if(isset($info['length2'])) + $this->_out('/Length2 '.$info['length2'].' /Length3 0'); + $this->_out('>>'); + $f=fopen($file,'rb'); + $this->_putstream(fread($f,$size)); + fclose($f); + $this->_out('endobj'); + } + set_magic_quotes_runtime($mqr); + foreach($this->fonts as $k=>$font) + { + //Font objects + $this->fonts[$k]['n']=$this->n+1; + $type=$font['type']; + $name=$font['name']; + if($type=='core') + { + //Standard font + $this->_newobj(); + $this->_out('<_out('/BaseFont /'.$name); + $this->_out('/Subtype /Type1'); + if($name!='Symbol' and $name!='ZapfDingbats') + $this->_out('/Encoding /WinAnsiEncoding'); + $this->_out('>>'); + $this->_out('endobj'); + } + elseif($type=='Type1' or $type=='TrueType') + { + //Additional Type1 or TrueType font + $this->_newobj(); + $this->_out('<_out('/BaseFont /'.$name); + $this->_out('/Subtype /'.$type); + $this->_out('/FirstChar 32 /LastChar 255'); + $this->_out('/Widths '.($this->n+1).' 0 R'); + $this->_out('/FontDescriptor '.($this->n+2).' 0 R'); + if($font['enc']) + { + if(isset($font['diff'])) + $this->_out('/Encoding '.($nf+$font['diff']).' 0 R'); + else + $this->_out('/Encoding /WinAnsiEncoding'); + } + $this->_out('>>'); + $this->_out('endobj'); + //Widths + $this->_newobj(); + $cw=&$font['cw']; + $s='['; + for($i=32;$i<=255;$i++) + $s.=$cw[chr($i)].' '; + $this->_out($s.']'); + $this->_out('endobj'); + //Descriptor + $this->_newobj(); + $s='<$v) + $s.=' /'.$k.' '.$v; + $file=$font['file']; + if($file) + $s.=' /FontFile'.($type=='Type1' ? '' : '2').' '.$this->FontFiles[$file]['n'].' 0 R'; + $this->_out($s.'>>'); + $this->_out('endobj'); + } + else + { + //Allow for additional types + $mtd='_put'.strtolower($type); + if(!method_exists($this,$mtd)) + $this->Error('Unsupported font type: '.$type); + $this->$mtd($font); + } + } +} + +function _putimages() +{ + $filter=($this->compress) ? '/Filter /FlateDecode ' : ''; + reset($this->images); + while(list($file,$info)=each($this->images)) + { + $this->_newobj(); + $this->images[$file]['n']=$this->n; + $this->_out('<_out('/Subtype /Image'); + $this->_out('/Width '.$info['w']); + $this->_out('/Height '.$info['h']); + if($info['cs']=='Indexed') + $this->_out('/ColorSpace [/Indexed /DeviceRGB '.(strlen($info['pal'])/3-1).' '.($this->n+1).' 0 R]'); + else + { + $this->_out('/ColorSpace /'.$info['cs']); + if($info['cs']=='DeviceCMYK') + $this->_out('/Decode [1 0 1 0 1 0 1 0]'); + } + $this->_out('/BitsPerComponent '.$info['bpc']); + $this->_out('/Filter /'.$info['f']); + if(isset($info['parms'])) + $this->_out($info['parms']); + if(isset($info['trns']) and is_array($info['trns'])) + { + $trns=''; + for($i=0;$i_out('/Mask ['.$trns.']'); + } + $this->_out('/Length '.strlen($info['data']).'>>'); + $this->_putstream($info['data']); + unset($this->images[$file]['data']); + $this->_out('endobj'); + //Palette + if($info['cs']=='Indexed') + { + $this->_newobj(); + $pal=($this->compress) ? gzcompress($info['pal']) : $info['pal']; + $this->_out('<<'.$filter.'/Length '.strlen($pal).'>>'); + $this->_putstream($pal); + $this->_out('endobj'); + } + } +} + +function _putresources() +{ + $this->_putfonts(); + $this->_putimages(); + //Resource dictionary + $this->offsets[2]=strlen($this->buffer); + $this->_out('2 0 obj'); + $this->_out('<_out('/Font <<'); + foreach($this->fonts as $font) + $this->_out('/F'.$font['i'].' '.$font['n'].' 0 R'); + $this->_out('>>'); + if(count($this->images)) + { + $this->_out('/XObject <<'); + foreach($this->images as $image) + $this->_out('/I'.$image['i'].' '.$image['n'].' 0 R'); + $this->_out('>>'); + } + $this->_out('>>'); + $this->_out('endobj'); + $this->_putbookmarks(); //EDITEI +} + +function _putinfo() +{ + $this->_out('/Producer '.$this->_textstring('FPDF '.FPDF_VERSION)); + if(!empty($this->title)) + $this->_out('/Title '.$this->_textstring($this->title)); + if(!empty($this->subject)) + $this->_out('/Subject '.$this->_textstring($this->subject)); + if(!empty($this->author)) + $this->_out('/Author '.$this->_textstring($this->author)); + if(!empty($this->keywords)) + $this->_out('/Keywords '.$this->_textstring($this->keywords)); + if(!empty($this->creator)) + $this->_out('/Creator '.$this->_textstring($this->creator)); + $this->_out('/CreationDate '.$this->_textstring('D:'.date('YmdHis'))); +} + +function _putcatalog() +{ + $this->_out('/Type /Catalog'); + $this->_out('/Pages 1 0 R'); + if($this->ZoomMode=='fullpage') $this->_out('/OpenAction [3 0 R /Fit]'); + elseif($this->ZoomMode=='fullwidth') $this->_out('/OpenAction [3 0 R /FitH null]'); + elseif($this->ZoomMode=='real') $this->_out('/OpenAction [3 0 R /XYZ null null 1]'); + elseif(!is_string($this->ZoomMode)) $this->_out('/OpenAction [3 0 R /XYZ null null '.($this->ZoomMode/100).']'); + if($this->LayoutMode=='single') $this->_out('/PageLayout /SinglePage'); + elseif($this->LayoutMode=='continuous') $this->_out('/PageLayout /OneColumn'); + elseif($this->LayoutMode=='two') $this->_out('/PageLayout /TwoColumnLeft'); + //EDITEI - added lines below + if(count($this->outlines)>0) + { + $this->_out('/Outlines '.$this->OutlineRoot.' 0 R'); + $this->_out('/PageMode /UseOutlines'); + } + if(is_int(strpos($this->DisplayPreferences,'FullScreen'))) $this->_out('/PageMode /FullScreen'); + if($this->DisplayPreferences) + { + $this->_out('/ViewerPreferences<<'); + if(is_int(strpos($this->DisplayPreferences,'HideMenubar'))) $this->_out('/HideMenubar true'); + if(is_int(strpos($this->DisplayPreferences,'HideToolbar'))) $this->_out('/HideToolbar true'); + if(is_int(strpos($this->DisplayPreferences,'HideWindowUI'))) $this->_out('/HideWindowUI true'); + if(is_int(strpos($this->DisplayPreferences,'DisplayDocTitle'))) $this->_out('/DisplayDocTitle true'); + if(is_int(strpos($this->DisplayPreferences,'CenterWindow'))) $this->_out('/CenterWindow true'); + if(is_int(strpos($this->DisplayPreferences,'FitWindow'))) $this->_out('/FitWindow true'); + $this->_out('>>'); + } +} + +function _puttrailer() +{ + $this->_out('/Size '.($this->n+1)); + $this->_out('/Root '.$this->n.' 0 R'); + $this->_out('/Info '.($this->n-1).' 0 R'); +} + +function _enddoc() +{ + $this->_putpages(); + $this->_putresources(); + //Info + $this->_newobj(); + $this->_out('<<'); + $this->_putinfo(); + $this->_out('>>'); + $this->_out('endobj'); + //Catalog + $this->_newobj(); + $this->_out('<<'); + $this->_putcatalog(); + $this->_out('>>'); + $this->_out('endobj'); + //Cross-ref + $o=strlen($this->buffer); + $this->_out('xref'); + $this->_out('0 '.($this->n+1)); + $this->_out('0000000000 65535 f '); + for($i=1; $i <= $this->n ; $i++) + $this->_out(sprintf('%010d 00000 n ',$this->offsets[$i])); + //Trailer + $this->_out('trailer'); + $this->_out('<<'); + $this->_puttrailer(); + $this->_out('>>'); + $this->_out('startxref'); + $this->_out($o); + $this->_out('%%EOF'); + $this->state=3; +} + +function _beginpage($orientation) +{ + $this->page++; + $this->pages[$this->page]=''; + $this->state=2; + $this->x=$this->lMargin; + $this->y=$this->tMargin; + $this->FontFamily=''; + //Page orientation + if(!$orientation) + $orientation=$this->DefOrientation; + else + { + $orientation=strtoupper($orientation{0}); + if($orientation!=$this->DefOrientation) + $this->OrientationChanges[$this->page]=true; + } + if($orientation!=$this->CurOrientation) + { + //Change orientation + if($orientation=='P') + { + $this->wPt=$this->fwPt; + $this->hPt=$this->fhPt; + $this->w=$this->fw; + $this->h=$this->fh; + } + else + { + $this->wPt=$this->fhPt; + $this->hPt=$this->fwPt; + $this->w=$this->fh; + $this->h=$this->fw; + } + $this->PageBreakTrigger=$this->h-$this->bMargin; + $this->CurOrientation=$orientation; + } +} + +function _endpage() +{ + //End of page contents + $this->state=1; +} + +function _newobj() +{ + //Begin a new object + $this->n++; + $this->offsets[$this->n]=strlen($this->buffer); + $this->_out($this->n.' 0 obj'); +} + +function _dounderline($x,$y,$txt) +{ + //Underline text + $up=$this->CurrentFont['up']; + $ut=$this->CurrentFont['ut']; + $w=$this->GetStringWidth($txt)+$this->ws*substr_count($txt,' '); + 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); +} + +function _parsejpg($file) +{ + //Extract info from a JPEG file + $a=GetImageSize($file); + if(!$a) + $this->Error('Missing or incorrect image file: '.$file); + if($a[2]!=2) + $this->Error('Not a JPEG file: '.$file); + if(!isset($a['channels']) or $a['channels']==3) + $colspace='DeviceRGB'; + elseif($a['channels']==4) + $colspace='DeviceCMYK'; + else + $colspace='DeviceGray'; + $bpc=isset($a['bits']) ? $a['bits'] : 8; + //Read whole file + $f=fopen($file,'rb'); + $data=''; + while(!feof($f)) + $data.=fread($f,4096); + fclose($f); + return array('w'=>$a[0],'h'=>$a[1],'cs'=>$colspace,'bpc'=>$bpc,'f'=>'DCTDecode','data'=>$data); +} + +function _parsepng($file) +{ + //Extract info from a PNG file + $f=fopen($file,'rb'); + //Extract info from a PNG file + if(!$f) $this->Error('Can\'t open image file: '.$file); + //Check signature + if(fread($f,8)!=chr(137).'PNG'.chr(13).chr(10).chr(26).chr(10)) + $this->Error('Not a PNG file: '.$file); + //Read header chunk + fread($f,4); + if(fread($f,4)!='IHDR') $this->Error('Incorrect PNG file: '.$file); + $w=$this->_freadint($f); + $h=$this->_freadint($f); + $bpc=ord(fread($f,1)); + if($bpc>8) $this->Error('16-bit depth not supported: '.$file); + $ct=ord(fread($f,1)); + if($ct==0) $colspace='DeviceGray'; + elseif($ct==2) $colspace='DeviceRGB'; + elseif($ct==3) $colspace='Indexed'; + else $this->Error('Alpha channel not supported: '.$file); + if(ord(fread($f,1))!=0) $this->Error('Unknown compression method: '.$file); + if(ord(fread($f,1))!=0) $this->Error('Unknown filter method: '.$file); + if(ord(fread($f,1))!=0) $this->Error('Interlacing not supported: '.$file); + fread($f,4); + $parms='/DecodeParms <>'; + //Scan chunks looking for palette, transparency and image data + $pal=''; + $trns=''; + $data=''; + do + { + $n=$this->_freadint($f); + $type=fread($f,4); + if($type=='PLTE') + { + //Read palette + $pal=fread($f,$n); + fread($f,4); + } + elseif($type=='tRNS') + { + //Read transparency info + $t=fread($f,$n); + if($ct==0) $trns=array(ord(substr($t,1,1))); + elseif($ct==2) $trns=array(ord(substr($t,1,1)),ord(substr($t,3,1)),ord(substr($t,5,1))); + else + { + $pos=strpos($t,chr(0)); + if(is_int($pos)) $trns=array($pos); + } + fread($f,4); + } + elseif($type=='IDAT') + { + //Read image data block + $data.=fread($f,$n); + fread($f,4); + } + elseif($type=='IEND') break; + else fread($f,$n+4); + } + while($n); + if($colspace=='Indexed' and empty($pal)) $this->Error('Missing palette in '.$file); + fclose($f); + return array('w'=>$w,'h'=>$h,'cs'=>$colspace,'bpc'=>$bpc,'f'=>'FlateDecode','parms'=>$parms,'pal'=>$pal,'trns'=>$trns,'data'=>$data); +} + +function _parsegif($file) //EDITEI - GIF support is now included +{ + //Function by Jérôme Fenal + require_once(RELATIVE_PATH.'gif.php'); //GIF class in pure PHP from Yamasoft (http://www.yamasoft.com/php-gif.zip) + + $h=0; + $w=0; + $gif=new CGIF(); + + if (!$gif->loadFile($file, 0)) + $this->Error("GIF parser: unable to open file $file"); + + if($gif->m_img->m_gih->m_bLocalClr) { + $nColors = $gif->m_img->m_gih->m_nTableSize; + $pal = $gif->m_img->m_gih->m_colorTable->toString(); + if($bgColor != -1) { + $bgColor = $this->m_img->m_gih->m_colorTable->colorIndex($bgColor); + } + $colspace='Indexed'; + } elseif($gif->m_gfh->m_bGlobalClr) { + $nColors = $gif->m_gfh->m_nTableSize; + $pal = $gif->m_gfh->m_colorTable->toString(); + if((isset($bgColor)) and $bgColor != -1) { + $bgColor = $gif->m_gfh->m_colorTable->colorIndex($bgColor); + } + $colspace='Indexed'; + } else { + $nColors = 0; + $bgColor = -1; + $colspace='DeviceGray'; + $pal=''; + } + + $trns=''; + if($gif->m_img->m_bTrans && ($nColors > 0)) { + $trns=array($gif->m_img->m_nTrans); + } + + $data=$gif->m_img->m_data; + $w=$gif->m_gfh->m_nWidth; + $h=$gif->m_gfh->m_nHeight; + + if($colspace=='Indexed' and empty($pal)) + $this->Error('Missing palette in '.$file); + + if ($this->compress) { + $data=gzcompress($data); + return array( 'w'=>$w, 'h'=>$h, 'cs'=>$colspace, 'bpc'=>8, 'f'=>'FlateDecode', 'pal'=>$pal, 'trns'=>$trns, 'data'=>$data); + } else { + return array( 'w'=>$w, 'h'=>$h, 'cs'=>$colspace, 'bpc'=>8, 'pal'=>$pal, 'trns'=>$trns, 'data'=>$data); + } +} + +function _freadint($f) +{ + //Read a 4-byte integer from file + $i=ord(fread($f,1))<<24; + $i+=ord(fread($f,1))<<16; + $i+=ord(fread($f,1))<<8; + $i+=ord(fread($f,1)); + return $i; +} + +function _textstring($s) +{ + //Format a text string + return '('.$this->_escape($s).')'; +} + +function _escape($s) +{ + //Add \ before \, ( and ) + return str_replace(')','\\)',str_replace('(','\\(',str_replace('\\','\\\\',$s))); +} + +function _putstream($s) +{ + $this->_out('stream'); + $this->_out($s); + $this->_out('endstream'); +} + +function _out($s) +{ + //Add a line to the document + if($this->state==2) $this->pages[$this->page] .= $s."\n"; + else $this->buffer .= $s."\n"; +} + + +}//End of class + +//Handle special IE contype request +if(isset($HTTP_SERVER_VARS['HTTP_USER_AGENT']) and $HTTP_SERVER_VARS['HTTP_USER_AGENT']=='contype') +{ + Header('Content-Type: application/pdf'); + exit; +} + +} //end of 'if(!class_exists('FPDF'))'' +?> diff --git a/main/plugin/html2fpdf/gif.php b/main/plugin/html2fpdf/gif.php new file mode 100644 index 0000000000..7c6162ecdb --- /dev/null +++ b/main/plugin/html2fpdf/gif.php @@ -0,0 +1,1083 @@ + = gif_loadFile(filename, [index]) +// = gif_getSize( or filename, &width, &height) +// = gif_outputAsPng(, filename, [bgColor]) +// = gif_outputAsBmp(, filename, [bgcolor]) +// = gif_outputAsJpeg(, filename, [bgcolor]) - Requires cjpeg +/////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////// + +function gif_loadFile($lpszFileName, $iIndex = 0) +{ + $gif = new CGIF(); + + if(!$gif->loadFile($lpszFileName, $iIndex)) { + return false; + } + + return $gif; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +function gif_outputAsBmp($gif, $lpszFileName, $bgColor = -1) +{ + if(!isSet($gif) || (@get_class($gif) <> "cgif") || !$gif->loaded() || ($lpszFileName == "")) { + return false; + } + + $fd = $gif->getBmp($bgColor); + if(strlen($fd) <= 0) { + return false; + } + + if(!($fh = @fOpen($lpszFileName, "wb"))) { + return false; + } + @fWrite($fh, $fd, strlen($fd)); + @fFlush($fh); + @fClose($fh); + return true; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +function gif_outputAsPng($gif, $lpszFileName, $bgColor = -1) +{ + if(!isSet($gif) || (@get_class($gif) <> "cgif") || !$gif->loaded() || ($lpszFileName == "")) { + return false; + } + + $fd = $gif->getPng($bgColor); + if(strlen($fd) <= 0) { + return false; + } + + if(!($fh = @fOpen($lpszFileName, "wb"))) { + return false; + } + @fWrite($fh, $fd, strlen($fd)); + @fFlush($fh); + @fClose($fh); + return true; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +function gif_outputAsJpeg($gif, $lpszFileName, $bgColor = -1) +{ + if(gif_outputAsBmp($gif, "$lpszFileName.bmp", $gbColor)) { + exec("cjpeg $lpszFileName.bmp >$lpszFileName 2>/dev/null"); + @unLink("$lpszFileName.bmp"); + + if(@file_exists($lpszFileName)) { + if(@fileSize($lpszFileName) > 0) { + return true; + } + + @unLink($lpszFileName); + } + } + + return false; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +function gif_getSize($gif, &$width, &$height) +{ + if(isSet($gif) && (@get_class($gif) == "cgif") && $gif->loaded()) { + $width = $gif->width(); + $height = $gif->height(); + } + else if(@file_exists($gif)) { + $myGIF = new CGIF(); + if(!$myGIF->getSize($gif, $width, $height)) { + return false; + } + } + else { + return false; + } + + return true; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +class CGIFLZW +{ + var $MAX_LZW_BITS; + var $Fresh, $CodeSize, $SetCodeSize, $MaxCode, $MaxCodeSize, $FirstCode, $OldCode; + var $ClearCode, $EndCode, $Next, $Vals, $Stack, $sp, $Buf, $CurBit, $LastBit, $Done, $LastByte; + + /////////////////////////////////////////////////////////////////////////// + + // CONSTRUCTOR + function CGIFLZW() + { + $this->MAX_LZW_BITS = 12; + unSet($this->Next); + unSet($this->Vals); + unSet($this->Stack); + unSet($this->Buf); + + $this->Next = range(0, (1 << $this->MAX_LZW_BITS) - 1); + $this->Vals = range(0, (1 << $this->MAX_LZW_BITS) - 1); + $this->Stack = range(0, (1 << ($this->MAX_LZW_BITS + 1)) - 1); + $this->Buf = range(0, 279); + } + + /////////////////////////////////////////////////////////////////////////// + + function deCompress($data, &$datLen) + { + $stLen = strlen($data); + $datLen = 0; + $ret = ""; + + // INITIALIZATION + $this->LZWCommand($data, true); + + while(($iIndex = $this->LZWCommand($data, false)) >= 0) { + $ret .= chr($iIndex); + } + + $datLen = $stLen - strlen($data); + + if($iIndex != -2) { + return false; + } + + return $ret; + } + + /////////////////////////////////////////////////////////////////////////// + + function LZWCommand(&$data, $bInit) + { + if($bInit) { + $this->SetCodeSize = ord($data{0}); + $data = substr($data, 1); + + $this->CodeSize = $this->SetCodeSize + 1; + $this->ClearCode = 1 << $this->SetCodeSize; + $this->EndCode = $this->ClearCode + 1; + $this->MaxCode = $this->ClearCode + 2; + $this->MaxCodeSize = $this->ClearCode << 1; + + $this->GetCode($data, $bInit); + + $this->Fresh = 1; + for($i = 0; $i < $this->ClearCode; $i++) { + $this->Next[$i] = 0; + $this->Vals[$i] = $i; + } + + for(; $i < (1 << $this->MAX_LZW_BITS); $i++) { + $this->Next[$i] = 0; + $this->Vals[$i] = 0; + } + + $this->sp = 0; + return 1; + } + + if($this->Fresh) { + $this->Fresh = 0; + do { + $this->FirstCode = $this->GetCode($data, $bInit); + $this->OldCode = $this->FirstCode; + } + while($this->FirstCode == $this->ClearCode); + + return $this->FirstCode; + } + + if($this->sp > 0) { + $this->sp--; + return $this->Stack[$this->sp]; + } + + while(($Code = $this->GetCode($data, $bInit)) >= 0) { + if($Code == $this->ClearCode) { + for($i = 0; $i < $this->ClearCode; $i++) { + $this->Next[$i] = 0; + $this->Vals[$i] = $i; + } + + for(; $i < (1 << $this->MAX_LZW_BITS); $i++) { + $this->Next[$i] = 0; + $this->Vals[$i] = 0; + } + + $this->CodeSize = $this->SetCodeSize + 1; + $this->MaxCodeSize = $this->ClearCode << 1; + $this->MaxCode = $this->ClearCode + 2; + $this->sp = 0; + $this->FirstCode = $this->GetCode($data, $bInit); + $this->OldCode = $this->FirstCode; + + return $this->FirstCode; + } + + if($Code == $this->EndCode) { + return -2; + } + + $InCode = $Code; + if($Code >= $this->MaxCode) { + $this->Stack[$this->sp] = $this->FirstCode; + $this->sp++; + $Code = $this->OldCode; + } + + while($Code >= $this->ClearCode) { + $this->Stack[$this->sp] = $this->Vals[$Code]; + $this->sp++; + + if($Code == $this->Next[$Code]) // Circular table entry, big GIF Error! + return -1; + + $Code = $this->Next[$Code]; + } + + $this->FirstCode = $this->Vals[$Code]; + $this->Stack[$this->sp] = $this->FirstCode; + $this->sp++; + + if(($Code = $this->MaxCode) < (1 << $this->MAX_LZW_BITS)) { + $this->Next[$Code] = $this->OldCode; + $this->Vals[$Code] = $this->FirstCode; + $this->MaxCode++; + + if(($this->MaxCode >= $this->MaxCodeSize) && ($this->MaxCodeSize < (1 << $this->MAX_LZW_BITS))) { + $this->MaxCodeSize *= 2; + $this->CodeSize++; + } + } + + $this->OldCode = $InCode; + if($this->sp > 0) { + $this->sp--; + return $this->Stack[$this->sp]; + } + } + + return $Code; + } + + /////////////////////////////////////////////////////////////////////////// + + function GetCode(&$data, $bInit) + { + if($bInit) { + $this->CurBit = 0; + $this->LastBit = 0; + $this->Done = 0; + $this->LastByte = 2; + return 1; + } + + if(($this->CurBit + $this->CodeSize) >= $this->LastBit) { + if($this->Done) { + if($this->CurBit >= $this->LastBit) { + // Ran off the end of my bits + return 0; + } + return -1; + } + + $this->Buf[0] = $this->Buf[$this->LastByte - 2]; + $this->Buf[1] = $this->Buf[$this->LastByte - 1]; + + $Count = ord($data{0}); + $data = substr($data, 1); + + if($Count) { + for($i = 0; $i < $Count; $i++) { + $this->Buf[2 + $i] = ord($data{$i}); + } + $data = substr($data, $Count); + } + else { + $this->Done = 1; + } + + $this->LastByte = 2 + $Count; + $this->CurBit = ($this->CurBit - $this->LastBit) + 16; + $this->LastBit = (2 + $Count) << 3; + } + + $iRet = 0; + for($i = $this->CurBit, $j = 0; $j < $this->CodeSize; $i++, $j++) { + $iRet |= (($this->Buf[intval($i / 8)] & (1 << ($i % 8))) != 0) << $j; + } + + $this->CurBit += $this->CodeSize; + return $iRet; + } +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +class CGIFCOLORTABLE +{ + var $m_nColors; + var $m_arColors; + + /////////////////////////////////////////////////////////////////////////// + + // CONSTRUCTOR + function CGIFCOLORTABLE() + { + unSet($this->m_nColors); + unSet($this->m_arColors); + } + + /////////////////////////////////////////////////////////////////////////// + + function load($lpData, $num) + { + $this->m_nColors = 0; + $this->m_arColors = array(); + + for($i = 0; $i < $num; $i++) { + $rgb = substr($lpData, $i * 3, 3); + if(strlen($rgb) < 3) { + return false; + } + + $this->m_arColors[] = (ord($rgb{2}) << 16) + (ord($rgb{1}) << 8) + ord($rgb{0}); + $this->m_nColors++; + } + + return true; + } + + /////////////////////////////////////////////////////////////////////////// + + function toString() + { + $ret = ""; + + for($i = 0; $i < $this->m_nColors; $i++) { + $ret .= + chr(($this->m_arColors[$i] & 0x000000FF)) . // R + chr(($this->m_arColors[$i] & 0x0000FF00) >> 8) . // G + chr(($this->m_arColors[$i] & 0x00FF0000) >> 16); // B + } + + return $ret; + } + + /////////////////////////////////////////////////////////////////////////// + + function toRGBQuad() + { + $ret = ""; + + for($i = 0; $i < $this->m_nColors; $i++) { + $ret .= + chr(($this->m_arColors[$i] & 0x00FF0000) >> 16) . // B + chr(($this->m_arColors[$i] & 0x0000FF00) >> 8) . // G + chr(($this->m_arColors[$i] & 0x000000FF)) . // R + "\x00"; + } + + return $ret; + } + + /////////////////////////////////////////////////////////////////////////// + + function colorIndex($rgb) + { + $rgb = intval($rgb) & 0xFFFFFF; + $r1 = ($rgb & 0x0000FF); + $g1 = ($rgb & 0x00FF00) >> 8; + $b1 = ($rgb & 0xFF0000) >> 16; + $idx = -1; + + for($i = 0; $i < $this->m_nColors; $i++) { + $r2 = ($this->m_arColors[$i] & 0x000000FF); + $g2 = ($this->m_arColors[$i] & 0x0000FF00) >> 8; + $b2 = ($this->m_arColors[$i] & 0x00FF0000) >> 16; + $d = abs($r2 - $r1) + abs($g2 - $g1) + abs($b2 - $b1); + + if(($idx == -1) || ($d < $dif)) { + $idx = $i; + $dif = $d; + } + } + + return $idx; + } +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +class CGIFFILEHEADER +{ + var $m_lpVer; + var $m_nWidth; + var $m_nHeight; + var $m_bGlobalClr; + var $m_nColorRes; + var $m_bSorted; + var $m_nTableSize; + var $m_nBgColor; + var $m_nPixelRatio; + var $m_colorTable; + + /////////////////////////////////////////////////////////////////////////// + + // CONSTRUCTOR + function CGIFFILEHEADER() + { + unSet($this->m_lpVer); + unSet($this->m_nWidth); + unSet($this->m_nHeight); + unSet($this->m_bGlobalClr); + unSet($this->m_nColorRes); + unSet($this->m_bSorted); + unSet($this->m_nTableSize); + unSet($this->m_nBgColor); + unSet($this->m_nPixelRatio); + unSet($this->m_colorTable); + } + + /////////////////////////////////////////////////////////////////////////// + + function load($lpData, &$hdrLen) + { + $hdrLen = 0; + + $this->m_lpVer = substr($lpData, 0, 6); + if(($this->m_lpVer <> "GIF87a") && ($this->m_lpVer <> "GIF89a")) { + return false; + } + + $this->m_nWidth = $this->w2i(substr($lpData, 6, 2)); + $this->m_nHeight = $this->w2i(substr($lpData, 8, 2)); + if(!$this->m_nWidth || !$this->m_nHeight) { + return false; + } + + $b = ord(substr($lpData, 10, 1)); + $this->m_bGlobalClr = ($b & 0x80) ? true : false; + $this->m_nColorRes = ($b & 0x70) >> 4; + $this->m_bSorted = ($b & 0x08) ? true : false; + $this->m_nTableSize = 2 << ($b & 0x07); + $this->m_nBgColor = ord(substr($lpData, 11, 1)); + $this->m_nPixelRatio = ord(substr($lpData, 12, 1)); + $hdrLen = 13; + + if($this->m_bGlobalClr) { + $this->m_colorTable = new CGIFCOLORTABLE(); + if(!$this->m_colorTable->load(substr($lpData, $hdrLen), $this->m_nTableSize)) { + return false; + } + $hdrLen += 3 * $this->m_nTableSize; + } + + return true; + } + + /////////////////////////////////////////////////////////////////////////// + + function w2i($str) + { + return ord(substr($str, 0, 1)) + (ord(substr($str, 1, 1)) << 8); + } +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +class CGIFIMAGEHEADER +{ + var $m_nLeft; + var $m_nTop; + var $m_nWidth; + var $m_nHeight; + var $m_bLocalClr; + var $m_bInterlace; + var $m_bSorted; + var $m_nTableSize; + var $m_colorTable; + + /////////////////////////////////////////////////////////////////////////// + + // CONSTRUCTOR + function CGIFIMAGEHEADER() + { + unSet($this->m_nLeft); + unSet($this->m_nTop); + unSet($this->m_nWidth); + unSet($this->m_nHeight); + unSet($this->m_bLocalClr); + unSet($this->m_bInterlace); + unSet($this->m_bSorted); + unSet($this->m_nTableSize); + unSet($this->m_colorTable); + } + + /////////////////////////////////////////////////////////////////////////// + + function load($lpData, &$hdrLen) + { + $hdrLen = 0; + + $this->m_nLeft = $this->w2i(substr($lpData, 0, 2)); + $this->m_nTop = $this->w2i(substr($lpData, 2, 2)); + $this->m_nWidth = $this->w2i(substr($lpData, 4, 2)); + $this->m_nHeight = $this->w2i(substr($lpData, 6, 2)); + + if(!$this->m_nWidth || !$this->m_nHeight) { + return false; + } + + $b = ord($lpData{8}); + $this->m_bLocalClr = ($b & 0x80) ? true : false; + $this->m_bInterlace = ($b & 0x40) ? true : false; + $this->m_bSorted = ($b & 0x20) ? true : false; + $this->m_nTableSize = 2 << ($b & 0x07); + $hdrLen = 9; + + if($this->m_bLocalClr) { + $this->m_colorTable = new CGIFCOLORTABLE(); + if(!$this->m_colorTable->load(substr($lpData, $hdrLen), $this->m_nTableSize)) { + return false; + } + $hdrLen += 3 * $this->m_nTableSize; + } + + return true; + } + + /////////////////////////////////////////////////////////////////////////// + + function w2i($str) + { + return ord(substr($str, 0, 1)) + (ord(substr($str, 1, 1)) << 8); + } +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +class CGIFIMAGE +{ + var $m_disp; + var $m_bUser; + var $m_bTrans; + var $m_nDelay; + var $m_nTrans; + var $m_lpComm; + var $m_gih; + var $m_data; + var $m_lzw; + + /////////////////////////////////////////////////////////////////////////// + + function CGIFIMAGE() + { + unSet($this->m_disp); + unSet($this->m_bUser); + unSet($this->m_bTrans); + unSet($this->m_nDelay); + unSet($this->m_nTrans); + unSet($this->m_lpComm); + unSet($this->m_data); + $this->m_gih = new CGIFIMAGEHEADER(); + $this->m_lzw = new CGIFLZW(); + } + + /////////////////////////////////////////////////////////////////////////// + + function load($data, &$datLen) + { + $datLen = 0; + + while(true) { + $b = ord($data{0}); + $data = substr($data, 1); + $datLen++; + + switch($b) { + case 0x21: // Extension + if(!$this->skipExt($data, $len = 0)) { + return false; + } + $datLen += $len; + break; + + case 0x2C: // Image + // LOAD HEADER & COLOR TABLE + if(!$this->m_gih->load($data, $len = 0)) { + return false; + } + $data = substr($data, $len); + $datLen += $len; + + // ALLOC BUFFER + if(!($this->m_data = $this->m_lzw->deCompress($data, $len = 0))) { + return false; + } + $data = substr($data, $len); + $datLen += $len; + + if($this->m_gih->m_bInterlace) { + $this->deInterlace(); + } + return true; + + case 0x3B: // EOF + default: + return false; + } + } + return false; + } + + /////////////////////////////////////////////////////////////////////////// + + function skipExt(&$data, &$extLen) + { + $extLen = 0; + + $b = ord($data{0}); + $data = substr($data, 1); + $extLen++; + + switch($b) { + case 0xF9: // Graphic Control + $b = ord($data{1}); + $this->m_disp = ($b & 0x1C) >> 2; + $this->m_bUser = ($b & 0x02) ? true : false; + $this->m_bTrans = ($b & 0x01) ? true : false; + $this->m_nDelay = $this->w2i(substr($data, 2, 2)); + $this->m_nTrans = ord($data{4}); + break; + + case 0xFE: // Comment + $this->m_lpComm = substr($data, 1, ord($data{0})); + break; + + case 0x01: // Plain text + break; + + case 0xFF: // Application + break; + } + + // SKIP DEFAULT AS DEFS MAY CHANGE + $b = ord($data{0}); + $data = substr($data, 1); + $extLen++; + while($b > 0) { + $data = substr($data, $b); + $extLen += $b; + $b = ord($data{0}); + $data = substr($data, 1); + $extLen++; + } + return true; + } + + /////////////////////////////////////////////////////////////////////////// + + function w2i($str) + { + return ord(substr($str, 0, 1)) + (ord(substr($str, 1, 1)) << 8); + } + + /////////////////////////////////////////////////////////////////////////// + + function deInterlace() + { + $data = $this->m_data; + + for($i = 0; $i < 4; $i++) { + switch($i) { + case 0: + $s = 8; + $y = 0; + break; + + case 1: + $s = 8; + $y = 4; + break; + + case 2: + $s = 4; + $y = 2; + break; + + case 3: + $s = 2; + $y = 1; + break; + } + + for(; $y < $this->m_gih->m_nHeight; $y += $s) { + $lne = substr($this->m_data, 0, $this->m_gih->m_nWidth); + $this->m_data = substr($this->m_data, $this->m_gih->m_nWidth); + + $data = + substr($data, 0, $y * $this->m_gih->m_nWidth) . + $lne . + substr($data, ($y + 1) * $this->m_gih->m_nWidth); + } + } + + $this->m_data = $data; + } +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +class CGIF +{ + var $m_gfh; + var $m_lpData; + var $m_img; + var $m_bLoaded; + + /////////////////////////////////////////////////////////////////////////// + + // CONSTRUCTOR + function CGIF() + { + $this->m_gfh = new CGIFFILEHEADER(); + $this->m_img = new CGIFIMAGE(); + $this->m_lpData = ""; + $this->m_bLoaded = false; + } + + /////////////////////////////////////////////////////////////////////////// + + function loadFile($lpszFileName, $iIndex) + { + if($iIndex < 0) { + return false; + } + // READ FILE + if(!($fh = @fOpen($lpszFileName, "rb"))) { + return false; + } + //EDITEI - in order to read remote files (HTTP(s) and FTP protocols) + if ( strpos($lpszFileName,"http") !== false or strpos($lpszFileName,"ftp") !== false ) + { + $contents = ''; + while (!feof($fh)) $contents .= @fread($fh, 8192); + } + else + { + $contents = @fread($fh,@filesize($lpszFileName) ); + } + $this->m_lpData = $contents; +// $this->m_lpData = @fRead($fh, @fileSize($lpszFileName)); + fClose($fh); + + // GET FILE HEADER + if(!$this->m_gfh->load($this->m_lpData, $len = 0)) { + return false; + } + $this->m_lpData = substr($this->m_lpData, $len); + + do { + if(!$this->m_img->load($this->m_lpData, $imgLen = 0)) { + return false; + } + $this->m_lpData = substr($this->m_lpData, $imgLen); + } + while($iIndex-- > 0); + + $this->m_bLoaded = true; + return true; + } + + /////////////////////////////////////////////////////////////////////////// + + function getSize($lpszFileName, &$width, &$height) + { + if(!($fh = @fOpen($lpszFileName, "rb"))) { + return false; + } + $data = @fRead($fh, @fileSize($lpszFileName)); + @fClose($fh); + + $gfh = new CGIFFILEHEADER(); + if(!$gfh->load($data, $len = 0)) { + return false; + } + + $width = $gfh->m_nWidth; + $height = $gfh->m_nHeight; + return true; + } + + /////////////////////////////////////////////////////////////////////////// + + function getBmp($bgColor) + { + $out = ""; + + if(!$this->m_bLoaded) { + return false; + } + + // PREPARE COLOR TABLE (RGBQUADs) + if($this->m_img->m_gih->m_bLocalClr) { + $nColors = $this->m_img->m_gih->m_nTableSize; + $rgbq = $this->m_img->m_gih->m_colorTable->toRGBQuad(); + if($bgColor != -1) { + $bgColor = $this->m_img->m_gih->m_colorTable->colorIndex($bgColor); + } + } + else if($this->m_gfh->m_bGlobalClr) { + $nColors = $this->m_gfh->m_nTableSize; + $rgbq = $this->m_gfh->m_colorTable->toRGBQuad(); + if($bgColor != -1) { + $bgColor = $this->m_gfh->m_colorTable->colorIndex($bgColor); + } + } + else { + $nColors = 0; + $bgColor = -1; + } + + // PREPARE BITMAP BITS + $data = $this->m_img->m_data; + $nPxl = ($this->m_gfh->m_nHeight - 1) * $this->m_gfh->m_nWidth; + $bmp = ""; + $nPad = ($this->m_gfh->m_nWidth % 4) ? 4 - ($this->m_gfh->m_nWidth % 4) : 0; + for($y = 0; $y < $this->m_gfh->m_nHeight; $y++) { + for($x = 0; $x < $this->m_gfh->m_nWidth; $x++, $nPxl++) { + if( + ($x >= $this->m_img->m_gih->m_nLeft) && + ($y >= $this->m_img->m_gih->m_nTop) && + ($x < ($this->m_img->m_gih->m_nLeft + $this->m_img->m_gih->m_nWidth)) && + ($y < ($this->m_img->m_gih->m_nTop + $this->m_img->m_gih->m_nHeight))) { + // PART OF IMAGE + if($this->m_img->m_bTrans && (ord($data{$nPxl}) == $this->m_img->m_nTrans)) { + // TRANSPARENT -> BACKGROUND + if($bgColor == -1) { + $bmp .= chr($this->m_gfh->m_nBgColor); + } + else { + $bmp .= chr($bgColor); + } + } + else { + $bmp .= $data{$nPxl}; + } + } + else { + // BACKGROUND + if($bgColor == -1) { + $bmp .= chr($this->m_gfh->m_nBgColor); + } + else { + $bmp .= chr($bgColor); + } + } + } + $nPxl -= $this->m_gfh->m_nWidth << 1; + + // ADD PADDING + for($x = 0; $x < $nPad; $x++) { + $bmp .= "\x00"; + } + } + + // BITMAPFILEHEADER + $out .= "BM"; + $out .= $this->dword(14 + 40 + ($nColors << 2) + strlen($bmp)); + $out .= "\x00\x00"; + $out .= "\x00\x00"; + $out .= $this->dword(14 + 40 + ($nColors << 2)); + + // BITMAPINFOHEADER + $out .= $this->dword(40); + $out .= $this->dword($this->m_gfh->m_nWidth); + $out .= $this->dword($this->m_gfh->m_nHeight); + $out .= "\x01\x00"; + $out .= "\x08\x00"; + $out .= "\x00\x00\x00\x00"; + $out .= "\x00\x00\x00\x00"; + $out .= "\x12\x0B\x00\x00"; + $out .= "\x12\x0B\x00\x00"; + $out .= $this->dword($nColors % 256); + $out .= "\x00\x00\x00\x00"; + + // COLOR TABLE + if($nColors > 0) { + $out .= $rgbq; + } + + // DATA + $out .= $bmp; + + return $out; + } + + /////////////////////////////////////////////////////////////////////////// + + function getPng($bgColor) + { + $out = ""; + + if(!$this->m_bLoaded) { + return false; + } + + // PREPARE COLOR TABLE (RGBQUADs) + if($this->m_img->m_gih->m_bLocalClr) { + $nColors = $this->m_img->m_gih->m_nTableSize; + $pal = $this->m_img->m_gih->m_colorTable->toString(); + if($bgColor != -1) { + $bgColor = $this->m_img->m_gih->m_colorTable->colorIndex($bgColor); + } + } + else if($this->m_gfh->m_bGlobalClr) { + $nColors = $this->m_gfh->m_nTableSize; + $pal = $this->m_gfh->m_colorTable->toString(); + if($bgColor != -1) { + $bgColor = $this->m_gfh->m_colorTable->colorIndex($bgColor); + } + } + else { + $nColors = 0; + $bgColor = -1; + } + + // PREPARE BITMAP BITS + $data = $this->m_img->m_data; + $nPxl = 0; + $bmp = ""; + for($y = 0; $y < $this->m_gfh->m_nHeight; $y++) { + $bmp .= "\x00"; + for($x = 0; $x < $this->m_gfh->m_nWidth; $x++, $nPxl++) { + if( + ($x >= $this->m_img->m_gih->m_nLeft) && + ($y >= $this->m_img->m_gih->m_nTop) && + ($x < ($this->m_img->m_gih->m_nLeft + $this->m_img->m_gih->m_nWidth)) && + ($y < ($this->m_img->m_gih->m_nTop + $this->m_img->m_gih->m_nHeight))) { + // PART OF IMAGE + $bmp .= $data{$nPxl}; + } + else { + // BACKGROUND + if($bgColor == -1) { + $bmp .= chr($this->m_gfh->m_nBgColor); + } + else { + $bmp .= chr($bgColor); + } + } + } + } + $bmp = gzcompress($bmp, 9); + + /////////////////////////////////////////////////////////////////////// + // SIGNATURE + $out .= "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A"; + /////////////////////////////////////////////////////////////////////// + // HEADER + $out .= "\x00\x00\x00\x0D"; + $tmp = "IHDR"; + $tmp .= $this->ndword($this->m_gfh->m_nWidth); + $tmp .= $this->ndword($this->m_gfh->m_nHeight); + $tmp .= "\x08\x03\x00\x00\x00"; + $out .= $tmp; + $out .= $this->ndword(crc32($tmp)); + /////////////////////////////////////////////////////////////////////// + // PALETTE + if($nColors > 0) { + $out .= $this->ndword($nColors * 3); + $tmp = "PLTE"; + $tmp .= $pal; + $out .= $tmp; + $out .= $this->ndword(crc32($tmp)); + } + /////////////////////////////////////////////////////////////////////// + // TRANSPARENCY + if($this->m_img->m_bTrans && ($nColors > 0)) { + $out .= $this->ndword($nColors); + $tmp = "tRNS"; + for($i = 0; $i < $nColors; $i++) { + $tmp .= ($i == $this->m_img->m_nTrans) ? "\x00" : "\xFF"; + } + $out .= $tmp; + $out .= $this->ndword(crc32($tmp)); + } + /////////////////////////////////////////////////////////////////////// + // DATA BITS + $out .= $this->ndword(strlen($bmp)); + $tmp = "IDAT"; + $tmp .= $bmp; + $out .= $tmp; + $out .= $this->ndword(crc32($tmp)); + /////////////////////////////////////////////////////////////////////// + // END OF FILE + $out .= "\x00\x00\x00\x00IEND\xAE\x42\x60\x82"; + + return $out; + } + + /////////////////////////////////////////////////////////////////////////// + + function dword($val) + { + $val = intval($val); + return chr($val & 0xFF).chr(($val & 0xFF00) >> 8).chr(($val & 0xFF0000) >> 16).chr(($val & 0xFF000000) >> 24); + } + + /////////////////////////////////////////////////////////////////////////// + + function ndword($val) + { + $val = intval($val); + return chr(($val & 0xFF000000) >> 24).chr(($val & 0xFF0000) >> 16).chr(($val & 0xFF00) >> 8).chr($val & 0xFF); + } + + /////////////////////////////////////////////////////////////////////////// + + function width() + { + return $this->m_gfh->m_nWidth; + } + + /////////////////////////////////////////////////////////////////////////// + + function height() + { + return $this->m_gfh->m_nHeight; + } + + /////////////////////////////////////////////////////////////////////////// + + function comment() + { + return $this->m_img->m_lpComm; + } + + /////////////////////////////////////////////////////////////////////////// + + function loaded() + { + return $this->m_bLoaded; + } +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +?> diff --git a/main/plugin/html2fpdf/html2fpdf.php b/main/plugin/html2fpdf/html2fpdf.php new file mode 100644 index 0000000000..93e4e445da --- /dev/null +++ b/main/plugin/html2fpdf/html2fpdf.php @@ -0,0 +1,2910 @@ +currentfont - mine +. $this->CurrentFont - fpdf's + +TODO (in the future...): +- Make font-family, font-size, lineheight customizable +- Increase number of HTML/CSS tags/properties, Image/Font Types, recognized/supported +- allow BMP support? (tried with http://phpthumb.sourceforge.net/ but failed) +- Improve CSS support +- support image side-by-side or one-below-another or both? +- Improve code clarity even more (modularize and get better var names like on textbuffer array's indexes for example) + +////////////////////////////////////////////////////////////////////////////// +//////////////DO NOT MODIFY THE CONTENTS OF THIS BOX////////////////////////// +////////////////////////////////////////////////////////////////////////////// +// // +// HTML2FPDF is a php script to read a HTML text and generate a PDF file. // +// Copyright (C) 2004-2005 Renato Coelho // +// This script may be distributed as long as the following files are kept // +// together: // +// // +// fpdf.php, html2fpdf.php, gif.php,htmltoolkit.php,license.txt,credits.txt // +// // +////////////////////////////////////////////////////////////////////////////// + +Misc. Observations: +- CSS + align = bug! (?) +OBS1: para textos de mais de 1 página, talvez tenha que juntar varios $texto_artigo +antes de mandar gerar o PDF, para que o PDF gerado seja completo. +OBS2: there are 2 types of spaces 32 and 160 (ascii values) +OBS3: //! is a special comment to be used with source2doc.php, a script I created +in order to generate the doc on the site html2fpdf.sf.net +OBS4: var $LineWidth; // line width in user unit - use this to make css thin/medium/thick work +OBS5: Images and Textareas: when they are inserted you can only type below them (==display:block) +OBS6: Optimized to 'A4' paper (default font: Arial , normal , size 11 ) +OBS7: Regexp + Perl ([preg]accepts non-greedy quantifiers while PHP[ereg] does not) +Perl: '/regexp/x' where x == option ( x = i:ignore case , x = s: DOT gets \n as well) +========================END OF INITIAL COMMENTS================================= +*/ + +define('HTML2FPDF_VERSION','3.0(beta)'); +if (!defined('RELATIVE_PATH')) define('RELATIVE_PATH',''); +if (!defined('FPDF_FONTPATH')) define('FPDF_FONTPATH','font/'); +require_once(RELATIVE_PATH.'fpdf.php'); +require_once(RELATIVE_PATH.'htmltoolkit.php'); + +class HTML2FPDF extends FPDF +{ +//internal attributes +var $HREF; //! string +var $pgwidth; //! float +var $fontlist; //! array +var $issetfont; //! bool +var $issetcolor; //! bool +var $titulo; //! string +var $oldx; //! float +var $oldy; //! float +var $B; //! int +var $U; //! int +var $I; //! int + +var $tablestart; //! bool +var $tdbegin; //! bool +var $table; //! array +var $cell; //! array +var $col; //! int +var $row; //! int + +var $divbegin; //! bool +var $divalign; //! char +var $divwidth; //! float +var $divheight; //! float +var $divbgcolor; //! bool +var $divcolor; //! bool +var $divborder; //! int +var $divrevert; //! bool + +var $listlvl; //! int +var $listnum; //! int +var $listtype; //! string +//array(lvl,# of occurrences) +var $listoccur; //! array +//array(lvl,occurrence,type,maxnum) +var $listlist; //! array +//array(lvl,num,content,type) +var $listitem; //! array + +var $buffer_on; //! bool +var $pbegin; //! bool +var $pjustfinished; //! bool +var $blockjustfinished; //! bool +var $SUP; //! bool +var $SUB; //! bool +var $toupper; //! bool +var $tolower; //! bool +var $dash_on; //! bool +var $dotted_on; //! bool +var $strike; //! bool + +var $CSS; //! array +var $cssbegin; //! bool +var $backupcss; //! array +var $textbuffer; //! array +var $currentstyle; //! string +var $currentfont; //! string +var $colorarray; //! array +var $bgcolorarray; //! array +var $internallink; //! array +var $enabledtags; //! string + +var $lineheight; //! int +var $basepath; //! string +// array('COLOR','WIDTH','OLDWIDTH') +var $outlineparam; //! array +var $outline_on; //! bool + +var $specialcontent; //! string +var $selectoption; //! array + +//options attributes +var $usecss; //! bool +var $usepre; //! bool +var $usetableheader; //! bool +var $shownoimg; //! bool + +function HTML2FPDF($orientation='P',$unit='mm',$format='A4') +{ +//! @desc Constructor +//! @return An object (a class instance) + //Call parent constructor + $this->FPDF($orientation,$unit,$format); + //To make the function Footer() work properly + $this->AliasNbPages(); + //Enable all tags as default + $this->DisableTags(); + //Set default display preferences + $this->DisplayPreferences(''); + //Initialization of the attributes + $this->SetFont('Arial','',11); // Changeable?(not yet...) + $this->lineheight = 5; // Related to FontSizePt == 11 + $this->pgwidth = $this->fw - $this->lMargin - $this->rMargin ; + $this->SetFillColor(255); + $this->HREF=''; + $this->titulo=''; + $this->oldx=-1; + $this->oldy=-1; + $this->B=0; + $this->U=0; + $this->I=0; + + $this->listlvl=0; + $this->listnum=0; + $this->listtype=''; + $this->listoccur=array(); + $this->listlist=array(); + $this->listitem=array(); + + $this->tablestart=false; + $this->tdbegin=false; + $this->table=array(); + $this->cell=array(); + $this->col=-1; + $this->row=-1; + + $this->divbegin=false; + $this->divalign="L"; + $this->divwidth=0; + $this->divheight=0; + $this->divbgcolor=false; + $this->divcolor=false; + $this->divborder=0; + $this->divrevert=false; + + $this->fontlist=array("arial","times","courier","helvetica","symbol","monospace","serif","sans"); + $this->issetfont=false; + $this->issetcolor=false; + + $this->pbegin=false; + $this->pjustfinished=false; + $this->blockjustfinished = true; //in order to eliminate exceeding left-side spaces + $this->toupper=false; + $this->tolower=false; + $this->dash_on=false; + $this->dotted_on=false; + $this->SUP=false; + $this->SUB=false; + $this->buffer_on=false; + $this->strike=false; + + $this->currentfont=''; + $this->currentstyle=''; + $this->colorarray=array(); + $this->bgcolorarray=array(); + $this->cssbegin=false; + $this->textbuffer=array(); + $this->CSS=array(); + $this->backupcss=array(); + $this->internallink=array(); + + $this->basepath = ""; + + $this->outlineparam = array(); + $this->outline_on = false; + + $this->specialcontent = ''; + $this->selectoption = array(); + + $this->shownoimg=false; + $this->usetableheader=false; + $this->usecss=true; + $this->usepre=true; +} + +function setBasePath($str) +{ +//! @desc Inform the script where the html file is (full path - e.g. http://www.google.com/dir1/dir2/dir3/file.html ) in order to adjust HREF and SRC links. No-Parameter: The directory where this script is. +//! @return void + $this->basepath = dirname($str) . "/"; + $this->basepath = str_replace("\\","/",$this->basepath); //If on Windows +} + +function ShowNOIMG_GIF($opt=true) +{ +//! @desc Enable/Disable Displaying the no_img.gif when an image is not found. No-Parameter: Enable +//! @return void + $this->shownoimg=$opt; +} + +function UseCSS($opt=true) +{ +//! @desc Enable/Disable CSS recognition. No-Parameter: Enable +//! @return void + $this->usecss=$opt; +} + +function UseTableHeader($opt=true) +{ +//! @desc Enable/Disable Table Header to appear every new page. No-Parameter: Enable +//! @return void + $this->usetableheader=$opt; +} + +function UsePRE($opt=true) +{ +//! @desc Enable/Disable pre tag recognition. No-Parameter: Enable +//! @return void + $this->usepre=$opt; +} + +//Page header +function Header($content='') +{ +//! @return void +//! @desc The header is printed in every page. + if($this->usetableheader and $content != '') + { + $y = $this->y; + foreach($content as $tableheader) + { + $this->y = $y; + //Set some cell values + $x = $tableheader['x']; + $w = $tableheader['w']; + $h = $tableheader['h']; + $va = $tableheader['va']; + $mih = $tableheader['mih']; + $fill = $tableheader['bgcolor']; + $border = $tableheader['border']; + $align = $tableheader['a']; + //Align + $this->divalign=$align; + $this->x = $x; + //Vertical align + if (!isset($va) || $va=='M') $this->y += ($h-$mih)/2; + elseif (isset($va) && $va=='B') $this->y += $h-$mih; + if ($fill) + { + $color = ConvertColor($fill); + $this->SetFillColor($color['R'],$color['G'],$color['B']); + $this->Rect($x, $y, $w, $h, 'F'); + } + //Border + if (isset($border) and $border != 'all') $this->_tableRect($x, $y, $w, $h, $border); + elseif (isset($border) && $border == 'all') $this->Rect($x, $y, $w, $h); + //Print cell content + $this->divwidth = $w-2; + $this->divheight = 1.1*$this->lineheight; + $textbuffer = $tableheader['textbuffer']; + if (!empty($textbuffer)) $this->printbuffer($textbuffer,false,true/*inside a table*/); + $textbuffer = array(); + } + $this->y = $y + $h; //Update y coordinate + }//end of 'if usetableheader ...' +} + +//Page footer +function Footer() +{ +//! @return void +//! @desc The footer is printed in every page! + //Position at 1.0 cm from bottom + $this->SetY(-10); + //Copyright //especial para esta versão + $this->SetFont('Arial','B',9); + $this->SetTextColor(0); + //Arial italic 9 + $this->SetFont('Arial','I',9); + //Page number + $this->Cell(0,10,$this->PageNo().'/{nb}',0,0,'C'); + //Return Font to normal + $this->SetFont('Arial','',11); +} + +/////////////////// +/// HTML parser /// +/////////////////// +function WriteHTML($html) +{ +//! @desc HTML parser +//! @return void +/* $e == content */ + + $this->ReadMetaTags($html); + $html = AdjustHTML($html,$this->usepre); //Try to make HTML look more like XHTML + if ($this->usecss) $html = $this->ReadCSS($html); + //Add new supported tags in the DisableTags function + $html=str_replace('enabledtags); //remove all unsupported tags, but the ones inside the 'enabledtags' string + //Explode the string in order to parse the HTML code + $a=preg_split('/<(.*?)>/ms',$html,-1,PREG_SPLIT_DELIM_CAPTURE); + + foreach($a as $i => $e) + { + + if($i%2==0) + { + //TEXT + + //Adjust lineheight + // $this->lineheight = (5*$this->FontSizePt)/11; //should be inside printbuffer? + //Adjust text, if needed + if (strpos($e,"&") !== false) //HTML-ENTITIES decoding + { + if (strpos($e,"#") !== false) $e = value_entity_decode($e); // Decode value entities + //Avoid crashing the script on PHP 4.0 + $version = phpversion(); + $version = str_replace('.','',$version); + if ($version >= 430) $e = html_entity_decode($e,ENT_QUOTES,'cp1252'); // changes   and the like by their respective char + else $e = lesser_entity_decode($e); + } + $e = str_replace(chr(160),chr(32),$e); //unify ascii code of spaces (in order to recognize all of them correctly) + if (strlen($e) == 0) continue; + if ($this->divrevert) $e = strrev($e); + if ($this->toupper) $e = strtoupper($e); + if ($this->tolower) $e = strtolower($e); + //Start of 'if/elseif's + if($this->titulo) $this->SetTitle($e); + elseif($this->specialcontent) + { + if ($this->specialcontent == "type=select" and $this->selectoption['ACTIVE'] == true) //SELECT tag (form element) + { + $stringwidth = $this->GetStringWidth($e); + if (!isset($this->selectoption['MAXWIDTH']) or $stringwidth > $this->selectoption['MAXWIDTH']) $this->selectoption['MAXWIDTH'] = $stringwidth; + if (!isset($this->selectoption['SELECTED']) or $this->selectoption['SELECTED'] == '') $this->selectoption['SELECTED'] = $e; + } + else $this->textbuffer[] = array("»¤¬"/*identifier*/.$this->specialcontent."»¤¬".$e); + } + elseif($this->tablestart) + { + if($this->tdbegin) + { + $this->cell[$this->row][$this->col]['textbuffer'][] = array($e,$this->HREF,$this->currentstyle,$this->colorarray,$this->currentfont,$this->SUP,$this->SUB,''/*internal link*/,$this->strike,$this->outlineparam,$this->bgcolorarray); + $this->cell[$this->row][$this->col]['text'][] = $e; + $this->cell[$this->row][$this->col]['s'] += $this->GetStringWidth($e); + } + //Ignore content between , and a
tag (this content is usually only a bunch of spaces) + } + elseif($this->pbegin or $this->HREF or $this->divbegin or $this->SUP or $this->SUB or $this->strike or $this->buffer_on) $this->textbuffer[] = array($e,$this->HREF,$this->currentstyle,$this->colorarray,$this->currentfont,$this->SUP,$this->SUB,''/*internal link*/,$this->strike,$this->outlineparam,$this->bgcolorarray); //Accumulate text on buffer + else + { + if ($this->blockjustfinished) $e = ltrim($e); + if ($e != '') + { + $this->Write($this->lineheight,$e); //Write text directly in the PDF + if ($this->pjustfinished) $this->pjustfinished = false; + } + } + } + else + { + //Tag + if($e{0}=='/') $this->CloseTag(strtoupper(substr($e,1))); + else + { + $regexp = '|=\'(.*?)\'|s'; // eliminate single quotes, if any + $e = preg_replace($regexp,"=\"\$1\"",$e); + $regexp = '| (\\w+?)=([^\\s>"]+)|si'; // changes anykey=anyvalue to anykey="anyvalue" (only do this when this happens inside tags) + $e = preg_replace($regexp," \$1=\"\$2\"",$e); + //Fix path values, if needed + if ((stristr($e,"href=") !== false) or (stristr($e,"src=") !== false) ) + { + $regexp = '/ (href|src)="(.*?)"/i'; + preg_match($regexp,$e,$auxiliararray); + $path = $auxiliararray[2]; + $path = str_replace("\\","/",$path); //If on Windows + //Get link info and obtain its absolute path + $regexp = '|^./|'; + $path = preg_replace($regexp,'',$path); + if($path{0} != '#') //It is not an Internal Link + { + if (strpos($path,"../") !== false ) //It is a Relative Link + { + $backtrackamount = substr_count($path,"../"); + $maxbacktrack = substr_count($this->basepath,"/") - 1; + $filepath = str_replace("../",'',$path); + $path = $this->basepath; + //If it is an invalid relative link, then make it go to directory root + if ($backtrackamount > $maxbacktrack) $backtrackamount = $maxbacktrack; + //Backtrack some directories + for( $i = 0 ; $i < $backtrackamount + 1 ; $i++ ) $path = substr( $path, 0 , strrpos($path,"/") ); + $path = $path . "/" . $filepath; //Make it an absolute path + } + elseif( strpos($path,":/") === false) //It is a Local Link + { + $path = $this->basepath . $path; + } + //Do nothing if it is an Absolute Link + } + $regexp = '/ (href|src)="(.*?)"/i'; + $e = preg_replace($regexp,' \\1="'.$path.'"',$e); + }//END of Fix path values + //Extract attributes + $contents=array(); + preg_match_all('/\\S*=["\'][^"\']*["\']/',$e,$contents); + preg_match('/\\S+/',$e,$a2); + $tag=strtoupper($a2[0]); + $attr=array(); + if (!empty($contents)) + { + foreach($contents[0] as $v) + { + if(ereg('^([^=]*)=["\']?([^"\']*)["\']?$',$v,$a3)) + { + $attr[strtoupper($a3[1])]=$a3[2]; + } + } + } + $this->OpenTag($tag,$attr); + } + } + }//end of foreach($a as $i=>$e) + //Create Internal Links, if needed + if (!empty($this->internallink) ) + { + foreach($this->internallink as $k=>$v) + { + if (strpos($k,"#") !== false ) continue; //ignore + $ypos = $v['Y']; + $pagenum = $v['PAGE']; + $sharp = "#"; + while (array_key_exists($sharp.$k,$this->internallink)) + { + $internallink = $this->internallink[$sharp.$k]; + $this->SetLink($internallink,$ypos,$pagenum); + $sharp .= "#"; + } + } + } +} + +function OpenTag($tag,$attr) +{ +//! @return void +// What this gets: < $tag $attr['WIDTH']="90px" > does not get content here + + $align = array('left'=>'L','center'=>'C','right'=>'R','top'=>'T','middle'=>'M','bottom'=>'B','justify'=>'J'); + + $this->blockjustfinished=false; + //Opening tag + switch($tag){ + case 'PAGE_BREAK': //custom-tag + case 'NEWPAGE': //custom-tag + $this->blockjustfinished = true; + $this->AddPage(); + break; + case 'OUTLINE': //custom-tag (CSS2 property - browsers don't support it yet - Jan2005) + //Usage: (default: width=normal color=white) + //Text + //Mix this tag with the tag to get mixed colors on outlined text! + $this->buffer_on = true; + if (isset($attr['COLOR'])) $this->outlineparam['COLOR'] = ConvertColor($attr['COLOR']); + else $this->outlineparam['COLOR'] = array('R'=>255,'G'=>255,'B'=>255); //white + $this->outlineparam['OLDWIDTH'] = $this->LineWidth; + if (isset($attr['WIDTH'])) + { + switch(strtoupper($attr['WIDTH'])) + { + case 'THIN': $this->outlineparam['WIDTH'] = 0.75*$this->LineWidth; break; + case 'MEDIUM': $this->outlineparam['WIDTH'] = $this->LineWidth; break; + case 'THICK': $this->outlineparam['WIDTH'] = 1.75*$this->LineWidth; break; + } + } + else $this->outlineparam['WIDTH'] = $this->LineWidth; //width == oldwidth + break; + case 'BDO': + if (isset($attr['DIR']) and (strtoupper($attr['DIR']) == 'RTL' )) $this->divrevert = true; + break; + case 'S': + case 'STRIKE': + case 'DEL': + $this->strike=true; + break; + case 'SUB': + $this->SUB=true; + break; + case 'SUP': + $this->SUP=true; + break; + case 'CENTER': + $this->buffer_on = true; + if ($this->tdbegin) $this->cell[$this->row][$this->col]['a'] = $align['center']; + else + { + $this->divalign = $align['center']; + if ($this->x != $this->lMargin) $this->Ln($this->lineheight); + } + break; + case 'ADDRESS': + $this->buffer_on = true; + $this->SetStyle('I',true); + if (!$this->tdbegin and $this->x != $this->lMargin) $this->Ln($this->lineheight); + break; + case 'TABLE': // TABLE-BEGIN + if ($this->x != $this->lMargin) $this->Ln($this->lineheight); + $this->tablestart = true; + $this->table['nc'] = $this->table['nr'] = 0; + if (isset($attr['REPEAT_HEADER']) and $attr['REPEAT_HEADER'] == true) $this->UseTableHeader(true); + if (isset($attr['WIDTH'])) $this->table['w'] = ConvertSize($attr['WIDTH'],$this->pgwidth); + if (isset($attr['HEIGHT'])) $this->table['h'] = ConvertSize($attr['HEIGHT'],$this->pgwidth); + if (isset($attr['ALIGN'])) $this->table['a'] = $align[strtolower($attr['ALIGN'])]; + if (isset($attr['BORDER'])) $this->table['border'] = $attr['BORDER']; + if (isset($attr['BGCOLOR'])) $this->table['bgcolor'][-1] = $attr['BGCOLOR']; + break; + case 'TR': + $this->row++; + $this->table['nr']++; + $this->col = -1; + if (isset($attr['BGCOLOR']))$this->table['bgcolor'][$this->row] = $attr['BGCOLOR']; + break; + case 'TH': + $this->SetStyle('B',true); + if (!isset($attr['ALIGN'])) $attr['ALIGN'] = "center"; + case 'TD': + $this->tdbegin = true; + $this->col++; + while (isset($this->cell[$this->row][$this->col])) $this->col++; + //Update number column + if ($this->table['nc'] < $this->col+1) $this->table['nc'] = $this->col+1; + $this->cell[$this->row][$this->col] = array(); + $this->cell[$this->row][$this->col]['text'] = array(); + $this->cell[$this->row][$this->col]['s'] = 3; + if (isset($attr['WIDTH'])) $this->cell[$this->row][$this->col]['w'] = ConvertSize($attr['WIDTH'],$this->pgwidth); + if (isset($attr['HEIGHT'])) $this->cell[$this->row][$this->col]['h'] = ConvertSize($attr['HEIGHT'],$this->pgwidth); + if (isset($attr['ALIGN'])) $this->cell[$this->row][$this->col]['a'] = $align[strtolower($attr['ALIGN'])]; + if (isset($attr['VALIGN'])) $this->cell[$this->row][$this->col]['va'] = $align[strtolower($attr['VALIGN'])]; + if (isset($attr['BORDER'])) $this->cell[$this->row][$this->col]['border'] = $attr['BORDER']; + if (isset($attr['BGCOLOR'])) $this->cell[$this->row][$this->col]['bgcolor'] = $attr['BGCOLOR']; + $cs = $rs = 1; + if (isset($attr['COLSPAN']) && $attr['COLSPAN']>1) $cs = $this->cell[$this->row][$this->col]['colspan'] = $attr['COLSPAN']; + if (isset($attr['ROWSPAN']) && $attr['ROWSPAN']>1) $rs = $this->cell[$this->row][$this->col]['rowspan'] = $attr['ROWSPAN']; + //Chiem dung vi tri de danh cho cell span (¿mais hein?) + for ($k=$this->row ; $k < $this->row+$rs ;$k++) + for($l=$this->col; $l < $this->col+$cs ;$l++) + { + if ($k-$this->row || $l-$this->col) $this->cell[$k][$l] = 0; + } + if (isset($attr['NOWRAP'])) $this->cell[$this->row][$this->col]['nowrap']= 1; + break; + case 'OL': + if ( !isset($attr['TYPE']) or $attr['TYPE'] == '' ) $this->listtype = '1'; //OL default == '1' + else $this->listtype = $attr['TYPE']; // ol and ul types are mixed here + case 'UL': + if ( (!isset($attr['TYPE']) or $attr['TYPE'] == '') and $tag=='UL') + { + //Insert UL defaults + if ($this->listlvl == 0) $this->listtype = 'disc'; + elseif ($this->listlvl == 1) $this->listtype = 'circle'; + else $this->listtype = 'square'; + } + elseif (isset($attr['TYPE']) and $tag=='UL') $this->listtype = $attr['TYPE']; + $this->buffer_on = false; + if ($this->listlvl == 0) + { + //First of all, skip a line + if (!$this->pjustfinished) + { + if ($this->x != $this->lMargin) $this->Ln($this->lineheight); + $this->Ln($this->lineheight); + } + $this->oldx = $this->x; + $this->listlvl++; // first depth level + $this->listnum = 0; // reset + $this->listoccur[$this->listlvl] = 1; + $this->listlist[$this->listlvl][1] = array('TYPE'=>$this->listtype,'MAXNUM'=>$this->listnum); + } + else + { + if (!empty($this->textbuffer)) + { + $this->listitem[] = array($this->listlvl,$this->listnum,$this->textbuffer,$this->listoccur[$this->listlvl]); + $this->listnum++; + } + $this->textbuffer = array(); + $occur = $this->listoccur[$this->listlvl]; + $this->listlist[$this->listlvl][$occur]['MAXNUM'] = $this->listnum; //save previous lvl's maxnum + $this->listlvl++; + $this->listnum = 0; // reset + + if ($this->listoccur[$this->listlvl] == 0) $this->listoccur[$this->listlvl] = 1; + else $this->listoccur[$this->listlvl]++; + $occur = $this->listoccur[$this->listlvl]; + $this->listlist[$this->listlvl][$occur] = array('TYPE'=>$this->listtype,'MAXNUM'=>$this->listnum); + } + break; + case 'LI': + //Observation: is ignored + if ($this->listlvl == 0) //in case of malformed HTML code. Example:(...)

  • Content
  • Paragraph1

    (...) + { + //First of all, skip a line + if (!$this->pjustfinished and $this->x != $this->lMargin) $this->Ln(2*$this->lineheight); + $this->oldx = $this->x; + $this->listlvl++; // first depth level + $this->listnum = 0; // reset + $this->listoccur[$this->listlvl] = 1; + $this->listlist[$this->listlvl][1] = array('TYPE'=>'disc','MAXNUM'=>$this->listnum); + } + if ($this->listnum == 0) + { + $this->buffer_on = true; //activate list 'bufferization' + $this->listnum++; + $this->textbuffer = array(); + } + else + { + $this->buffer_on = true; //activate list 'bufferization' + if (!empty($this->textbuffer)) + { + $this->listitem[] = array($this->listlvl,$this->listnum,$this->textbuffer,$this->listoccur[$this->listlvl]); + $this->listnum++; + } + $this->textbuffer = array(); + } + break; + case 'H1': // 2 * fontsize + case 'H2': // 1.5 * fontsize + case 'H3': // 1.17 * fontsize + case 'H4': // 1 * fontsize + case 'H5': // 0.83 * fontsize + case 'H6': // 0.67 * fontsize + //Values obtained from: http://www.w3.org/TR/REC-CSS2/sample.html + if(isset($attr['ALIGN'])) $this->divalign = $align[strtolower($attr['ALIGN'])]; + $this->buffer_on = true; + if ($this->x != $this->lMargin) $this->Ln(2*$this->lineheight); + elseif (!$this->pjustfinished) $this->Ln($this->lineheight); + $this->SetStyle('B',true); + switch($tag) + { + case 'H1': + $this->SetFontSize(2*$this->FontSizePt); + $this->lineheight *= 2; + break; + case 'H2': + $this->SetFontSize(1.5*$this->FontSizePt); + $this->lineheight *= 1.5; + break; + case 'H3': + $this->SetFontSize(1.17*$this->FontSizePt); + $this->lineheight *= 1.17; + break; + case 'H4': + $this->SetFontSize($this->FontSizePt); + break; + case 'H5': + $this->SetFontSize(0.83*$this->FontSizePt); + $this->lineheight *= 0.83; + break; + case 'H6': + $this->SetFontSize(0.67*$this->FontSizePt); + $this->lineheight *= 0.67; + break; + } + break; + case 'HR': //Default values: width=100% align=center color=gray + //Skip a line, if needed + if ($this->x != $this->lMargin) $this->Ln($this->lineheight); + $this->Ln(0.2*$this->lineheight); + $hrwidth = $this->pgwidth; + $hralign = 'C'; + $hrcolor = array('R'=>200,'G'=>200,'B'=>200); + if($attr['WIDTH'] != '') $hrwidth = ConvertSize($attr['WIDTH'],$this->pgwidth); + if($attr['ALIGN'] != '') $hralign = $align[strtolower($attr['ALIGN'])]; + if($attr['COLOR'] != '') $hrcolor = ConvertColor($attr['COLOR']); + $this->SetDrawColor($hrcolor['R'],$hrcolor['G'],$hrcolor['B']); + $x = $this->x; + $y = $this->y; + switch($hralign) + { + case 'L': + case 'J': + break; + case 'C': + $empty = $this->pgwidth - $hrwidth; + $empty /= 2; + $x += $empty; + break; + case 'R': + $empty = $this->pgwidth - $hrwidth; + $x += $empty; + break; + } + $oldlinewidth = $this->LineWidth; + $this->SetLineWidth(0.3); + $this->Line($x,$y,$x+$hrwidth,$y); + $this->SetLineWidth($oldlinewidth); + $this->Ln(0.2*$this->lineheight); + $this->SetDrawColor(0); + $this->blockjustfinished = true; //Eliminate exceeding left-side spaces + break; + case 'INS': + $this->SetStyle('U',true); + break; + case 'SMALL': + $newsize = $this->FontSizePt - 1; + $this->SetFontSize($newsize); + break; + case 'BIG': + $newsize = $this->FontSizePt + 1; + $this->SetFontSize($newsize); + case 'STRONG': + $this->SetStyle('B',true); + break; + case 'CITE': + case 'EM': + $this->SetStyle('I',true); + break; + case 'TITLE': + $this->titulo = true; + break; + case 'B': + case 'I': + case 'U': + if( isset($attr['CLASS']) or isset($attr['ID']) or isset($attr['STYLE']) ) + { + $this->cssbegin=true; + if (isset($attr['CLASS'])) $properties = $this->CSS[$attr['CLASS']]; + elseif (isset($attr['ID'])) $properties = $this->CSS[$attr['ID']]; + //Read Inline CSS + if (isset($attr['STYLE'])) $properties = $this->readInlineCSS($attr['STYLE']); + //Look for name in the $this->CSS array + $this->backupcss = $properties; + if (!empty($properties)) $this->setCSS($properties); //name found in the CSS array! + } + $this->SetStyle($tag,true); + break; + case 'A': + if (isset($attr['NAME']) and $attr['NAME'] != '') $this->textbuffer[] = array('','','',array(),'',false,false,$attr['NAME']); //an internal link (adds a space for recognition) + if (isset($attr['HREF'])) $this->HREF=$attr['HREF']; + break; + case 'DIV': + //in case of malformed HTML code. Example:(...)
  • Content
  • DIV1
    (...) + if ($this->listlvl > 0) // We are closing (omitted) OL/UL tag(s) + { + $this->buffer_on = false; + if (!empty($this->textbuffer)) $this->listitem[] = array($this->listlvl,$this->listnum,$this->textbuffer,$this->listoccur[$this->listlvl]); + $this->textbuffer = array(); + $this->listlvl--; + $this->printlistbuffer(); + $this->pjustfinished = true; //act as if a paragraph just ended + } + $this->divbegin=true; + if ($this->x != $this->lMargin) $this->Ln($this->lineheight); + if( isset($attr['ALIGN']) and $attr['ALIGN'] != '' ) $this->divalign = $align[strtolower($attr['ALIGN'])]; + if( isset($attr['CLASS']) or isset($attr['ID']) or isset($attr['STYLE']) ) + { + $this->cssbegin=true; + if (isset($attr['CLASS'])) $properties = $this->CSS[$attr['CLASS']]; + elseif (isset($attr['ID'])) $properties = $this->CSS[$attr['ID']]; + //Read Inline CSS + if (isset($attr['STYLE'])) $properties = $this->readInlineCSS($attr['STYLE']); + //Look for name in the $this->CSS array + if (!empty($properties)) $this->setCSS($properties); //name found in the CSS array! + } + break; + case 'IMG': + if(!empty($this->textbuffer) and !$this->tablestart) + { + //Output previously buffered content and output image below + //Set some default values + $olddivwidth = $this->divwidth; + $olddivheight = $this->divheight; + if ( $this->divwidth == 0) $this->divwidth = $this->pgwidth - $x + $this->lMargin; + if ( $this->divheight == 0) $this->divheight = $this->lineheight; + //Print content + $this->printbuffer($this->textbuffer,true/*is out of a block (e.g. DIV,P etc.)*/); + $this->textbuffer=array(); + //Reset values + $this->divwidth = $olddivwidth; + $this->divheight = $olddivheight; + $this->textbuffer=array(); + $this->Ln($this->lineheight); + } + if(isset($attr['SRC'])) + { + $srcpath = $attr['SRC']; + if(!isset($attr['WIDTH'])) $attr['WIDTH'] = 0; + else $attr['WIDTH'] = ConvertSize($attr['WIDTH'],$this->pgwidth);//$attr['WIDTH'] /= 4; + if(!isset($attr['HEIGHT'])) $attr['HEIGHT'] = 0; + else $attr['HEIGHT'] = ConvertSize($attr['HEIGHT'],$this->pgwidth);//$attr['HEIGHT'] /= 4; + if ($this->tdbegin) + { + $bak_x = $this->x; + $bak_y = $this->y; + //Check whether image exists locally or on the URL + $f_exists = @fopen($srcpath,"rb"); + if (!$f_exists) //Show 'image not found' icon instead + { + if(!$this->shownoimg) break; + $srcpath = str_replace("\\","/",dirname(__FILE__)) . "/"; + $srcpath .= 'no_img.gif'; + } + $sizesarray = $this->Image($srcpath, $this->GetX(), $this->GetY(), $attr['WIDTH'], $attr['HEIGHT'],'','',false); + $this->y = $bak_y; + $this->x = $bak_x; + } + elseif($this->pbegin or $this->divbegin) + { + //In order to support
    + $ypos = 0; + $bak_x = $this->x; + $bak_y = $this->y; + //Check whether image exists locally or on the URL + $f_exists = @fopen($srcpath,"rb"); + if (!$f_exists) //Show 'image not found' icon instead + { + if(!$this->shownoimg) break; + $srcpath = str_replace("\\","/",dirname(__FILE__)) . "/"; + $srcpath .= 'no_img.gif'; + } + $sizesarray = $this->Image($srcpath, $this->GetX(), $this->GetY(), $attr['WIDTH'], $attr['HEIGHT'],'','',false); + $this->y = $bak_y; + $this->x = $bak_x; + $xpos = ''; + switch($this->divalign) + { + case "C": + $spacesize = $this->CurrentFont[ 'cw' ][ ' ' ] * ( $this->FontSizePt / 1000 ); + $empty = ($this->pgwidth - $sizesarray['WIDTH'])/2; + $xpos = 'xpos='.$empty.','; + break; + case "R": + $spacesize = $this->CurrentFont[ 'cw' ][ ' ' ] * ( $this->FontSizePt / 1000 ); + $empty = ($this->pgwidth - $sizesarray['WIDTH']); + $xpos = 'xpos='.$empty.','; + break; + default: break; + } + $numberoflines = (integer)ceil($sizesarray['HEIGHT']/$this->lineheight) ; + $ypos = $numberoflines * $this->lineheight; + $this->textbuffer[] = array("»¤¬"/*identifier*/."type=image,ypos=$ypos,{$xpos}width=".$sizesarray['WIDTH'].",height=".$sizesarray['HEIGHT']."»¤¬".$sizesarray['OUTPUT']); + while($numberoflines) {$this->textbuffer[] = array("\n",$this->HREF,$this->currentstyle,$this->colorarray,$this->currentfont,$this->SUP,$this->SUB,''/*internal link*/,$this->strike,$this->outlineparam,$this->bgcolorarray);$numberoflines--;} + } + else + { + $imgborder = 0; + if (isset($attr['BORDER'])) $imgborder = ConvertSize($attr['BORDER'],$this->pgwidth); + //Check whether image exists locally or on the URL + $f_exists = @fopen($srcpath,"rb"); + if (!$f_exists) //Show 'image not found' icon instead + { + $srcpath = str_replace("\\","/",dirname(__FILE__)) . "/"; + $srcpath .= 'no_img.gif'; + } + $sizesarray = $this->Image($srcpath, $this->GetX(), $this->GetY(), $attr['WIDTH'], $attr['HEIGHT'],'',$this->HREF); //Output Image + $ini_x = $sizesarray['X']; + $ini_y = $sizesarray['Y']; + if ($imgborder) + { + $oldlinewidth = $this->LineWidth; + $this->SetLineWidth($imgborder); + $this->Rect($ini_x,$ini_y,$sizesarray['WIDTH'],$sizesarray['HEIGHT']); + $this->SetLineWidth($oldlinewidth); + } + } + if ($sizesarray['X'] < $this->x) $this->x = $this->lMargin; + if ($this->tablestart) + { + $this->cell[$this->row][$this->col]['textbuffer'][] = array("»¤¬"/*identifier*/."type=image,width=".$sizesarray['WIDTH'].",height=".$sizesarray['HEIGHT']."»¤¬".$sizesarray['OUTPUT']); + $this->cell[$this->row][$this->col]['s'] += $sizesarray['WIDTH'] + 1;// +1 == margin + $this->cell[$this->row][$this->col]['form'] = true; // in order to make some width adjustments later + if (!isset($this->cell[$this->row][$this->col]['w'])) $this->cell[$this->row][$this->col]['w'] = $sizesarray['WIDTH'] + 3; + if (!isset($this->cell[$this->row][$this->col]['h'])) $this->cell[$this->row][$this->col]['h'] = $sizesarray['HEIGHT'] + 3; + } + } + break; + case 'BLOCKQUOTE': + case 'BR': + if($this->tablestart) + { + $this->cell[$this->row][$this->col]['textbuffer'][] = array("\n",$this->HREF,$this->currentstyle,$this->colorarray,$this->currentfont,$this->SUP,$this->SUB,''/*internal link*/,$this->strike,$this->outlineparam,$this->bgcolorarray); + $this->cell[$this->row][$this->col]['text'][] = "\n"; + if (!isset($this->cell[$this->row][$this->col]['maxs'])) $this->cell[$this->row][$this->col]['maxs'] = $this->cell[$this->row][$this->col]['s'] +2; //+2 == margin + elseif($this->cell[$this->row][$this->col]['maxs'] < $this->cell[$this->row][$this->col]['s']) $this->cell[$this->row][$this->col]['maxs'] = $this->cell[$this->row][$this->col]['s']+2;//+2 == margin + $this->cell[$this->row][$this->col]['s'] = 0;// reset + } + elseif($this->divbegin or $this->pbegin or $this->buffer_on) $this->textbuffer[] = array("\n",$this->HREF,$this->currentstyle,$this->colorarray,$this->currentfont,$this->SUP,$this->SUB,''/*internal link*/,$this->strike,$this->outlineparam,$this->bgcolorarray); + else {$this->Ln($this->lineheight);$this->blockjustfinished = true;} + break; + case 'P': + //in case of malformed HTML code. Example:(...)

  • Content
  • Paragraph1

    (...) + if ($this->listlvl > 0) // We are closing (omitted) OL/UL tag(s) + { + $this->buffer_on = false; + if (!empty($this->textbuffer)) $this->listitem[] = array($this->listlvl,$this->listnum,$this->textbuffer,$this->listoccur[$this->listlvl]); + $this->textbuffer = array(); + $this->listlvl--; + $this->printlistbuffer(); + $this->pjustfinished = true; //act as if a paragraph just ended + } + if ($this->tablestart) + { + $this->cell[$this->row][$this->col]['textbuffer'][] = array($e,$this->HREF,$this->currentstyle,$this->colorarray,$this->currentfont,$this->SUP,$this->SUB,''/*internal link*/,$this->strike,$this->outlineparam,$this->bgcolorarray); + $this->cell[$this->row][$this->col]['text'][] = "\n"; + break; + } + $this->pbegin=true; + if ($this->x != $this->lMargin) $this->Ln(2*$this->lineheight); + elseif (!$this->pjustfinished) $this->Ln($this->lineheight); + //Save x,y coords in case we need to print borders... + $this->oldx = $this->x; + $this->oldy = $this->y; + if(isset($attr['ALIGN'])) $this->divalign = $align[strtolower($attr['ALIGN'])]; + if(isset($attr['CLASS']) or isset($attr['ID']) or isset($attr['STYLE']) ) + { + $this->cssbegin=true; + if (isset($attr['CLASS'])) $properties = $this->CSS[$attr['CLASS']]; + elseif (isset($attr['ID'])) $properties = $this->CSS[$attr['ID']]; + //Read Inline CSS + if (isset($attr['STYLE'])) $properties = $this->readInlineCSS($attr['STYLE']); + //Look for name in the $this->CSS array + $this->backupcss = $properties; + if (!empty($properties)) $this->setCSS($properties); //name(id/class/style) found in the CSS array! + } + break; + case 'SPAN': + $this->buffer_on = true; + //Save x,y coords in case we need to print borders... + $this->oldx = $this->x; + $this->oldy = $this->y; + if( isset($attr['CLASS']) or isset($attr['ID']) or isset($attr['STYLE']) ) + { + $this->cssbegin=true; + if (isset($attr['CLASS'])) $properties = $this->CSS[$attr['CLASS']]; + elseif (isset($attr['ID'])) $properties = $this->CSS[$attr['ID']]; + //Read Inline CSS + if (isset($attr['STYLE'])) $properties = $this->readInlineCSS($attr['STYLE']); + //Look for name in the $this->CSS array + $this->backupcss = $properties; + if (!empty($properties)) $this->setCSS($properties); //name found in the CSS array! + } + break; + case 'PRE': + if($this->tablestart) + { + $this->cell[$this->row][$this->col]['textbuffer'][] = array("\n",$this->HREF,$this->currentstyle,$this->colorarray,$this->currentfont,$this->SUP,$this->SUB,''/*internal link*/,$this->strike,$this->outlineparam,$this->bgcolorarray); + $this->cell[$this->row][$this->col]['text'][] = "\n"; + } + elseif($this->divbegin or $this->pbegin or $this->buffer_on) $this->textbuffer[] = array("\n",$this->HREF,$this->currentstyle,$this->colorarray,$this->currentfont,$this->SUP,$this->SUB,''/*internal link*/,$this->strike,$this->outlineparam,$this->bgcolorarray); + else + { + if ($this->x != $this->lMargin) $this->Ln(2*$this->lineheight); + elseif (!$this->pjustfinished) $this->Ln($this->lineheight); + $this->buffer_on = true; + //Save x,y coords in case we need to print borders... + $this->oldx = $this->x; + $this->oldy = $this->y; + if(isset($attr['ALIGN'])) $this->divalign = $align[strtolower($attr['ALIGN'])]; + if(isset($attr['CLASS']) or isset($attr['ID']) or isset($attr['STYLE']) ) + { + $this->cssbegin=true; + if (isset($attr['CLASS'])) $properties = $this->CSS[$attr['CLASS']]; + elseif (isset($attr['ID'])) $properties = $this->CSS[$attr['ID']]; + //Read Inline CSS + if (isset($attr['STYLE'])) $properties = $this->readInlineCSS($attr['STYLE']); + //Look for name in the $this->CSS array + $this->backupcss = $properties; + if (!empty($properties)) $this->setCSS($properties); //name(id/class/style) found in the CSS array! + } + } + case 'TT': + case 'KBD': + case 'SAMP': + case 'CODE': + $this->SetFont('courier'); + $this->currentfont='courier'; + break; + case 'TEXTAREA': + $this->buffer_on = true; + $colsize = 20; //HTML default value + $rowsize = 2; //HTML default value + if (isset($attr['COLS'])) $colsize = $attr['COLS']; + if (isset($attr['ROWS'])) $rowsize = $attr['ROWS']; + if (!$this->tablestart) + { + if ($this->x != $this->lMargin) $this->Ln($this->lineheight); + $this->col = $colsize; + $this->row = $rowsize; + } + else //it is inside a table + { + $this->specialcontent = "type=textarea,lines=$rowsize,width=".((2.2*$colsize) + 3); //Activate form info in order to paint FORM elements within table + $this->cell[$this->row][$this->col]['s'] += (2.2*$colsize) + 6;// +6 == margin + if (!isset($this->cell[$this->row][$this->col]['h'])) $this->cell[$this->row][$this->col]['h'] = 1.1*$this->lineheight*$rowsize + 2.5; + } + break; + case 'SELECT': + $this->specialcontent = "type=select"; //Activate form info in order to paint FORM elements within table + break; + case 'OPTION': + $this->selectoption['ACTIVE'] = true; + if (empty($this->selectoption)) + { + $this->selectoption['MAXWIDTH'] = ''; + $this->selectoption['SELECTED'] = ''; + } + if (isset($attr['SELECTED'])) $this->selectoption['SELECTED'] = ''; + break; + case 'FORM': + if($this->tablestart) + { + $this->cell[$this->row][$this->col]['textbuffer'][] = array($e,$this->HREF,$this->currentstyle,$this->colorarray,$this->currentfont,$this->SUP,$this->SUB,''/*internal link*/,$this->strike,$this->outlineparam,$this->bgcolorarray); + $this->cell[$this->row][$this->col]['text'][] = "\n"; + } + elseif ($this->x != $this->lMargin) $this->Ln($this->lineheight); //Skip a line, if needed + break; + case 'INPUT': + if (!isset($attr['TYPE'])) $attr['TYPE'] == ''; //in order to allow default 'TEXT' form (in case of malformed HTML code) + if (!$this->tablestart) + { + switch(strtoupper($attr['TYPE'])){ + case 'CHECKBOX': //Draw Checkbox + $checked = false; + if (isset($attr['CHECKED'])) $checked = true; + $this->SetFillColor(235,235,235); + $this->x += 3; + $this->Rect($this->x,$this->y+1,3,3,'DF'); + if ($checked) + { + $this->Line($this->x,$this->y+1,$this->x+3,$this->y+1+3); + $this->Line($this->x,$this->y+1+3,$this->x+3,$this->y+1); + } + $this->SetFillColor(255); + $this->x += 3.5; + break; + case 'RADIO': //Draw Radio button + $checked = false; + if (isset($attr['CHECKED'])) $checked = true; + $this->x += 4; + $this->Circle($this->x,$this->y+2.2,1,'D'); + $this->_out('0.000 g'); + if ($checked) $this->Circle($this->x,$this->y+2.2,0.4,'DF'); + $this->Write(5,$texto,$this->x); + $this->x += 2; + break; + case 'BUTTON': // Draw a button + case 'SUBMIT': + case 'RESET': + $texto=''; + if (isset($attr['VALUE'])) $texto = $attr['VALUE']; + $nihil = 2.5; + $this->x += 2; + $this->SetFillColor(190,190,190); + $this->Rect($this->x,$this->y,$this->GetStringWidth($texto)+2*$nihil,4.5,'DF'); // 4.5 in order to avoid overlapping + $this->x += $nihil; + $this->Write(5,$texto,$this->x); + $this->x += $nihil; + $this->SetFillColor(255); + break; + case 'PASSWORD': + if (isset($attr['VALUE'])) + { + $num_stars = strlen($attr['VALUE']); + $attr['VALUE'] = str_repeat('*',$num_stars); + } + case 'TEXT': //Draw TextField + default: //default == TEXT + $texto=''; + if (isset($attr['VALUE'])) $texto = $attr['VALUE']; + $tamanho = 20; + if (isset($attr['SIZE']) and ctype_digit($attr['SIZE']) ) $tamanho = $attr['SIZE']; + $this->SetFillColor(235,235,235); + $this->x += 2; + $this->Rect($this->x,$this->y,2*$tamanho,4.5,'DF');// 4.5 in order to avoid overlapping + if ($texto != '') + { + $this->x += 1; + $this->Write(5,$texto,$this->x); + $this->x -= $this->GetStringWidth($texto); + } + $this->SetFillColor(255); + $this->x += 2*$tamanho; + break; + } + } + else //we are inside a table + { + $this->cell[$this->row][$this->col]['form'] = true; // in order to make some width adjustments later + $type = ''; + $text = ''; + $height = 0; + $width = 0; + switch(strtoupper($attr['TYPE'])){ + case 'CHECKBOX': //Draw Checkbox + $checked = false; + if (isset($attr['CHECKED'])) $checked = true; + $text = $checked; + $type = 'CHECKBOX'; + $width = 4; + $this->cell[$this->row][$this->col]['textbuffer'][] = array("»¤¬"/*identifier*/."type=input,subtype=$type,width=$width,height=$height"."»¤¬".$text); + $this->cell[$this->row][$this->col]['s'] += $width; + if (!isset($this->cell[$this->row][$this->col]['h'])) $this->cell[$this->row][$this->col]['h'] = $this->lineheight; + break; + case 'RADIO': //Draw Radio button + $checked = false; + if (isset($attr['CHECKED'])) $checked = true; + $text = $checked; + $type = 'RADIO'; + $width = 3; + $this->cell[$this->row][$this->col]['textbuffer'][] = array("»¤¬"/*identifier*/."type=input,subtype=$type,width=$width,height=$height"."»¤¬".$text); + $this->cell[$this->row][$this->col]['s'] += $width; + if (!isset($this->cell[$this->row][$this->col]['h'])) $this->cell[$this->row][$this->col]['h'] = $this->lineheight; + break; + case 'BUTTON': $type = 'BUTTON'; // Draw a button + case 'SUBMIT': if ($type == '') $type = 'SUBMIT'; + case 'RESET': if ($type == '') $type = 'RESET'; + $texto=''; + if (isset($attr['VALUE'])) $texto = " " . $attr['VALUE'] . " "; + $text = $texto; + $width = $this->GetStringWidth($texto)+3; + $this->cell[$this->row][$this->col]['textbuffer'][] = array("»¤¬"/*identifier*/."type=input,subtype=$type,width=$width,height=$height"."»¤¬".$text); + $this->cell[$this->row][$this->col]['s'] += $width; + if (!isset($this->cell[$this->row][$this->col]['h'])) $this->cell[$this->row][$this->col]['h'] = $this->lineheight + 2; + break; + case 'PASSWORD': + if (isset($attr['VALUE'])) + { + $num_stars = strlen($attr['VALUE']); + $attr['VALUE'] = str_repeat('*',$num_stars); + } + $type = 'PASSWORD'; + case 'TEXT': //Draw TextField + default: //default == TEXT + $texto=''; + if (isset($attr['VALUE'])) $texto = $attr['VALUE']; + $tamanho = 20; + if (isset($attr['SIZE']) and ctype_digit($attr['SIZE']) ) $tamanho = $attr['SIZE']; + $text = $texto; + $width = 2*$tamanho; + if ($type == '') $type = 'TEXT'; + $this->cell[$this->row][$this->col]['textbuffer'][] = array("»¤¬"/*identifier*/."type=input,subtype=$type,width=$width,height=$height"."»¤¬".$text); + $this->cell[$this->row][$this->col]['s'] += $width; + if (!isset($this->cell[$this->row][$this->col]['h'])) $this->cell[$this->row][$this->col]['h'] = $this->lineheight + 2; + break; + } + } + break; + case 'FONT': +//Font size is ignored for now + if (isset($attr['COLOR']) and $attr['COLOR']!='') + { + $cor = ConvertColor($attr['COLOR']); + //If something goes wrong switch color to black + $cor['R'] = (isset($cor['R'])?$cor['R']:0); + $cor['G'] = (isset($cor['G'])?$cor['G']:0); + $cor['B'] = (isset($cor['B'])?$cor['B']:0); + $this->colorarray = $cor; + $this->SetTextColor($cor['R'],$cor['G'],$cor['B']); + $this->issetcolor = true; + } + if (isset($attr['FACE']) and in_array(strtolower($attr['FACE']), $this->fontlist)) + { + $this->SetFont(strtolower($attr['FACE'])); + $this->issetfont=true; + } + //'If' disabled in this version due lack of testing (you may enable it if you want) +// if (isset($attr['FACE']) and in_array(strtolower($attr['FACE']), $this->fontlist) and isset($attr['SIZE']) and $attr['SIZE']!='') { +// $this->SetFont(strtolower($attr['FACE']),'',$attr['SIZE']); +// $this->issetfont=true; +// } + break; + }//end of switch + $this->pjustfinished=false; +} + +function CloseTag($tag) +{ +//! @return void + //Closing tag + if($tag=='OPTION') $this->selectoption['ACTIVE'] = false; + if($tag=='BDO') $this->divrevert = false; + if($tag=='INS') $tag='U'; + if($tag=='STRONG') $tag='B'; + if($tag=='EM' or $tag=='CITE') $tag='I'; + if($tag=='OUTLINE') + { + if(!$this->pbegin and !$this->divbegin and !$this->tablestart) + { + //Deactivate $this->outlineparam for its info is already stored inside $this->textbuffer + //if (isset($this->outlineparam['OLDWIDTH'])) $this->SetTextOutline($this->outlineparam['OLDWIDTH']); + $this->SetTextOutline(false); + $this->outlineparam=array(); + //Save x,y coords ??? + $x = $this->x; + $y = $this->y; + //Set some default values + $this->divwidth = $this->pgwidth - $x + $this->lMargin; + //Print content + $this->printbuffer($this->textbuffer,true/*is out of a block (e.g. DIV,P etc.)*/); + $this->textbuffer=array(); + //Reset values + $this->Reset(); + $this->buffer_on=false; + } + $this->SetTextOutline(false); + $this->outlineparam=array(); + } + if($tag=='A') + { + if(!$this->pbegin and !$this->divbegin and !$this->tablestart and !$this->buffer_on) + { + //Deactivate $this->HREF for its info is already stored inside $this->textbuffer + $this->HREF=''; + //Save x,y coords ??? + $x = $this->x; + $y = $this->y; + //Set some default values + $this->divwidth = $this->pgwidth - $x + $this->lMargin; + //Print content + $this->printbuffer($this->textbuffer,true/*is out of a block (e.g. DIV,P etc.)*/); + $this->textbuffer=array(); + //Reset values + $this->Reset(); + } + $this->HREF=''; + } + if($tag=='TH') $this->SetStyle('B',false); + if($tag=='TH' or $tag=='TD') $this->tdbegin = false; + if($tag=='SPAN') + { + if(!$this->pbegin and !$this->divbegin and !$this->tablestart) + { + if($this->cssbegin) + { + //Check if we have borders to print + if ($this->cssbegin and ($this->divborder or $this->dash_on or $this->dotted_on or $this->divbgcolor)) + { + $texto=''; + foreach($this->textbuffer as $vetor) $texto.=$vetor[0]; + $tempx = $this->x; + if($this->divbgcolor) $this->Cell($this->GetStringWidth($texto),$this->lineheight,'',$this->divborder,'','L',$this->divbgcolor); + if ($this->dash_on) $this->Rect($this->oldx,$this->oldy,$this->GetStringWidth($texto),$this->lineheight); + if ($this->dotted_on) $this->DottedRect($this->x - $this->GetStringWidth($texto),$this->y,$this->GetStringWidth($texto),$this->lineheight); + $this->x = $tempx; + $this->x -= 1; //adjust alignment + } + $this->cssbegin=false; + $this->backupcss=array(); + } + //Save x,y coords ??? + $x = $this->x; + $y = $this->y; + //Set some default values + $this->divwidth = $this->pgwidth - $x + $this->lMargin; + //Print content + $this->printbuffer($this->textbuffer,true/*is out of a block (e.g. DIV,P etc.)*/); + $this->textbuffer=array(); + //Reset values + $this->Reset(); + } + $this->buffer_on=false; + } + if($tag=='P' or $tag=='DIV') //CSS in BLOCK mode + { + $this->blockjustfinished = true; //Eliminate exceeding left-side spaces + if(!$this->tablestart) + { + if ($this->divwidth == 0) $this->divwidth = $this->pgwidth; + if ($tag=='P') + { + $this->pbegin=false; + $this->pjustfinished=true; + } + else $this->divbegin=false; + $content=''; + foreach($this->textbuffer as $aux) $content .= $aux[0]; + $numlines = $this->WordWrap($content,$this->divwidth); + if ($this->divheight == 0) $this->divheight = $numlines * 5; + //Print content + $this->printbuffer($this->textbuffer); + $this->textbuffer=array(); + if ($tag=='P') $this->Ln($this->lineheight); + }//end of 'if (!this->tablestart)' + //Reset values + $this->Reset(); + $this->cssbegin=false; + $this->backupcss=array(); + } + if($tag=='TABLE') { // TABLE-END + $this->blockjustfinished = true; //Eliminate exceeding left-side spaces + $this->table['cells'] = $this->cell; + $this->table['wc'] = array_pad(array(),$this->table['nc'],array('miw'=>0,'maw'=>0)); + $this->table['hr'] = array_pad(array(),$this->table['nr'],0); + $this->_tableColumnWidth($this->table); + $this->_tableWidth($this->table); + $this->_tableHeight($this->table); + + //Output table on PDF + $this->_tableWrite($this->table); + + //Reset values + $this->tablestart=false; //bool + $this->table=array(); //array + $this->cell=array(); //array + $this->col=-1; //int + $this->row=-1; //int + $this->Reset(); + $this->Ln(0.5*$this->lineheight); + } + if(($tag=='UL') or ($tag=='OL')) { + if ($this->buffer_on == false) $this->listnum--;//Adjust minor BUG (this happens when there are two together) + if ($this->listlvl == 1) // We are closing the last OL/UL tag + { + $this->blockjustfinished = true; //Eliminate exceeding left-side spaces + $this->buffer_on = false; + if (!empty($this->textbuffer)) $this->listitem[] = array($this->listlvl,$this->listnum,$this->textbuffer,$this->listoccur[$this->listlvl]); + $this->textbuffer = array(); + $this->listlvl--; + $this->printlistbuffer(); + } + else // returning one level + { + if (!empty($this->textbuffer)) $this->listitem[] = array($this->listlvl,$this->listnum,$this->textbuffer,$this->listoccur[$this->listlvl]); + $this->textbuffer = array(); + $occur = $this->listoccur[$this->listlvl]; + $this->listlist[$this->listlvl][$occur]['MAXNUM'] = $this->listnum; //save previous lvl's maxnum + $this->listlvl--; + $occur = $this->listoccur[$this->listlvl]; + $this->listnum = $this->listlist[$this->listlvl][$occur]['MAXNUM']; // recover previous level's number + $this->listtype = $this->listlist[$this->listlvl][$occur]['TYPE']; // recover previous level's type + $this->buffer_on = false; + } + } + if($tag=='H1' or $tag=='H2' or $tag=='H3' or $tag=='H4' or $tag=='H5' or $tag=='H6') + { + $this->blockjustfinished = true; //Eliminate exceeding left-side spaces + if(!$this->pbegin and !$this->divbegin and !$this->tablestart) + { + //These 2 codelines are useless? + $texto=''; + foreach($this->textbuffer as $vetor) $texto.=$vetor[0]; + //Save x,y coords ??? + $x = $this->x; + $y = $this->y; + //Set some default values + $this->divwidth = $this->pgwidth; + //Print content + $this->printbuffer($this->textbuffer); + $this->textbuffer=array(); + if ($this->x != $this->lMargin) $this->Ln($this->lineheight); + //Reset values + $this->Reset(); + } + $this->buffer_on=false; + $this->lineheight = 5; + $this->Ln($this->lineheight); + $this->SetFontSize(11); + $this->SetStyle('B',false); + } + if($tag=='TITLE') {$this->titulo=false; $this->blockjustfinished = true;} + if($tag=='FORM') $this->Ln($this->lineheight); + if($tag=='PRE') + { + if(!$this->pbegin and !$this->divbegin and !$this->tablestart) + { + if ($this->divwidth == 0) $this->divwidth = $this->pgwidth; + $content=''; + foreach($this->textbuffer as $aux) $content .= $aux[0]; + $numlines = $this->WordWrap($content,$this->divwidth); + if ($this->divheight == 0) $this->divheight = $numlines * 5; + //Print content + $this->textbuffer[0][0] = ltrim($this->textbuffer[0][0]); //Remove exceeding left-side space + $this->printbuffer($this->textbuffer); + $this->textbuffer=array(); + if ($this->x != $this->lMargin) $this->Ln($this->lineheight); + //Reset values + $this->Reset(); + $this->Ln(1.1*$this->lineheight); + } + if($this->tablestart) + { + $this->cell[$this->row][$this->col]['textbuffer'][] = array("\n",$this->HREF,$this->currentstyle,$this->colorarray,$this->currentfont,$this->SUP,$this->SUB,''/*internal link*/,$this->strike,$this->outlineparam,$this->bgcolorarray); + $this->cell[$this->row][$this->col]['text'][] = "\n"; + } + if($this->divbegin or $this->pbegin or $this->buffer_on) $this->textbuffer[] = array("\n",$this->HREF,$this->currentstyle,$this->colorarray,$this->currentfont,$this->SUP,$this->SUB,''/*internal link*/,$this->strike,$this->outlineparam,$this->bgcolorarray); + $this->cssbegin=false; + $this->backupcss=array(); + $this->buffer_on = false; + $this->blockjustfinished = true; //Eliminate exceeding left-side spaces + $this->pjustfinished = true; //behaves the same way + } + if($tag=='CODE' or $tag=='PRE' or $tag=='TT' or $tag=='KBD' or $tag=='SAMP') + { + $this->currentfont=''; + $this->SetFont('arial'); + } + if($tag=='B' or $tag=='I' or $tag=='U') + { + $this->SetStyle($tag,false); + if ($this->cssbegin and !$this->divbegin and !$this->pbegin and !$this->buffer_on) + { + //Reset values + $this->Reset(); + $this->cssbegin=false; + $this->backupcss=array(); + } + } + if($tag=='TEXTAREA') + { + if (!$this->tablestart) //not inside a table + { + //Draw arrows too? + $texto = ''; + foreach($this->textbuffer as $v) $texto .= $v[0]; + $this->SetFillColor(235,235,235); + $this->SetFont('courier'); + $this->x +=3; + $linesneeded = $this->WordWrap($texto,($this->col*2.2)+3); + if ( $linesneeded > $this->row ) //Too many words inside textarea + { + $textoaux = explode("\n",$texto); + $texto = ''; + for($i=0;$i < $this->row;$i++) + { + if ($i == $this->row-1) $texto .= $textoaux[$i]; + else $texto .= $textoaux[$i] . "\n"; + } + //Inform the user that some text has been truncated + $texto{strlen($texto)-1} = "."; + $texto{strlen($texto)-2} = "."; + $texto{strlen($texto)-3} = "."; + } + $backup_y = $this->y; + $this->Rect($this->x,$this->y,(2.2*$this->col)+6,5*$this->row,'DF'); + if ($texto != '') $this->MultiCell((2.2*$this->col)+6,$this->lineheight,$texto); + $this->y = $backup_y + $this->row*$this->lineheight; + $this->SetFont('arial'); + } + else //inside a table + { + $this->cell[$this->row][$this->col]['textbuffer'][] = $this->textbuffer[0]; + $this->cell[$this->row][$this->col]['text'][] = $this->textbuffer[0]; + $this->cell[$this->row][$this->col]['form'] = true; // in order to make some width adjustments later + $this->specialcontent = ''; + } + $this->SetFillColor(255); + $this->textbuffer=array(); + $this->buffer_on = false; + } + if($tag=='SELECT') + { + $texto = ''; + $tamanho = 0; + if (isset($this->selectoption['MAXWIDTH'])) $tamanho = $this->selectoption['MAXWIDTH']; + if ($this->tablestart) + { + $texto = "»¤¬".$this->specialcontent."»¤¬".$this->selectoption['SELECTED']; + $aux = explode("»¤¬",$texto); + $texto = $aux[2]; + $texto = "»¤¬".$aux[1].",width=$tamanho,height=".($this->lineheight + 2)."»¤¬".$texto; + $this->cell[$this->row][$this->col]['s'] += $tamanho + 7; // margin + arrow box + $this->cell[$this->row][$this->col]['form'] = true; // in order to make some width adjustments later + + if (!isset($this->cell[$this->row][$this->col]['h'])) $this->cell[$this->row][$this->col]['h'] = $this->lineheight + 2; + $this->cell[$this->row][$this->col]['textbuffer'][] = array($texto); + $this->cell[$this->row][$this->col]['text'][] = ''; + + } + else //not inside a table + { + $texto = $this->selectoption['SELECTED']; + $this->SetFillColor(235,235,235); + $this->x += 2; + $this->Rect($this->x,$this->y,$tamanho+2,5,'DF');//+2 margin + $this->x += 1; + if ($texto != '') $this->Write(5,$texto,$this->x); + $this->x += $tamanho - $this->GetStringWidth($texto) + 2; + $this->SetFillColor(190,190,190); + $this->Rect($this->x-1,$this->y,5,5,'DF'); //Arrow Box + $this->SetFont('zapfdingbats'); + $this->Write(5,chr(116),$this->x); //Down arrow + $this->SetFont('arial'); + $this->SetFillColor(255); + $this->x += 1; + } + $this->selectoption = array(); + $this->specialcontent = ''; + $this->textbuffer = array(); + } + if($tag=='SUB' or $tag=='SUP') //subscript or superscript + { + if(!$this->pbegin and !$this->divbegin and !$this->tablestart and !$this->buffer_on and !$this->strike) + { + //Deactivate $this->SUB/SUP for its info is already stored inside $this->textbuffer + $this->SUB=false; + $this->SUP=false; + //Save x,y coords ??? + $x = $this->x; + $y = $this->y; + //Set some default values + $this->divwidth = $this->pgwidth - $x + $this->lMargin; + //Print content + $this->printbuffer($this->textbuffer,true/*is out of a block (e.g. DIV,P etc.)*/); + $this->textbuffer=array(); + //Reset values + $this->Reset(); + } + $this->SUB=false; + $this->SUP=false; + } + if($tag=='S' or $tag=='STRIKE' or $tag=='DEL') + { + if(!$this->pbegin and !$this->divbegin and !$this->tablestart) + { + //Deactivate $this->strike for its info is already stored inside $this->textbuffer + $this->strike=false; + //Save x,y coords ??? + $x = $this->x; + $y = $this->y; + //Set some default values + $this->divwidth = $this->pgwidth - $x + $this->lMargin; + //Print content + $this->printbuffer($this->textbuffer,true/*is out of a block (e.g. DIV,P etc.)*/); + $this->textbuffer=array(); + //Reset values + $this->Reset(); + } + $this->strike=false; + } + if($tag=='ADDRESS' or $tag=='CENTER') //
    or
    tag + { + $this->blockjustfinished = true; //Eliminate exceeding left-side spaces + if(!$this->pbegin and !$this->divbegin and !$this->tablestart) + { + //Save x,y coords ??? + $x = $this->x; + $y = $this->y; + //Set some default values + $this->divwidth = $this->pgwidth - $x + $this->lMargin; + //Print content + $this->printbuffer($this->textbuffer); + $this->textbuffer=array(); + //Reset values + $this->Reset(); + } + $this->buffer_on=false; + if ($tag == 'ADDRESS') $this->SetStyle('I',false); + } + if($tag=='BIG') + { + $newsize = $this->FontSizePt - 1; + $this->SetFontSize($newsize); + $this->SetStyle('B',false); + } + if($tag=='SMALL') + { + $newsize = $this->FontSizePt + 1; + $this->SetFontSize($newsize); + } + if($tag=='FONT') + { + if ($this->issetcolor == true) + { + $this->colorarray = array(); + $this->SetTextColor(0); + $this->issetcolor = false; + } + if ($this->issetfont) + { + $this->SetFont('arial'); + $this->issetfont=false; + } + if ($this->cssbegin) + { + //Get some attributes back! + $this->setCSS($this->backupcss); + } + } +} + +function printlistbuffer() +{ +//! @return void +//! @desc Prints all list-related buffered info + + //Save x coordinate + $x = $this->oldx; + foreach($this->listitem as $item) + { + //Set default width & height values + $this->divwidth = $this->pgwidth; + $this->divheight = $this->lineheight; + //Get list's buffered data + $lvl = $item[0]; + $num = $item[1]; + $this->textbuffer = $item[2]; + $occur = $item[3]; + $type = $this->listlist[$lvl][$occur]['TYPE']; + $maxnum = $this->listlist[$lvl][$occur]['MAXNUM']; + switch($type) //Format type + { + case 'A': + $num = dec2alpha($num,true); + $maxnum = dec2alpha($maxnum,true); + $type = str_pad($num,strlen($maxnum),' ',STR_PAD_LEFT) . "."; + break; + case 'a': + $num = dec2alpha($num,false); + $maxnum = dec2alpha($maxnum,false); + $type = str_pad($num,strlen($maxnum),' ',STR_PAD_LEFT) . "."; + break; + case 'I': + $num = dec2roman($num,true); + $maxnum = dec2roman($maxnum,true); + $type = str_pad($num,strlen($maxnum),' ',STR_PAD_LEFT) . "."; + break; + case 'i': + $num = dec2roman($num,false); + $maxnum = dec2roman($maxnum,false); + $type = str_pad($num,strlen($maxnum),' ',STR_PAD_LEFT) . "."; + break; + case '1': + $type = str_pad($num,strlen($maxnum),' ',STR_PAD_LEFT) . "."; + break; + case 'disc': + $type = chr(149); + break; + case 'square': + $type = chr(110); //black square on Zapfdingbats font + break; + case 'circle': + $type = chr(186); + break; + default: break; + } + $this->x = (5*$lvl) + $x; //Indent list + //Get bullet width including margins + $oldsize = $this->FontSize * $this->k; + if ($type == chr(110)) $this->SetFont('zapfdingbats','',5); + $type .= ' '; + $blt_width = $this->GetStringWidth($type)+$this->cMargin*2; + //Output bullet + $this->Cell($blt_width,5,$type,'','','L'); + $this->SetFont('arial','',$oldsize); + $this->divwidth = $this->divwidth + $this->lMargin - $this->x; + //Print content + $this->printbuffer($this->textbuffer); + $this->textbuffer=array(); + } + //Reset all used values + $this->listoccur = array(); + $this->listitem = array(); + $this->listlist = array(); + $this->listlvl = 0; + $this->listnum = 0; + $this->listtype = ''; + $this->textbuffer = array(); + $this->divwidth = 0; + $this->divheight = 0; + $this->oldx = -1; + //At last, but not least, skip a line + $this->Ln($this->lineheight); +} + +function printbuffer($arrayaux,$outofblock=false,$is_table=false) +{ +//! @return headache +//! @desc Prepares buffered text to be printed with FlowingBlock() + + //Save some previous parameters + $save = array(); + $save['strike'] = $this->strike; + $save['SUP'] = $this->SUP; + $save['SUB'] = $this->SUB; + $save['DOTTED'] = $this->dotted_on; + $save['DASHED'] = $this->dash_on; + $this->SetDash(); //restore to no dash + $this->dash_on = false; + $this->dotted_on = false; + + $bak_y = $this->y; + $bak_x = $this->x; + $align = $this->divalign; + $oldpage = $this->page; + + //Overall object size == $old_height + //Line height == $this->divheight + $old_height = $this->divheight; + if ($is_table) + { + $this->divheight = 1.1*$this->lineheight; + $fill = 0; + } + else + { + $this->divheight = $this->lineheight; + if ($this->FillColor == '1.000 g') $fill = 0; //avoid useless background painting (1.000 g == white background color) + else $fill = 1; + } + + $this->newFlowingBlock( $this->divwidth,$this->divheight,$this->divborder,$align,$fill,$is_table); + + $array_size = count($arrayaux); + for($i=0;$i < $array_size; $i++) + { + $vetor = $arrayaux[$i]; + if ($i == 0 and $vetor[0] != "\n") $vetor[0] = ltrim($vetor[0]); + if (empty($vetor[0]) and empty($vetor[7])) continue; //Ignore empty text and not carrying an internal link + //Activating buffer properties + if(isset($vetor[10]) and !empty($vetor[10])) //Background color + { + $cor = $vetor[10]; + $this->SetFillColor($cor['R'],$cor['G'],$cor['B']); + $this->divbgcolor = true; + } + if(isset($vetor[9]) and !empty($vetor[9])) // Outline parameters + { + $cor = $vetor[9]['COLOR']; + $outlinewidth = $vetor[9]['WIDTH']; + $this->SetTextOutline($outlinewidth,$cor['R'],$cor['G'],$cor['B']); + $this->outline_on = true; + } + if(isset($vetor[8]) and $vetor[8] === true) // strike-through the text + { + $this->strike = true; + } + if(isset($vetor[7]) and $vetor[7] != '') // internal link: + { + $this->internallink[$vetor[7]] = array("Y"=>$this->y,"PAGE"=>$this->page ); + $this->Bookmark($vetor[7]." (pg. $this->page)",0,$this->y); + if (empty($vetor[0])) continue; //Ignore empty text + } + if(isset($vetor[6]) and $vetor[6] === true) // Subscript + { + $this->SUB = true; + $this->SetFontSize(6); + } + if(isset($vetor[5]) and $vetor[5] === true) // Superscript + { + $this->SUP = true; + $this->SetFontSize(6); + } + if(isset($vetor[4]) and $vetor[4] != '') $this->SetFont($vetor[4]); // Font Family + if (!empty($vetor[3])) //Font Color + { + $cor = $vetor[3]; + $this->SetTextColor($cor['R'],$cor['G'],$cor['B']); + } + if(isset($vetor[2]) and $vetor[2] != '') //Bold,Italic,Underline styles + { + if (strpos($vetor[2],"B") !== false) $this->SetStyle('B',true); + if (strpos($vetor[2],"I") !== false) $this->SetStyle('I',true); + if (strpos($vetor[2],"U") !== false) $this->SetStyle('U',true); + } + if(isset($vetor[1]) and $vetor[1] != '') //LINK + { + if (strpos($vetor[1],".") === false) //assuming every external link has a dot indicating extension (e.g: .html .txt .zip www.somewhere.com etc.) + { + //Repeated reference to same anchor? + while(array_key_exists($vetor[1],$this->internallink)) $vetor[1]="#".$vetor[1]; + $this->internallink[$vetor[1]] = $this->AddLink(); + $vetor[1] = $this->internallink[$vetor[1]]; + } + $this->HREF = $vetor[1]; + $this->SetTextColor(0,0,255); + $this->SetStyle('U',true); + } + //Print-out special content + if (isset($vetor[0]) and $vetor[0]{0} == '»' and $vetor[0]{1} == '¤' and $vetor[0]{2} == '¬') //identifier has been identified! + { + $content = explode("»¤¬",$vetor[0]); + $texto = $content[2]; + $content = explode(",",$content[1]); + foreach($content as $value) + { + $value = explode("=",$value); + $specialcontent[$value[0]] = $value[1]; + } + if ($this->flowingBlockAttr[ 'contentWidth' ] > 0) // Print out previously accumulated content + { + $width_used = $this->flowingBlockAttr[ 'contentWidth' ] / $this->k; + //Restart Flowing Block + $this->finishFlowingBlock($outofblock); + $this->x = $bak_x + ($width_used % $this->divwidth) + 0.5;// 0.5 == margin + $this->y -= ($this->lineheight + 0.5); + $extrawidth = 0; //only to be used in case $specialcontent['width'] does not contain all used width (e.g. Select Box) + if ($specialcontent['type'] == 'select') $extrawidth = 7; //arrow box + margin + if(($this->x - $bak_x) + $specialcontent['width'] + $extrawidth > $this->divwidth ) + { + $this->x = $bak_x; + $this->y += $this->lineheight - 1; + } + $this->newFlowingBlock( $this->divwidth,$this->divheight,$this->divborder,$align,$fill,$is_table ); + } + switch(strtoupper($specialcontent['type'])) + { + case 'IMAGE': + //xpos and ypos used in order to support:
    + $xpos = 0; + $ypos = 0; + if (isset($specialcontent['ypos']) and $specialcontent['ypos'] != '') $ypos = (float)$specialcontent['ypos']; + if (isset($specialcontent['xpos']) and $specialcontent['xpos'] != '') $xpos = (float)$specialcontent['xpos']; + $width_used = (($this->x - $bak_x) + $specialcontent['width'])*$this->k; //in order to adjust x coordinate later + //Is this the best way of fixing x,y coordinates? + $fix_x = ($this->x+2) * $this->k + ($xpos*$this->k); //+2 margin + $fix_y = ($this->h - (($this->y+2) + $specialcontent['height'])) * $this->k;//+2 margin + $imgtemp = explode(" ",$texto); + $imgtemp[5]=$fix_x; // x + $imgtemp[6]=$fix_y; // y + $texto = implode(" ",$imgtemp); + $this->_out($texto); + //Readjust x coordinate in order to allow text to be placed after this form element + $this->x = $bak_x; + $spacesize = $this->CurrentFont[ 'cw' ][ ' ' ] * ( $this->FontSizePt / 1000 ); + $spacenum = (integer)ceil(($width_used / $spacesize)); + //Consider the space used so far in this line as a bunch of spaces + if ($ypos != 0) $this->Ln($ypos); + else $this->WriteFlowingBlock(str_repeat(' ',$spacenum)); + break; + case 'INPUT': + switch($specialcontent['subtype']) + { + case 'PASSWORD': + case 'TEXT': //Draw TextField + $width_used = (($this->x - $bak_x) + $specialcontent['width'])*$this->k; //in order to adjust x coordinate later + $this->SetFillColor(235,235,235); + $this->x += 1; + $this->y += 1; + $this->Rect($this->x,$this->y,$specialcontent['width'],4.5,'DF');// 4.5 in order to avoid overlapping + if ($texto != '') + { + $this->x += 1; + $this->Write(5,$texto,$this->x); + $this->x -= $this->GetStringWidth($texto); + } + $this->SetFillColor(255); + $this->y -= 1; + //Readjust x coordinate in order to allow text to be placed after this form element + $this->x = $bak_x; + $spacesize = $this->CurrentFont[ 'cw' ][ ' ' ] * ( $this->FontSizePt / 1000 ); + $spacenum = (integer)ceil(($width_used / $spacesize)); + //Consider the space used so far in this line as a bunch of spaces + $this->WriteFlowingBlock(str_repeat(' ',$spacenum)); + break; + case 'CHECKBOX': //Draw Checkbox + $width_used = (($this->x - $bak_x) + $specialcontent['width'])*$this->k; //in order to adjust x coordinate later + $checked = $texto; + $this->SetFillColor(235,235,235); + $this->y += 1; + $this->x += 1; + $this->Rect($this->x,$this->y,3,3,'DF'); + if ($checked) + { + $this->Line($this->x,$this->y,$this->x+3,$this->y+3); + $this->Line($this->x,$this->y+3,$this->x+3,$this->y); + } + $this->SetFillColor(255); + $this->y -= 1; + //Readjust x coordinate in order to allow text to be placed after this form element + $this->x = $bak_x; + $spacesize = $this->CurrentFont[ 'cw' ][ ' ' ] * ( $this->FontSizePt / 1000 ); + $spacenum = (integer)ceil(($width_used / $spacesize)); + //Consider the space used so far in this line as a bunch of spaces + $this->WriteFlowingBlock(str_repeat(' ',$spacenum)); + break; + case 'RADIO': //Draw Radio button + $width_used = (($this->x - $bak_x) + $specialcontent['width']+0.5)*$this->k; //in order to adjust x coordinate later + $checked = $texto; + $this->x += 2; + $this->y += 1.5; + $this->Circle($this->x,$this->y+1.2,1,'D'); + $this->_out('0.000 g'); + if ($checked) $this->Circle($this->x,$this->y+1.2,0.4,'DF'); + $this->y -= 1.5; + //Readjust x coordinate in order to allow text to be placed after this form element + $this->x = $bak_x; + $spacesize = $this->CurrentFont[ 'cw' ][ ' ' ] * ( $this->FontSizePt / 1000 ); + $spacenum = (integer)ceil(($width_used / $spacesize)); + //Consider the space used so far in this line as a bunch of spaces + $this->WriteFlowingBlock(str_repeat(' ',$spacenum)); + break; + case 'BUTTON': // Draw a button + case 'SUBMIT': + case 'RESET': + $nihil = ($specialcontent['width']-$this->GetStringWidth($texto))/2; + $this->x += 1.5; + $this->y += 1; + $this->SetFillColor(190,190,190); + $this->Rect($this->x,$this->y,$specialcontent['width'],4.5,'DF'); // 4.5 in order to avoid overlapping + $this->x += $nihil; + $this->Write(5,$texto,$this->x); + $this->x += $nihil; + $this->SetFillColor(255); + $this->y -= 1; + break; + default: break; + } + break; + case 'SELECT': + $width_used = (($this->x - $bak_x) + $specialcontent['width'] + 8)*$this->k; //in order to adjust x coordinate later + $this->SetFillColor(235,235,235); //light gray + $this->x += 1.5; + $this->y += 1; + $this->Rect($this->x,$this->y,$specialcontent['width']+2,$this->lineheight,'DF'); // +2 == margin + $this->x += 1; + if ($texto != '') $this->Write($this->lineheight,$texto,$this->x); //the combobox content + $this->x += $specialcontent['width'] - $this->GetStringWidth($texto) + 2; + $this->SetFillColor(190,190,190); //dark gray + $this->Rect($this->x-1,$this->y,5,5,'DF'); //Arrow Box + $this->SetFont('zapfdingbats'); + $this->Write($this->lineheight,chr(116),$this->x); //Down arrow + $this->SetFont('arial'); + $this->SetFillColor(255); + //Readjust x coordinate in order to allow text to be placed after this form element + $this->x = $bak_x; + $spacesize = $this->CurrentFont[ 'cw' ][ ' ' ] * ( $this->FontSizePt / 1000 ); + $spacenum = (integer)ceil(($width_used / $spacesize)); + //Consider the space used so far in this line as a bunch of spaces + $this->WriteFlowingBlock(str_repeat(' ',$spacenum)); + break; + case 'TEXTAREA': + //Setup TextArea properties + $this->SetFillColor(235,235,235); + $this->SetFont('courier'); + $this->currentfont='courier'; + $ta_lines = $specialcontent['lines']; + $ta_height = 1.1*$this->lineheight*$ta_lines; + $ta_width = $specialcontent['width']; + //Adjust x,y coordinates + $this->x += 1.5; + $this->y += 1.5; + $linesneeded = $this->WordWrap($texto,$ta_width); + if ( $linesneeded > $ta_lines ) //Too many words inside textarea + { + $textoaux = explode("\n",$texto); + $texto = ''; + for($i=0;$i<$ta_lines;$i++) + { + if ($i == $ta_lines-1) $texto .= $textoaux[$i]; + else $texto .= $textoaux[$i] . "\n"; + } + //Inform the user that some text has been truncated + $texto{strlen($texto)-1} = "."; + $texto{strlen($texto)-2} = "."; + $texto{strlen($texto)-3} = "."; + } + $backup_y = $this->y; + $backup_x = $this->x; + $this->Rect($this->x,$this->y,$ta_width+3,$ta_height,'DF'); + if ($texto != '') $this->MultiCell($ta_width+3,$this->lineheight,$texto); + $this->y = $backup_y - 1.5; + $this->x = $backup_x + $ta_width + 2.5; + $this->SetFillColor(255); + $this->SetFont('arial'); + $this->currentfont=''; + break; + default: break; + } + } + else //THE text + { + if ($vetor[0] == "\n") //We are reading a
    now turned into newline ("\n") + { + //Restart Flowing Block + $this->finishFlowingBlock($outofblock); + if($outofblock) $this->Ln($this->lineheight); + $this->x = $bak_x; + $this->newFlowingBlock( $this->divwidth,$this->divheight,$this->divborder,$align,$fill,$is_table ); + } + else $this->WriteFlowingBlock( $vetor[0] , $outofblock ); + } + //Check if it is the last element. If so then finish printing the block + if ($i == ($array_size-1)) $this->finishFlowingBlock($outofblock); + //Now we must deactivate what we have used + if( (isset($vetor[1]) and $vetor[1] != '') or $this->HREF != '') + { + $this->SetTextColor(0); + $this->SetStyle('U',false); + $this->HREF = ''; + } + if(isset($vetor[2]) and $vetor[2] != '') + { + $this->SetStyle('B',false); + $this->SetStyle('I',false); + $this->SetStyle('U',false); + } + if(isset($vetor[3]) and $vetor[3] != '') + { + unset($cor); + $this->SetTextColor(0); + } + if(isset($vetor[4]) and $vetor[4] != '') $this->SetFont('arial'); + if(isset($vetor[5]) and $vetor[5] === true) + { + $this->SUP = false; + $this->SetFontSize(11); + } + if(isset($vetor[6]) and $vetor[6] === true) + { + $this->SUB = false; + $this->SetFontSize(11); + } + //vetor7-internal links + if(isset($vetor[8]) and $vetor[8] === true) // strike-through the text + { + $this->strike = false; + } + if(isset($vetor[9]) and !empty($vetor[9])) // Outline parameters + { + $this->SetTextOutline(false); + $this->outline_on = false; + } + if(isset($vetor[10]) and !empty($vetor[10])) //Background color + { + $this->SetFillColor(255); + $this->divbgcolor = false; + } + }//end of for(i=0;istrike = $save['strike']; + $this->SUP = $save['SUP']; + $this->SUB = $save['SUB']; + $this->dotted_on = $save['DOTTED']; + $this->dash_on = $save['DASHED']; + if ($this->dash_on) $this->SetDash(2,2); + //Check whether we have borders to paint or not + //(only works 100% if whole content spans only 1 page) + if ($this->cssbegin and ($this->divborder or $this->dash_on or $this->dotted_on or $this->divbgcolor)) + { + if ($oldpage != $this->page) + { + //Only border on last page is painted (known bug) + $x = $this->lMargin; + $y = $this->tMargin; + $old_height = $this->y - $y; + } + else + { + if ($this->oldx < 0) $x = $this->x; + else $x = $this->oldx; + if ($this->oldy < 0) $y = $this->y - $old_height; + else $y = $this->oldy; + } + if ($this->divborder) $this->Rect($x,$y,$this->divwidth,$old_height); + if ($this->dash_on) $this->Rect($x,$y,$this->divwidth,$old_height); + if ($this->dotted_on) $this->DottedRect($x,$y,$this->divwidth,$old_height); + $this->x = $bak_x; + } +} + +function Reset() +{ +//! @return void +//! @desc Resets several class attributes + +// if ( $this->issetcolor !== true ) +// { + $this->SetTextColor(0); + $this->SetDrawColor(0); + $this->SetFillColor(255); + $this->colorarray = array(); + $this->bgcolorarray = array(); +$this->issetcolor = false; +// } +$this->HREF = ''; +$this->SetTextOutline(false); + +//$this->strike = false; + + $this->SetFontSize(11); + $this->SetStyle('B',false); + $this->SetStyle('I',false); + $this->SetStyle('U',false); + $this->SetFont('arial'); + $this->divwidth = 0; + $this->divheight = 0; + $this->divalign = "L"; + $this->divrevert = false; + $this->divborder = 0; + $this->divbgcolor = false; + $this->toupper = false; + $this->tolower = false; + $this->SetDash(); //restore to no dash + $this->dash_on = false; + $this->dotted_on = false; + $this->oldx = -1; + $this->oldy = -1; +} + +function ReadMetaTags($html) +{ +//! @return void +//! @desc Pass meta tag info to PDF file properties + $regexp = '/ (\\w+?)=([^\\s>"]+)/si'; // changes anykey=anyvalue to anykey="anyvalue" (only do this when this happens inside tags) + $html = preg_replace($regexp," \$1=\"\$2\"",$html); + $regexp = '//si'; + preg_match_all($regexp,$html,$aux); + + $firstattr = $aux[1]; + $secondattr = $aux[3]; + for( $i = 0 ; $i < count($aux[0]) ; $i++) + { + + $name = ( strtoupper($firstattr[$i]) == "NAME" )? strtoupper($aux[2][$i]) : strtoupper($aux[4][$i]); + $content = ( strtoupper($firstattr[$i]) == "CONTENT" )? $aux[2][$i] : $aux[4][$i]; + switch($name) + { + case "KEYWORDS": $this->SetKeywords($content); break; + case "AUTHOR": $this->SetAuthor($content); break; + case "DESCRIPTION": $this->SetSubject($content); break; + } + } + //Comercial do Aplicativo usado (no caso um script): + $this->SetCreator("HTML2FPDF >> http://html2fpdf.sf.net"); +} + +////////////////// +/// CSS parser /// +////////////////// +function ReadCSS($html) +{ +//! @desc CSS parser +//! @return string + +/* +* This version ONLY supports: .class {...} / #id { .... } +* It does NOT support: body{...} / a#hover { ... } / p.right { ... } / other mixed names +* This function must read the CSS code (internal or external) and order its value inside $this->CSS. +*/ + + $match = 0; // no match for instance + $regexp = ''; // This helps debugging: showing what is the REAL string being processed + + //CSS inside external files + $regexp = '//si'; + $match = preg_match_all($regexp,$html,$CSSext); + $ind = 0; + + while($match){ + //Fix path value + $path = $CSSext[1][$ind]; + $path = str_replace("\\","/",$path); //If on Windows + //Get link info and obtain its absolute path + $regexp = '|^./|'; + $path = preg_replace($regexp,'',$path); + if (strpos($path,"../") !== false ) //It is a Relative Link + { + $backtrackamount = substr_count($path,"../"); + $maxbacktrack = substr_count($this->basepath,"/") - 1; + $filepath = str_replace("../",'',$path); + $path = $this->basepath; + //If it is an invalid relative link, then make it go to directory root + if ($backtrackamount > $maxbacktrack) $backtrackamount = $maxbacktrack; + //Backtrack some directories + for( $i = 0 ; $i < $backtrackamount + 1 ; $i++ ) $path = substr( $path, 0 , strrpos($path,"/") ); + $path = $path . "/" . $filepath; //Make it an absolute path + } + elseif( strpos($path,":/") === false) //It is a Local Link + { + $path = $this->basepath . $path; + } + //Do nothing if it is an Absolute Link + //END of fix path value + $CSSextblock = file_get_contents($path); + + //Get class/id name and its characteristics from $CSSblock[1] + $regexp = '/[.# ]([^.]+?)\\s*?\{(.+?)\}/s'; // '/s' PCRE_DOTALL including \n + preg_match_all( $regexp, $CSSextblock, $extstyle); + + //Make CSS[Name-of-the-class] = array(key => value) + $regexp = '/\\s*?(\\S+?):(.+?);/si'; + + for($i=0; $i < count($extstyle[1]) ; $i++) + { + preg_match_all( $regexp, $extstyle[2][$i], $extstyleinfo); + $extproperties = $extstyleinfo[1]; + $extvalues = $extstyleinfo[2]; + for($j = 0; $j < count($extproperties) ; $j++) + { + //Array-properties and Array-values must have the SAME SIZE! + $extclassproperties[strtoupper($extproperties[$j])] = trim($extvalues[$j]); + } + $this->CSS[$extstyle[1][$i]] = $extclassproperties; + $extproperties = array(); + $extvalues = array(); + $extclassproperties = array(); + } + $match--; + $ind++; + } //end of match + + $match = 0; // reset value, if needed + + //CSS internal + //Get content between tags and order it, using regexp + $regexp = '/(.*?)<\/style>/si'; // it can be