commit
73ec88119f
Before Width: | Height: | Size: 101 B After Width: | Height: | Size: 318 B |
@ -0,0 +1,46 @@ |
||||
<?php |
||||
// Dokeos - elearning and course management software |
||||
// See license terms in dokeos/documentation/license.txt |
||||
|
||||
// Training tools |
||||
// Survey |
||||
|
||||
// For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options |
||||
|
||||
// This is the visible toolbar set when the editor has "normal" size. |
||||
$config['ToolbarSets']['Normal'] = array( |
||||
array('Style','FontFormat','FontName','FontSize'), |
||||
array('Bold','Italic','Underline'), |
||||
array('JustifyLeft','JustifyCenter','JustifyRight') |
||||
); |
||||
|
||||
// This is the visible toolbar set when the editor is maximized. |
||||
// If it has not been defined, then the toolbar set for the "normal" size is used. |
||||
/* |
||||
$config['ToolbarSets']['Maximized'] = array( |
||||
array('FitWindow','-') // ... |
||||
); |
||||
*/ |
||||
|
||||
// Sets whether the toolbar can be collapsed/expanded or not. |
||||
// Possible values: true , false |
||||
//$config['ToolbarCanCollapse'] = true; |
||||
|
||||
// Sets how the editor's toolbar should start - expanded or collapsed. |
||||
// Possible values: true , false |
||||
//$config['ToolbarStartExpanded'] = true; |
||||
|
||||
//This option sets the location of the toolbar. |
||||
// Possible values: 'In' , 'None' , 'Out:[TargetId]' , 'Out:[TargetWindow]([TargetId])' |
||||
//$config['ToolbarLocation'] = 'In'; |
||||
|
||||
// A setting for blocking copy/paste functions of the editor. |
||||
// This setting activates on leaners only. For users with other statuses there is no blocking copy/paste. |
||||
// Possible values: true , false |
||||
//$config['BlockCopyPaste'] = false; |
||||
|
||||
// Here new width and height of the editor may be set. |
||||
// Possible values, examples: 300 , '250' , '100%' , ... |
||||
//$config['Width'] = '100%'; |
||||
//$config['Height'] = '120'; |
||||
?> |
@ -0,0 +1,41 @@ |
||||
<?php |
||||
// Dokeos - elearning and course management software |
||||
// See license terms in dokeos/documentation/license.txt |
||||
|
||||
// Training tools |
||||
// Survey |
||||
|
||||
// For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options |
||||
|
||||
// This is the visible toolbar set when the editor has "normal" size. |
||||
$config['ToolbarSets']['Normal'] = array( |
||||
array('Style','FontFormat','FontName','FontSize'), |
||||
array('Bold','Italic','Underline'), |
||||
array('JustifyLeft','JustifyCenter','JustifyRight') |
||||
); |
||||
|
||||
// This is the visible toolbar set when the editor is maximized. |
||||
// If it has not been defined, then the toolbar set for the "normal" size is used. |
||||
$config['ToolbarSets']['Maximized'] = array( |
||||
array('Style','FontFormat','FontName','FontSize'), |
||||
array('Bold','Italic','Underline'), |
||||
array('JustifyLeft','JustifyCenter','JustifyRight') |
||||
); |
||||
// Sets how the editor's toolbar should start - expanded or collapsed. |
||||
// Possible values: true , false |
||||
//$config['ToolbarStartExpanded'] = true; |
||||
|
||||
//This option sets the location of the toolbar. |
||||
// Possible values: 'In' , 'None' , 'Out:[TargetId]' , 'Out:[TargetWindow]([TargetId])' |
||||
//$config['ToolbarLocation'] = 'In'; |
||||
|
||||
// A setting for blocking copy/paste functions of the editor. |
||||
// This setting activates on leaners only. For users with other statuses there is no blocking copy/paste. |
||||
// Possible values: true , false |
||||
//$config['BlockCopyPaste'] = false; |
||||
|
||||
// Here new width and height of the editor may be set. |
||||
// Possible values, examples: 300 , '250' , '100%' , ... |
||||
//$config['Width'] = '100%'; |
||||
//$config['Height'] = '120'; |
||||
?> |
@ -1,7 +1,7 @@ |
||||
<?php |
||||
for($i=0;$i<=255;$i++) |
||||
$fpdf_charwidths['courier'][chr($i)]=600; |
||||
$fpdf_charwidths['courierB']=$fpdf_charwidths['courier']; |
||||
$fpdf_charwidths['courierI']=$fpdf_charwidths['courier']; |
||||
$fpdf_charwidths['courierBI']=$fpdf_charwidths['courier']; |
||||
?> |
||||
<?php |
||||
for($i=0;$i<=255;$i++) |
||||
$fpdf_charwidths['courier'][chr($i)]=600; |
||||
$fpdf_charwidths['courierB']=$fpdf_charwidths['courier']; |
||||
$fpdf_charwidths['courierI']=$fpdf_charwidths['courier']; |
||||
$fpdf_charwidths['courierBI']=$fpdf_charwidths['courier']; |
||||
?> |
||||
|
@ -1,15 +1,15 @@ |
||||
<?php |
||||
$fpdf_charwidths['helvetica']=array( |
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, |
||||
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); |
||||
?> |
||||
<?php |
||||
$fpdf_charwidths['helvetica']=array( |
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, |
||||
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); |
||||
?> |
||||
|
@ -1,15 +1,15 @@ |
||||
<?php |
||||
$fpdf_charwidths['helveticaB']=array( |
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, |
||||
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); |
||||
?> |
||||
<?php |
||||
$fpdf_charwidths['helveticaB']=array( |
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, |
||||
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); |
||||
?> |
||||
|
@ -1,15 +1,15 @@ |
||||
<?php |
||||
$fpdf_charwidths['helveticaBI']=array( |
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, |
||||
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); |
||||
?> |
||||
<?php |
||||
$fpdf_charwidths['helveticaBI']=array( |
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, |
||||
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); |
||||
?> |
||||
|
@ -1,15 +1,15 @@ |
||||
<?php |
||||
$fpdf_charwidths['helveticaI']=array( |
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, |
||||
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); |
||||
?> |
||||
<?php |
||||
$fpdf_charwidths['helveticaI']=array( |
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, |
||||
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); |
||||
?> |
||||
|
@ -1,419 +1,419 @@ |
||||
<?php |
||||
/******************************************************************************* |
||||
* Utility to generate font definition files |
||||
* |
||||
* Version: 1.14 |
||||
* Date: 2008-08-03 |
||||
* Author: Olivier PLATHEY |
||||
*******************************************************************************/ |
||||
|
||||
function ReadMap($enc) |
||||
{ |
||||
//Read a map file |
||||
$file=dirname(__FILE__).'/'.strtolower($enc).'.map'; |
||||
$a=file($file); |
||||
if(empty($a)) |
||||
die('<b>Error:</b> encoding not found: '.$enc); |
||||
$cc2gn=array(); |
||||
foreach($a as $l) |
||||
{ |
||||
if($l[0]=='!') |
||||
{ |
||||
$e=preg_split('/[ \\t]+/',rtrim($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(' ',rtrim($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']) && isset($widths['increment'])) |
||||
$widths['Delta']=$widths['increment']; |
||||
//Order widths according to map |
||||
for($i=0;$i<=255;$i++) |
||||
{ |
||||
if(!isset($widths[$map[$i]])) |
||||
{ |
||||
echo '<b>Warning:</b> character '.$map[$i].' is missing<br>'; |
||||
$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']) && $fm['IsFixedPitch']) |
||||
$flags+=1<<0; |
||||
if($symbolic) |
||||
$flags+=1<<2; |
||||
if(!$symbolic) |
||||
$flags+=1<<5; |
||||
if(isset($fm['ItalicAngle']) && $fm['ItalicAngle']!=0) |
||||
$flags+=1<<6; |
||||
$fd.=",'Flags'=>".$flags; |
||||
//FontBBox |
||||
if(isset($fm['FontBBox'])) |
||||
$fbb=$fm['FontBBox']; |
||||
else |
||||
$fbb=array(0,$desc-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']) && preg_match('/bold|black/i',$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 && $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 rtrim($s); |
||||
} |
||||
|
||||
function SaveToFile($file, $s, $mode) |
||||
{ |
||||
$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('<b>Error:</b> 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 && !$pp && !$e) |
||||
echo '<b>Warning:</b> font license does not allow embedding'; |
||||
} |
||||
|
||||
/******************************************************************************* |
||||
* fontfile: path to TTF file (or empty string if not to be embedded0) |
||||
* 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 |
||||
if(get_magic_quotes_runtime()) |
||||
@set_magic_quotes_runtime(0); |
||||
ini_set('auto_detect_line_endings','1'); |
||||
if($enc) |
||||
{ |
||||
$map=ReadMap($enc); |
||||
foreach($patch as $cc=>$gn) |
||||
$map[$cc]=$gn; |
||||
} |
||||
else |
||||
$map=array(); |
||||
if(!file_exists($afmfile)) |
||||
die('<b>Error:</b> 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('<b>Error:</b> unrecognized font file extension: '.$ext); |
||||
} |
||||
else |
||||
{ |
||||
if($type!='TrueType' && $type!='Type1') |
||||
die('<b>Error:</b> incorrect font type: '.$type); |
||||
} |
||||
//Start generation |
||||
$s='<?php'."\n"; |
||||
$s.='$type=\''.$type."';\n"; |
||||
$s.='$name=\''.$fm['FontName']."';\n"; |
||||
$s.='$desc='.$fd.";\n"; |
||||
if(!isset($fm['UnderlinePosition'])) |
||||
$fm['UnderlinePosition']=-100; |
||||
if(!isset($fm['UnderlineThickness'])) |
||||
$fm['UnderlineThickness']=50; |
||||
$s.='$up='.$fm['UnderlinePosition'].";\n"; |
||||
$s.='$ut='.$fm['UnderlineThickness'].";\n"; |
||||
$w=MakeWidthArray($fm); |
||||
$s.='$cw='.$w.";\n"; |
||||
$s.='$enc=\''.$enc."';\n"; |
||||
$s.='$diff=\''.$diff."';\n"; |
||||
$basename=substr(basename($afmfile),0,-4); |
||||
if($fontfile) |
||||
{ |
||||
//Embedded font |
||||
if(!file_exists($fontfile)) |
||||
die('<b>Error:</b> font file not found: '.$fontfile); |
||||
if($type=='TrueType') |
||||
CheckTTF($fontfile); |
||||
$f=fopen($fontfile,'rb'); |
||||
if(!$f) |
||||
die('<b>Error:</b> Can\'t open '.$fontfile); |
||||
$file=fread($f,filesize($fontfile)); |
||||
fclose($f); |
||||
if($type=='Type1') |
||||
{ |
||||
//Find first two sections and discard third one |
||||
$header=(ord($file[0])==128); |
||||
if($header) |
||||
{ |
||||
//Strip first binary header |
||||
$file=substr($file,6); |
||||
} |
||||
$pos=strpos($file,'eexec'); |
||||
if(!$pos) |
||||
die('<b>Error:</b> font file does not seem to be valid Type1'); |
||||
$size1=$pos+6; |
||||
if($header && ord($file[$size1])==128) |
||||
{ |
||||
//Strip second binary header |
||||
$file=substr($file,0,$size1).substr($file,$size1+6); |
||||
} |
||||
$pos=strpos($file,'00000000'); |
||||
if(!$pos) |
||||
die('<b>Error:</b> 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.')<br>'; |
||||
} |
||||
else |
||||
{ |
||||
$s.='$file=\''.basename($fontfile)."';\n"; |
||||
echo '<b>Notice:</b> font file could not be compressed (zlib extension not available)<br>'; |
||||
} |
||||
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,'t'); |
||||
echo 'Font definition file generated ('.$basename.'.php'.')<br>'; |
||||
} |
||||
?> |
||||
<?php |
||||
/******************************************************************************* |
||||
* Utility to generate font definition files |
||||
* |
||||
* Version: 1.14 |
||||
* Date: 2008-08-03 |
||||
* Author: Olivier PLATHEY |
||||
*******************************************************************************/ |
||||
|
||||
function ReadMap($enc) |
||||
{ |
||||
//Read a map file |
||||
$file=dirname(__FILE__).'/'.strtolower($enc).'.map'; |
||||
$a=file($file); |
||||
if(empty($a)) |
||||
die('<b>Error:</b> encoding not found: '.$enc); |
||||
$cc2gn=array(); |
||||
foreach($a as $l) |
||||
{ |
||||
if($l[0]=='!') |
||||
{ |
||||
$e=preg_split('/[ \\t]+/',rtrim($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(' ',rtrim($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']) && isset($widths['increment'])) |
||||
$widths['Delta']=$widths['increment']; |
||||
//Order widths according to map |
||||
for($i=0;$i<=255;$i++) |
||||
{ |
||||
if(!isset($widths[$map[$i]])) |
||||
{ |
||||
echo '<b>Warning:</b> character '.$map[$i].' is missing<br>'; |
||||
$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']) && $fm['IsFixedPitch']) |
||||
$flags+=1<<0; |
||||
if($symbolic) |
||||
$flags+=1<<2; |
||||
if(!$symbolic) |
||||
$flags+=1<<5; |
||||
if(isset($fm['ItalicAngle']) && $fm['ItalicAngle']!=0) |
||||
$flags+=1<<6; |
||||
$fd.=",'Flags'=>".$flags; |
||||
//FontBBox |
||||
if(isset($fm['FontBBox'])) |
||||
$fbb=$fm['FontBBox']; |
||||
else |
||||
$fbb=array(0,$desc-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']) && preg_match('/bold|black/i',$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 && $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 rtrim($s); |
||||
} |
||||
|
||||
function SaveToFile($file, $s, $mode) |
||||
{ |
||||
$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('<b>Error:</b> 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 && !$pp && !$e) |
||||
echo '<b>Warning:</b> font license does not allow embedding'; |
||||
} |
||||
|
||||
/******************************************************************************* |
||||
* fontfile: path to TTF file (or empty string if not to be embedded0) |
||||
* 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 |
||||
if(get_magic_quotes_runtime()) |
||||
@set_magic_quotes_runtime(0); |
||||
ini_set('auto_detect_line_endings','1'); |
||||
if($enc) |
||||
{ |
||||
$map=ReadMap($enc); |
||||
foreach($patch as $cc=>$gn) |
||||
$map[$cc]=$gn; |
||||
} |
||||
else |
||||
$map=array(); |
||||
if(!file_exists($afmfile)) |
||||
die('<b>Error:</b> 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('<b>Error:</b> unrecognized font file extension: '.$ext); |
||||
} |
||||
else |
||||
{ |
||||
if($type!='TrueType' && $type!='Type1') |
||||
die('<b>Error:</b> incorrect font type: '.$type); |
||||
} |
||||
//Start generation |
||||
$s='<?php'."\n"; |
||||
$s.='$type=\''.$type."';\n"; |
||||
$s.='$name=\''.$fm['FontName']."';\n"; |
||||
$s.='$desc='.$fd.";\n"; |
||||
if(!isset($fm['UnderlinePosition'])) |
||||
$fm['UnderlinePosition']=-100; |
||||
if(!isset($fm['UnderlineThickness'])) |
||||
$fm['UnderlineThickness']=50; |
||||
$s.='$up='.$fm['UnderlinePosition'].";\n"; |
||||
$s.='$ut='.$fm['UnderlineThickness'].";\n"; |
||||
$w=MakeWidthArray($fm); |
||||
$s.='$cw='.$w.";\n"; |
||||
$s.='$enc=\''.$enc."';\n"; |
||||
$s.='$diff=\''.$diff."';\n"; |
||||
$basename=substr(basename($afmfile),0,-4); |
||||
if($fontfile) |
||||
{ |
||||
//Embedded font |
||||
if(!file_exists($fontfile)) |
||||
die('<b>Error:</b> font file not found: '.$fontfile); |
||||
if($type=='TrueType') |
||||
CheckTTF($fontfile); |
||||
$f=fopen($fontfile,'rb'); |
||||
if(!$f) |
||||
die('<b>Error:</b> Can\'t open '.$fontfile); |
||||
$file=fread($f,filesize($fontfile)); |
||||
fclose($f); |
||||
if($type=='Type1') |
||||
{ |
||||
//Find first two sections and discard third one |
||||
$header=(ord($file[0])==128); |
||||
if($header) |
||||
{ |
||||
//Strip first binary header |
||||
$file=substr($file,6); |
||||
} |
||||
$pos=strpos($file,'eexec'); |
||||
if(!$pos) |
||||
die('<b>Error:</b> font file does not seem to be valid Type1'); |
||||
$size1=$pos+6; |
||||
if($header && ord($file[$size1])==128) |
||||
{ |
||||
//Strip second binary header |
||||
$file=substr($file,0,$size1).substr($file,$size1+6); |
||||
} |
||||
$pos=strpos($file,'00000000'); |
||||
if(!$pos) |
||||
die('<b>Error:</b> 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.')<br>'; |
||||
} |
||||
else |
||||
{ |
||||
$s.='$file=\''.basename($fontfile)."';\n"; |
||||
echo '<b>Notice:</b> font file could not be compressed (zlib extension not available)<br>'; |
||||
} |
||||
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,'t'); |
||||
echo 'Font definition file generated ('.$basename.'.php'.')<br>'; |
||||
} |
||||
?> |
||||
|
@ -1,15 +1,15 @@ |
||||
<?php |
||||
$fpdf_charwidths['symbol']=array( |
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, |
||||
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); |
||||
?> |
||||
<?php |
||||
$fpdf_charwidths['symbol']=array( |
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, |
||||
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); |
||||
?> |
||||
|
@ -1,15 +1,15 @@ |
||||
<?php |
||||
$fpdf_charwidths['times']=array( |
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, |
||||
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); |
||||
?> |
||||
<?php |
||||
$fpdf_charwidths['times']=array( |
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, |
||||
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); |
||||
?> |
||||
|
@ -1,15 +1,15 @@ |
||||
<?php |
||||
$fpdf_charwidths['timesB']=array( |
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, |
||||
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); |
||||
?> |
||||
<?php |
||||
$fpdf_charwidths['timesB']=array( |
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, |
||||
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); |
||||
?> |
||||
|
@ -1,15 +1,15 @@ |
||||
<?php |
||||
$fpdf_charwidths['timesBI']=array( |
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, |
||||
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); |
||||
?> |
||||
<?php |
||||
$fpdf_charwidths['timesBI']=array( |
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, |
||||
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); |
||||
?> |
||||
|
@ -1,15 +1,15 @@ |
||||
<?php |
||||
$fpdf_charwidths['timesI']=array( |
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, |
||||
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); |
||||
?> |
||||
<?php |
||||
$fpdf_charwidths['timesI']=array( |
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, |
||||
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); |
||||
?> |
||||
|
@ -1,15 +1,15 @@ |
||||
<?php |
||||
$fpdf_charwidths['zapfdingbats']=array( |
||||
chr(0)=>0,chr(1)=>0,chr(2)=>0,chr(3)=>0,chr(4)=>0,chr(5)=>0,chr(6)=>0,chr(7)=>0,chr(8)=>0,chr(9)=>0,chr(10)=>0,chr(11)=>0,chr(12)=>0,chr(13)=>0,chr(14)=>0,chr(15)=>0,chr(16)=>0,chr(17)=>0,chr(18)=>0,chr(19)=>0,chr(20)=>0,chr(21)=>0, |
||||
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); |
||||
?> |
||||
<?php |
||||
$fpdf_charwidths['zapfdingbats']=array( |
||||
chr(0)=>0,chr(1)=>0,chr(2)=>0,chr(3)=>0,chr(4)=>0,chr(5)=>0,chr(6)=>0,chr(7)=>0,chr(8)=>0,chr(9)=>0,chr(10)=>0,chr(11)=>0,chr(12)=>0,chr(13)=>0,chr(14)=>0,chr(15)=>0,chr(16)=>0,chr(17)=>0,chr(18)=>0,chr(19)=>0,chr(20)=>0,chr(21)=>0, |
||||
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); |
||||
?> |
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@ |
||||
Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
of this software to use, copy, modify, distribute, sublicense, and/or sell |
||||
copies of the software, and to permit persons to whom the software is furnished |
||||
to do so. |
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
of this software to use, copy, modify, distribute, sublicense, and/or sell |
||||
copies of the software, and to permit persons to whom the software is furnished |
||||
to do so. |
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. |
@ -1,238 +1,237 @@ |
||||
<?php |
||||
/************************************************************************* |
||||
* http://www.fpdf.org/en/script/script5.php |
||||
* |
||||
* @author Olivier |
||||
* |
||||
* This script implements EAN13 and UPC-A barcodes (the second being a particular case of the first one). Bars are drawn directly in the PDF (no image is generated). |
||||
* EAN13(float x, float y, string barcode [, float h [, float w]]) |
||||
* x: abscissa of barcode. |
||||
* y: ordinate of barcode. |
||||
* barcode: value of barcode. |
||||
* h: height of barcode. Default value: 16. |
||||
* w: width of a bar. Default value: 0.35. |
||||
* |
||||
* UPC_A(float x, float y, string barcode [, float h [, float w]]) |
||||
* |
||||
* Same parameters. |
||||
* |
||||
* An EAN13 barcode is made up of 13 digits, UPC-A of 12 (leading zeroes are added if necessary). The last digit is a check digit; if it's not supplied, it will be automatically computed. |
||||
************************************************************************/ |
||||
|
||||
/************************************************************************* |
||||
* http://www.fpdf.org/en/script/script46.php |
||||
* |
||||
* @author The-eh |
||||
* |
||||
* This script implements Code 39 barcodes. A Code 39 barcode can encode a string with the following characters: digits (0 to 9), uppercase letters (A to Z) and 8 additional characters (- . space $ / + % *). |
||||
* Code39(float xpos, float ypos, string code [, float baseline [, float height]]) |
||||
* xpos: abscissa of barcode |
||||
* ypos: ordinate of barcode |
||||
* code: value of barcode |
||||
* height: bar height |
||||
* baseline: corresponds to the width of a wide bar |
||||
************************************************************************/ |
||||
|
||||
|
||||
if (!defined('__CLASS_FPDF_CODEBAR__')) |
||||
{ |
||||
define('__CLASS_FPDF_CODEBAR__', true); |
||||
|
||||
require_once(dirname(__FILE__).'/../_fpdf/fpdf.php'); |
||||
|
||||
class FPDF_Codebar extends FPDF |
||||
{ |
||||
var $footer_param = array(); |
||||
|
||||
function FPDF_Codebar($sens = 'P', $unit = 'mm', $format = 'A4') |
||||
{ |
||||
$this->FPDF($sens, $unit, $format); |
||||
} |
||||
|
||||
function BARCODE_EAN13($x,$y,$barcode,$h=10,$w=.35) |
||||
{ |
||||
return $this->Barcode($x,$y,$barcode,$h,$w,13); |
||||
} |
||||
|
||||
function BARCODE_UPC_A($x,$y,$barcode,$h=10,$w=.35) |
||||
{ |
||||
return $this->Barcode($x,$y,$barcode,$h,$w,12); |
||||
} |
||||
|
||||
function GetCheckDigit($barcode) |
||||
{ |
||||
//Compute the check digit |
||||
$sum=0; |
||||
for($i=1;$i<=11;$i+=2) |
||||
$sum+=3*$barcode{$i}; |
||||
for($i=0;$i<=10;$i+=2) |
||||
$sum+=$barcode{$i}; |
||||
$r=$sum%10; |
||||
if($r>0) |
||||
$r=10-$r; |
||||
return $r; |
||||
} |
||||
|
||||
function TestCheckDigit($barcode) |
||||
{ |
||||
//Test validity of check digit |
||||
$sum=0; |
||||
for($i=1;$i<=11;$i+=2) |
||||
$sum+=3*$barcode{$i}; |
||||
for($i=0;$i<=10;$i+=2) |
||||
$sum+=$barcode{$i}; |
||||
return ($sum+$barcode{12})%10==0; |
||||
} |
||||
|
||||
function Barcode($x,$y,$barcode,$h,$w,$len) |
||||
{ |
||||
//Padding |
||||
$barcode=str_pad($barcode,$len-1,'0',STR_PAD_LEFT); |
||||
if($len==12) |
||||
$barcode='0'.$barcode; |
||||
//Add or control the check digit |
||||
if(strlen($barcode)==12) |
||||
$barcode.=$this->GetCheckDigit($barcode); |
||||
elseif(!$this->TestCheckDigit($barcode)) |
||||
$this->Error('Incorrect check digit'); |
||||
//Convert digits to bars |
||||
$codes=array( |
||||
'A'=>array( |
||||
'0'=>'0001101','1'=>'0011001','2'=>'0010011','3'=>'0111101','4'=>'0100011', |
||||
'5'=>'0110001','6'=>'0101111','7'=>'0111011','8'=>'0110111','9'=>'0001011'), |
||||
'B'=>array( |
||||
'0'=>'0100111','1'=>'0110011','2'=>'0011011','3'=>'0100001','4'=>'0011101', |
||||
'5'=>'0111001','6'=>'0000101','7'=>'0010001','8'=>'0001001','9'=>'0010111'), |
||||
'C'=>array( |
||||
'0'=>'1110010','1'=>'1100110','2'=>'1101100','3'=>'1000010','4'=>'1011100', |
||||
'5'=>'1001110','6'=>'1010000','7'=>'1000100','8'=>'1001000','9'=>'1110100') |
||||
); |
||||
$parities=array( |
||||
'0'=>array('A','A','A','A','A','A'), |
||||
'1'=>array('A','A','B','A','B','B'), |
||||
'2'=>array('A','A','B','B','A','B'), |
||||
'3'=>array('A','A','B','B','B','A'), |
||||
'4'=>array('A','B','A','A','B','B'), |
||||
'5'=>array('A','B','B','A','A','B'), |
||||
'6'=>array('A','B','B','B','A','A'), |
||||
'7'=>array('A','B','A','B','A','B'), |
||||
'8'=>array('A','B','A','B','B','A'), |
||||
'9'=>array('A','B','B','A','B','A') |
||||
); |
||||
$code='101'; |
||||
$p=$parities[$barcode{0}]; |
||||
for($i=1;$i<=6;$i++) |
||||
$code.=$codes[$p[$i-1]][$barcode{$i}]; |
||||
$code.='01010'; |
||||
for($i=7;$i<=12;$i++) |
||||
$code.=$codes['C'][$barcode{$i}]; |
||||
$code.='101'; |
||||
//Draw bars |
||||
for($i=0;$i<strlen($code);$i++) |
||||
{ |
||||
if($code{$i}=='1') |
||||
$this->Rect($x+$i*$w,$y,$w,$h,'F'); |
||||
} |
||||
|
||||
$code_w = strlen($code)*$w; |
||||
$code_t = substr($barcode,-$len); |
||||
|
||||
$code_f = $code_w/strlen($code_t)*$this->k/0.60; |
||||
$code_h = $h+$code_f/$this->k; |
||||
|
||||
//Print text uder barcode |
||||
$this->SetFont('Arial','',$code_f); |
||||
$this->Text($x,$y+$h+0.90*$code_f/$this->k,$code_t); |
||||
|
||||
return array($code_w, $code_h); |
||||
} |
||||
|
||||
function BARCODE_CODE39($xpos, $ypos, $code,$height=10, $baseline=0.5 ) |
||||
{ |
||||
|
||||
$wide = $baseline; |
||||
$narrow = $baseline / 3 ; |
||||
$gap = $narrow; |
||||
|
||||
$barChar['0'] = 'nnnwwnwnn'; |
||||
$barChar['1'] = 'wnnwnnnnw'; |
||||
$barChar['2'] = 'nnwwnnnnw'; |
||||
$barChar['3'] = 'wnwwnnnnn'; |
||||
$barChar['4'] = 'nnnwwnnnw'; |
||||
$barChar['5'] = 'wnnwwnnnn'; |
||||
$barChar['6'] = 'nnwwwnnnn'; |
||||
$barChar['7'] = 'nnnwnnwnw'; |
||||
$barChar['8'] = 'wnnwnnwnn'; |
||||
$barChar['9'] = 'nnwwnnwnn'; |
||||
$barChar['A'] = 'wnnnnwnnw'; |
||||
$barChar['B'] = 'nnwnnwnnw'; |
||||
$barChar['C'] = 'wnwnnwnnn'; |
||||
$barChar['D'] = 'nnnnwwnnw'; |
||||
$barChar['E'] = 'wnnnwwnnn'; |
||||
$barChar['F'] = 'nnwnwwnnn'; |
||||
$barChar['G'] = 'nnnnnwwnw'; |
||||
$barChar['H'] = 'wnnnnwwnn'; |
||||
$barChar['I'] = 'nnwnnwwnn'; |
||||
$barChar['J'] = 'nnnnwwwnn'; |
||||
$barChar['K'] = 'wnnnnnnww'; |
||||
$barChar['L'] = 'nnwnnnnww'; |
||||
$barChar['M'] = 'wnwnnnnwn'; |
||||
$barChar['N'] = 'nnnnwnnww'; |
||||
$barChar['O'] = 'wnnnwnnwn'; |
||||
$barChar['P'] = 'nnwnwnnwn'; |
||||
$barChar['Q'] = 'nnnnnnwww'; |
||||
$barChar['R'] = 'wnnnnnwwn'; |
||||
$barChar['S'] = 'nnwnnnwwn'; |
||||
$barChar['T'] = 'nnnnwnwwn'; |
||||
$barChar['U'] = 'wwnnnnnnw'; |
||||
$barChar['V'] = 'nwwnnnnnw'; |
||||
$barChar['W'] = 'wwwnnnnnn'; |
||||
$barChar['X'] = 'nwnnwnnnw'; |
||||
$barChar['Y'] = 'wwnnwnnnn'; |
||||
$barChar['Z'] = 'nwwnwnnnn'; |
||||
$barChar['-'] = 'nwnnnnwnw'; |
||||
$barChar['.'] = 'wwnnnnwnn'; |
||||
$barChar[' '] = 'nwwnnnwnn'; |
||||
$barChar['*'] = 'nwnnwnwnn'; |
||||
$barChar['$'] = 'nwnwnwnnn'; |
||||
$barChar['/'] = 'nwnwnnnwn'; |
||||
$barChar['+'] = 'nwnnnwnwn'; |
||||
$barChar['%'] = 'nnnwnwnwn'; |
||||
|
||||
$xpos_dep = $xpos; |
||||
$code = '*'.strtoupper($code).'*'; |
||||
for($i=0; $i<strlen($code); $i++){ |
||||
$char = $code{$i}; |
||||
if(!isset($barChar[$char])){ |
||||
$this->Error('Invalid character in barcode: '.$char); |
||||
} |
||||
$seq = $barChar[$char]; |
||||
for($bar=0; $bar<9; $bar++){ |
||||
if($seq{$bar} == 'n'){ |
||||
$lineWidth = $narrow; |
||||
}else{ |
||||
$lineWidth = $wide; |
||||
} |
||||
if($bar % 2 == 0){ |
||||
$this->Rect($xpos, $ypos, $lineWidth, $height, 'F'); |
||||
} |
||||
$xpos += $lineWidth; |
||||
} |
||||
$xpos += $gap; |
||||
} |
||||
|
||||
$code_w = $xpos-$xpos_dep; |
||||
$code_t = $code; |
||||
|
||||
$code_f = $code_w/strlen($code_t)*$this->k/0.60/3; |
||||
$code_h = $height+$code_f/$this->k; |
||||
|
||||
//Print text uder barcode |
||||
$this->SetFont('Arial','',$code_f); |
||||
$this->Text($xpos_dep,$ypos+$height+0.90*$code_f/$this->k,$code_t); |
||||
|
||||
return array($code_w, $code_h); |
||||
} |
||||
} |
||||
} |
||||
?> |
||||
<?php |
||||
/************************************************************************* |
||||
* http://www.fpdf.org/en/script/script5.php |
||||
* |
||||
* @author Olivier |
||||
* |
||||
* This script implements EAN13 and UPC-A barcodes (the second being a particular case of the first one). Bars are drawn directly in the PDF (no image is generated). |
||||
* EAN13(float x, float y, string barcode [, float h [, float w]]) |
||||
* x: abscissa of barcode. |
||||
* y: ordinate of barcode. |
||||
* barcode: value of barcode. |
||||
* h: height of barcode. Default value: 16. |
||||
* w: width of a bar. Default value: 0.35. |
||||
* |
||||
* UPC_A(float x, float y, string barcode [, float h [, float w]]) |
||||
* |
||||
* Same parameters. |
||||
* |
||||
* An EAN13 barcode is made up of 13 digits, UPC-A of 12 (leading zeroes are added if necessary). The last digit is a check digit; if it's not supplied, it will be automatically computed. |
||||
************************************************************************/ |
||||
|
||||
/************************************************************************* |
||||
* http://www.fpdf.org/en/script/script46.php |
||||
* |
||||
* @author The-eh |
||||
* |
||||
* This script implements Code 39 barcodes. A Code 39 barcode can encode a string with the following characters: digits (0 to 9), uppercase letters (A to Z) and 8 additional characters (- . space $ / + % *). |
||||
* Code39(float xpos, float ypos, string code [, float baseline [, float height]]) |
||||
* xpos: abscissa of barcode |
||||
* ypos: ordinate of barcode |
||||
* code: value of barcode |
||||
* height: bar height |
||||
* baseline: corresponds to the width of a wide bar |
||||
************************************************************************/ |
||||
|
||||
|
||||
if (!defined('__CLASS_FPDF_CODEBAR__')) |
||||
{ |
||||
define('__CLASS_FPDF_CODEBAR__', true); |
||||
|
||||
require_once(dirname(__FILE__).'/../_fpdf/fpdf.php'); |
||||
|
||||
class FPDF_Codebar extends FPDF |
||||
{ |
||||
var $footer_param = array(); |
||||
|
||||
function FPDF_Codebar($sens = 'P', $unit = 'mm', $format = 'A4') |
||||
{ |
||||
$this->FPDF($sens, $unit, $format); |
||||
} |
||||
|
||||
function BARCODE_EAN13($x,$y,$barcode,$h=10,$w=.35) |
||||
{ |
||||
return $this->Barcode($x,$y,$barcode,$h,$w,13); |
||||
} |
||||
|
||||
function BARCODE_UPC_A($x,$y,$barcode,$h=10,$w=.35) |
||||
{ |
||||
return $this->Barcode($x,$y,$barcode,$h,$w,12); |
||||
} |
||||
|
||||
function GetCheckDigit($barcode) |
||||
{ |
||||
//Compute the check digit |
||||
$sum=0; |
||||
for($i=1;$i<=11;$i+=2) |
||||
$sum+=3*$barcode{$i}; |
||||
for($i=0;$i<=10;$i+=2) |
||||
$sum+=$barcode{$i}; |
||||
$r=$sum%10; |
||||
if($r>0) |
||||
$r=10-$r; |
||||
return $r; |
||||
} |
||||
|
||||
function TestCheckDigit($barcode) |
||||
{ |
||||
//Test validity of check digit |
||||
$sum=0; |
||||
for($i=1;$i<=11;$i+=2) |
||||
$sum+=3*$barcode{$i}; |
||||
for($i=0;$i<=10;$i+=2) |
||||
$sum+=$barcode{$i}; |
||||
return ($sum+$barcode{12})%10==0; |
||||
} |
||||
|
||||
function Barcode($x,$y,$barcode,$h,$w,$len) |
||||
{ |
||||
//Padding |
||||
$barcode=str_pad($barcode,$len-1,'0',STR_PAD_LEFT); |
||||
if($len==12) |
||||
$barcode='0'.$barcode; |
||||
//Add or control the check digit |
||||
if(strlen($barcode)==12) |
||||
$barcode.=$this->GetCheckDigit($barcode); |
||||
elseif(!$this->TestCheckDigit($barcode)) |
||||
$this->Error('Incorrect check digit'); |
||||
//Convert digits to bars |
||||
$codes=array( |
||||
'A'=>array( |
||||
'0'=>'0001101','1'=>'0011001','2'=>'0010011','3'=>'0111101','4'=>'0100011', |
||||
'5'=>'0110001','6'=>'0101111','7'=>'0111011','8'=>'0110111','9'=>'0001011'), |
||||
'B'=>array( |
||||
'0'=>'0100111','1'=>'0110011','2'=>'0011011','3'=>'0100001','4'=>'0011101', |
||||
'5'=>'0111001','6'=>'0000101','7'=>'0010001','8'=>'0001001','9'=>'0010111'), |
||||
'C'=>array( |
||||
'0'=>'1110010','1'=>'1100110','2'=>'1101100','3'=>'1000010','4'=>'1011100', |
||||
'5'=>'1001110','6'=>'1010000','7'=>'1000100','8'=>'1001000','9'=>'1110100') |
||||
); |
||||
$parities=array( |
||||
'0'=>array('A','A','A','A','A','A'), |
||||
'1'=>array('A','A','B','A','B','B'), |
||||
'2'=>array('A','A','B','B','A','B'), |
||||
'3'=>array('A','A','B','B','B','A'), |
||||
'4'=>array('A','B','A','A','B','B'), |
||||
'5'=>array('A','B','B','A','A','B'), |
||||
'6'=>array('A','B','B','B','A','A'), |
||||
'7'=>array('A','B','A','B','A','B'), |
||||
'8'=>array('A','B','A','B','B','A'), |
||||
'9'=>array('A','B','B','A','B','A') |
||||
); |
||||
$code='101'; |
||||
$p=$parities[$barcode{0}]; |
||||
for($i=1;$i<=6;$i++) |
||||
$code.=$codes[$p[$i-1]][$barcode{$i}]; |
||||
$code.='01010'; |
||||
for($i=7;$i<=12;$i++) |
||||
$code.=$codes['C'][$barcode{$i}]; |
||||
$code.='101'; |
||||
//Draw bars |
||||
for($i=0;$i<strlen($code);$i++) |
||||
{ |
||||
if($code{$i}=='1') |
||||
$this->Rect($x+$i*$w,$y,$w,$h,'F'); |
||||
} |
||||
|
||||
$code_w = strlen($code)*$w; |
||||
$code_t = substr($barcode,-$len); |
||||
|
||||
$code_f = $code_w/strlen($code_t)*$this->k/0.60; |
||||
$code_h = $h+$code_f/$this->k; |
||||
|
||||
//Print text uder barcode |
||||
$this->SetFont('Arial','',$code_f); |
||||
$this->Text($x,$y+$h+0.90*$code_f/$this->k,$code_t); |
||||
|
||||
return array($code_w, $code_h); |
||||
} |
||||
|
||||
function BARCODE_CODE39($xpos, $ypos, $code,$height=10, $baseline=0.5 ) |
||||
{ |
||||
|
||||
$wide = $baseline; |
||||
$narrow = $baseline / 3 ; |
||||
$gap = $narrow; |
||||
|
||||
$barChar['0'] = 'nnnwwnwnn'; |
||||
$barChar['1'] = 'wnnwnnnnw'; |
||||
$barChar['2'] = 'nnwwnnnnw'; |
||||
$barChar['3'] = 'wnwwnnnnn'; |
||||
$barChar['4'] = 'nnnwwnnnw'; |
||||
$barChar['5'] = 'wnnwwnnnn'; |
||||
$barChar['6'] = 'nnwwwnnnn'; |
||||
$barChar['7'] = 'nnnwnnwnw'; |
||||
$barChar['8'] = 'wnnwnnwnn'; |
||||
$barChar['9'] = 'nnwwnnwnn'; |
||||
$barChar['A'] = 'wnnnnwnnw'; |
||||
$barChar['B'] = 'nnwnnwnnw'; |
||||
$barChar['C'] = 'wnwnnwnnn'; |
||||
$barChar['D'] = 'nnnnwwnnw'; |
||||
$barChar['E'] = 'wnnnwwnnn'; |
||||
$barChar['F'] = 'nnwnwwnnn'; |
||||
$barChar['G'] = 'nnnnnwwnw'; |
||||
$barChar['H'] = 'wnnnnwwnn'; |
||||
$barChar['I'] = 'nnwnnwwnn'; |
||||
$barChar['J'] = 'nnnnwwwnn'; |
||||
$barChar['K'] = 'wnnnnnnww'; |
||||
$barChar['L'] = 'nnwnnnnww'; |
||||
$barChar['M'] = 'wnwnnnnwn'; |
||||
$barChar['N'] = 'nnnnwnnww'; |
||||
$barChar['O'] = 'wnnnwnnwn'; |
||||
$barChar['P'] = 'nnwnwnnwn'; |
||||
$barChar['Q'] = 'nnnnnnwww'; |
||||
$barChar['R'] = 'wnnnnnwwn'; |
||||
$barChar['S'] = 'nnwnnnwwn'; |
||||
$barChar['T'] = 'nnnnwnwwn'; |
||||
$barChar['U'] = 'wwnnnnnnw'; |
||||
$barChar['V'] = 'nwwnnnnnw'; |
||||
$barChar['W'] = 'wwwnnnnnn'; |
||||
$barChar['X'] = 'nwnnwnnnw'; |
||||
$barChar['Y'] = 'wwnnwnnnn'; |
||||
$barChar['Z'] = 'nwwnwnnnn'; |
||||
$barChar['-'] = 'nwnnnnwnw'; |
||||
$barChar['.'] = 'wwnnnnwnn'; |
||||
$barChar[' '] = 'nwwnnnwnn'; |
||||
$barChar['*'] = 'nwnnwnwnn'; |
||||
$barChar['$'] = 'nwnwnwnnn'; |
||||
$barChar['/'] = 'nwnwnnnwn'; |
||||
$barChar['+'] = 'nwnnnwnwn'; |
||||
$barChar['%'] = 'nnnwnwnwn'; |
||||
|
||||
$xpos_dep = $xpos; |
||||
$code = '*'.strtoupper($code).'*'; |
||||
for($i=0; $i<strlen($code); $i++){ |
||||
$char = $code{$i}; |
||||
if(!isset($barChar[$char])){ |
||||
$this->Error('Invalid character in barcode: '.$char); |
||||
} |
||||
$seq = $barChar[$char]; |
||||
for($bar=0; $bar<9; $bar++){ |
||||
if($seq{$bar} == 'n'){ |
||||
$lineWidth = $narrow; |
||||
}else{ |
||||
$lineWidth = $wide; |
||||
} |
||||
if($bar % 2 == 0){ |
||||
$this->Rect($xpos, $ypos, $lineWidth, $height, 'F'); |
||||
} |
||||
$xpos += $lineWidth; |
||||
} |
||||
$xpos += $gap; |
||||
} |
||||
|
||||
$code_w = $xpos-$xpos_dep; |
||||
$code_t = $code; |
||||
|
||||
$code_f = $code_w/strlen($code_t)*$this->k/0.60/3; |
||||
$code_h = $height+$code_f/$this->k; |
||||
|
||||
//Print text uder barcode |
||||
$this->SetFont('Arial','',$code_f); |
||||
$this->Text($xpos_dep,$ypos+$height+0.90*$code_f/$this->k,$code_t); |
||||
|
||||
return array($code_w, $code_h); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,326 @@ |
||||
<?php |
||||
/************************************************************************* |
||||
* http://staff.dasdeck.de/valentin/fpdf/fpdf_alpha/ |
||||
* |
||||
* @author Valentin Schmidt |
||||
* |
||||
* This script allows to use images (PNGs or JPGs) with alpha-channels. |
||||
* The alpha-channel can be either supplied as separate 8-bit PNG ("mask"), |
||||
* or, for PNGs, also an internal alpha-channel can be used. |
||||
* For the latter, the GD 2.x extension is required. |
||||
************************************************************************/ |
||||
|
||||
|
||||
if (!defined('__CLASS_FPDF_ALPHA__')) |
||||
{ |
||||
define('__CLASS_FPDF_ALPHA__', true); |
||||
|
||||
require_once(dirname(__FILE__).'/02_fpdf_formulaire.class.php'); |
||||
|
||||
class FPDF_Alpha extends FPDF_Formulaire |
||||
{ |
||||
var $tmpFiles = array(); |
||||
|
||||
function FPDF_Alpha($orientation='P',$unit='mm',$format='A4') |
||||
{ |
||||
$this->FPDF_Formulaire($orientation,$unit,$format); |
||||
} |
||||
|
||||
/* Public methods */ |
||||
function Image($file,$x,$y,$w=0,$h=0,$type='',$link='', $isMask=false, $maskImg=0) |
||||
{ |
||||
//Put an image on the page |
||||
if(!isset($this->images[$file])) |
||||
{ |
||||
//First use of image, get info |
||||
if($type=='') |
||||
{ |
||||
/* MODIFICATION HTML2PDF pour le support des images PHP */ |
||||
$type = explode('?', $file); |
||||
$type = pathinfo($type[0]); |
||||
if (!isset($type['extension']) || !$type['extension']) |
||||
$this->Error('Image file has no extension and no type was specified: '.$file); |
||||
|
||||
$type = $type['extension']; |
||||
/* FIN MODIFICATION */ |
||||
/* |
||||
$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); |
||||
|
||||
/* MODIFICATION HTML2PDF pour le support des images PHP et CGI*/ |
||||
if ($type=='php' || $type=='cgi') |
||||
{ |
||||
// identification des infos |
||||
$infos=@GetImageSize($file); |
||||
if (!$infos) $this->Error('Unsupported image : '.$file); |
||||
|
||||
// identification du type |
||||
$type = explode('/', $infos['mime']); |
||||
if ($type[0]!='image') $this->Error('Unsupported image : '.$file); |
||||
$type = $type[1]; |
||||
} |
||||
/* FIN MODIFICATION */ |
||||
|
||||
// $mqr=get_magic_quotes_runtime(); |
||||
// set_magic_quotes_runtime(0); |
||||
if($type=='jpg' || $type=='jpeg') |
||||
$info=$this->_parsejpg($file); |
||||
elseif($type=='png') |
||||
{ |
||||
$info=$this->_parsepng($file); |
||||
if ($info=='alpha') |
||||
return $this->ImagePngWithAlpha($file,$x,$y,$w,$h,$link); |
||||
} |
||||
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); |
||||
|
||||
if ($isMask) |
||||
{ |
||||
$info['cs']="DeviceGray"; // try to force grayscale (instead of indexed) |
||||
} |
||||
$info['i']=count($this->images)+1; |
||||
if ($maskImg>0) $info['masked'] = $maskImg;### |
||||
$this->images[$file]=$info; |
||||
} |
||||
else |
||||
$info=$this->images[$file]; |
||||
|
||||
//Automatic width and height calculation if needed |
||||
if($w==0 && $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']; |
||||
|
||||
if ($isMask) // embed hidden, ouside the canvas |
||||
{ |
||||
$x = ($this->CurOrientation=='P'?$this->CurPageFormat[0]*2:$this->CurPageFormat[1]*2) + 10; |
||||
} |
||||
else // modification by spipu :) pas besoin de tracer l'image si c'est pour faire un mask !!!! |
||||
{ |
||||
$this->_out(sprintf('q %.2f 0 0 %.2f %.2f %.2f cm /I%d Do Q',$w*$this->k,$h*$this->k,$x*$this->k,($this->h-($y+$h))*$this->k,$info['i'])); |
||||
if($link) $this->Link($x,$y,$w,$h,$link); |
||||
} |
||||
|
||||
return $info['i']; |
||||
} |
||||
|
||||
// needs GD 2.x extension |
||||
// pixel-wise operation, not very fast |
||||
function ImagePngWithAlpha($file,$x,$y,$w=0,$h=0,$link='') |
||||
{ |
||||
$tmp_alpha = tempnam('.', 'mska'); |
||||
$this->tmpFiles[] = $tmp_alpha; |
||||
$tmp_plain = tempnam('.', 'mskp'); |
||||
$this->tmpFiles[] = $tmp_plain; |
||||
|
||||
list($wpx, $hpx) = @getimagesize($file); |
||||
$img = imagecreatefrompng($file); |
||||
$alpha_img = imagecreate( $wpx, $hpx ); |
||||
|
||||
// generate gray scale pallete |
||||
for($c=0;$c<256;$c++) ImageColorAllocate($alpha_img, $c, $c, $c); |
||||
|
||||
// extract alpha channel |
||||
$xpx=0; |
||||
while ($xpx<$wpx) |
||||
{ |
||||
$ypx = 0; |
||||
while ($ypx<$hpx) |
||||
{ |
||||
$color_index = imagecolorat($img, $xpx, $ypx); |
||||
$col = imagecolorsforindex($img, $color_index); |
||||
imagesetpixel($alpha_img, $xpx, $ypx, $this->_gamma( (127-$col['alpha'])*255/127) ); |
||||
++$ypx; |
||||
} |
||||
++$xpx; |
||||
} |
||||
|
||||
imagepng($alpha_img, $tmp_alpha); |
||||
imagedestroy($alpha_img); |
||||
|
||||
// extract image without alpha channel |
||||
$plain_img = imagecreatetruecolor ( $wpx, $hpx ); |
||||
imagecopy ($plain_img, $img, 0, 0, 0, 0, $wpx, $hpx ); |
||||
imagepng($plain_img, $tmp_plain); |
||||
imagedestroy($plain_img); |
||||
|
||||
//first embed mask image (w, h, x, will be ignored) |
||||
$maskImg = $this->Image($tmp_alpha, 0,0,0,0, 'PNG', '', true); |
||||
|
||||
//embed image, masked with previously embedded mask |
||||
$this->Image($tmp_plain,$x,$y,$w,$h,'PNG',$link, false, $maskImg); |
||||
} |
||||
|
||||
function Close() |
||||
{ |
||||
parent::Close(); |
||||
// clean up tmp files |
||||
foreach($this->tmpFiles as $tmp) @unlink($tmp); |
||||
} |
||||
|
||||
/* Private methods */ |
||||
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('<</Type /XObject'); |
||||
$this->_out('/Subtype /Image'); |
||||
$this->_out('/Width '.$info['w']); |
||||
$this->_out('/Height '.$info['h']); |
||||
|
||||
if (isset($info["masked"])) $this->_out('/SMask '.($this->n-1).' 0 R'); ### |
||||
|
||||
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']); |
||||
if(isset($info['f'])) |
||||
$this->_out('/Filter /'.$info['f']); |
||||
if(isset($info['parms'])) |
||||
$this->_out($info['parms']); |
||||
if(isset($info['trns']) && is_array($info['trns'])) |
||||
{ |
||||
$trns=''; |
||||
for($i=0;$i<count($info['trns']);$i++) |
||||
$trns.=$info['trns'][$i].' '.$info['trns'][$i].' '; |
||||
$this->_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'); |
||||
} |
||||
} |
||||
} |
||||
|
||||
// GD seems to use a different gamma, this method is used to correct it again |
||||
function _gamma($v) |
||||
{ |
||||
return pow ($v/255, 2.2) * 255; |
||||
} |
||||
|
||||
// this method overwriing the original version is only needed to make the Image method support PNGs with alpha channels. |
||||
// if you only use the ImagePngWithAlpha method for such PNGs, you can remove it from this script. |
||||
function _parsepng($file) |
||||
{ |
||||
//Extract info from a PNG file |
||||
$f=fopen($file,'rb'); |
||||
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->_readint($f); |
||||
$h=$this->_readint($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 |
||||
{ |
||||
fclose($f); // the only changes are |
||||
return 'alpha'; // made in those 2 lines |
||||
} |
||||
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 <</Predictor 15 /Colors '.($ct==2 ? 3 : 1).' /BitsPerComponent '.$bpc.' /Columns '.$w.'>>'; |
||||
//Scan chunks looking for palette, transparency and image data |
||||
$pal=''; |
||||
$trns=''; |
||||
$data=''; |
||||
do |
||||
{ |
||||
$n=$this->_readint($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($pos!==false) |
||||
$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' && 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); |
||||
} |
||||
|
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,19 @@ |
||||
err01 Tag <b><[[OTHER]]></b> endnu ikke eksisterer.<br><br>Hvis du ønsker at tilføje det, skal du oprette de metoder <b>o_[[OTHER]]</b> (for åbning) og <b>c_[[OTHER]]</b> (for lukning) ved at følge den model af eksisterende tags.<br><br>Hvis du opretter disse metoder, så tøv ikke med at send mig en e-mail til webmaster@spipu.net til indsat dem i den næste version af HTML2PDF. |
||||
err02 Sætning af 1000 lines => er for lang<br><b>sætning :</b> [[OTHER_0]]<br><b>Bredde boksen :</b> [[OTHER_1]]<br><b>Længde tekst :</b> [[OTHER_2]]<br> |
||||
err03 HTML-kode er ugyldig, et tag er lukket for mange gange: <b><[[OTHER]]></b> |
||||
err04 HTML-kode er ugyldig, tags er ikke afsluttet på en ordentlig måde.<br>Status : <pre>[[OTHER]]</pre> |
||||
err05 HTML-kode er ugyldig, alle tags skal lukkes. <br>Status : <pre>[[OTHER]]</pre> |
||||
err06 Umuligt at indlæse billedet <b>[[OTHER]]</b> |
||||
err07 Indholdet af en TD tag ikke passer på én side |
||||
txt01 FEJL n° |
||||
txt02 File : |
||||
txt03 Linje : |
||||
pdf01 Siden oprettet d. [[date_y]]-[[date_m]]-[[date_d]] |
||||
pdf02 Siden oprettet d. [[date_h]]:[[date_i]] |
||||
pdf03 Siden oprettet d. [[date_y]]-[[date_m]]-[[date_d]] at [[date_h]]:[[date_i]] |
||||
pdf04 Side [[current]]/[[nb]] |
||||
pdf05 De formularer kræver brug af Adobe Reader 9 |
||||
vue01 HEADER |
||||
vue02 FOOTER |
||||
vue03 PAGE |
||||
vue04 View |
@ -1,19 +1,19 @@ |
||||
err01 De tag <b><[[OTHER]]></b> bestaat nog niet.<br><br>Om deze toe te voegen, gebruik de methods <b>o_[[OTHER]]</b> (om te openen) en <b>c_[[OTHER]]</b> (om te sluiten) volgens het model van de bestaande tags.<br><br>Als u deze methods maakt, stuur deze dan a.u.b. via e-mail naar webmaster@spipu.net voor opname in de volgende versie van HTML2PDF. |
||||
err02 Zin van 1000 regels => te lang<br><b>Zin :</b> [[OTHER_0]]<br><b>Kaderbreedte :</b> [[OTHER_1]]<br><b>Tekstlengte :</b> [[OTHER_2]]<br> |
||||
err03 Ongeldige HTML code, overvloedig afgesloten tag : <b><[[OTHER]]></b> |
||||
err04 Ongeldige HTML code, de tags zijn niet correct afgesloten.<br>Status : <pre>[[OTHER]]</pre> |
||||
err05 Ongeldige HTML code, alle tags dienen te zijn gesloten.<br>Status : <pre>[[OTHER]]</pre> |
||||
err06 Kan afbeelding niet laden: <b>[[OTHER]]</b> |
||||
err07 De inhoud van de cel (<TD>) past niet op een pagina |
||||
txt01 Fout nr |
||||
txt02 Bestand : |
||||
txt03 Regel : |
||||
pdf01 Document gemaakt op [[date_d]]-[[date_m]]-[[date_y]] |
||||
pdf02 Document gemaakt om [[date_h]]:[[date_i]] |
||||
pdf03 Document gemaakt op [[date_d]]-[[date_m]]-[[date_y]] om [[date_h]]:[[date_i]] |
||||
pdf04 Pagina [[current]] van [[nb]] |
||||
pdf05 De formulieren vereisen het gebruik van Adobe Reader 9 |
||||
vue01 Paginakop |
||||
vue02 Paginavoet |
||||
vue03 Pagina |
||||
vue04 Bekijken |
||||
err01 De tag <b><[[OTHER]]></b> bestaat nog niet.<br><br>Om deze toe te voegen, gebruik de methods <b>o_[[OTHER]]</b> (om te openen) en <b>c_[[OTHER]]</b> (om te sluiten) volgens het model van de bestaande tags.<br><br>Als u deze methods maakt, stuur deze dan a.u.b. via e-mail naar webmaster@spipu.net voor opname in de volgende versie van HTML2PDF. |
||||
err02 Zin van 1000 regels => te lang<br><b>Zin :</b> [[OTHER_0]]<br><b>Kaderbreedte :</b> [[OTHER_1]]<br><b>Tekstlengte :</b> [[OTHER_2]]<br> |
||||
err03 Ongeldige HTML code, overvloedig afgesloten tag : <b><[[OTHER]]></b> |
||||
err04 Ongeldige HTML code, de tags zijn niet correct afgesloten.<br>Status : <pre>[[OTHER]]</pre> |
||||
err05 Ongeldige HTML code, alle tags dienen te zijn gesloten.<br>Status : <pre>[[OTHER]]</pre> |
||||
err06 Kan afbeelding niet laden: <b>[[OTHER]]</b> |
||||
err07 De inhoud van de cel (<TD>) past niet op een pagina |
||||
txt01 Fout nr |
||||
txt02 Bestand : |
||||
txt03 Regel : |
||||
pdf01 Document gemaakt op [[date_d]]-[[date_m]]-[[date_y]] |
||||
pdf02 Document gemaakt om [[date_h]]:[[date_i]] |
||||
pdf03 Document gemaakt op [[date_d]]-[[date_m]]-[[date_y]] om [[date_h]]:[[date_i]] |
||||
pdf04 Pagina [[current]] van [[nb]] |
||||
pdf05 De formulieren vereisen het gebruik van Adobe Reader 9 |
||||
vue01 Paginakop |
||||
vue02 Paginavoet |
||||
vue03 Pagina |
||||
vue04 Bekijken |
||||
|
@ -0,0 +1,47 @@ |
||||
<?php |
||||
/* |
||||
* ATTENTION : |
||||
* Vous devez télécharger la librairie "QR-code generator >=0.97" (sous licence LGPL) |
||||
* a cette adresse : http://prgm.spipu.net/php_qrcode |
||||
* et mettre tout son contenu dans ce repertoire (qrcode) |
||||
* en remplacant également ce fichier (qrcode.class.php) |
||||
* |
||||
* WARNING: |
||||
* You have to download the librairy "QR-code generator >=0.97" (under LGPL licence) |
||||
* at this url : http://prgm.spipu.net/php_qrcode |
||||
* and to put all his content in this folder (qrcode) |
||||
* and to replace also this file (qrcode.class.php) |
||||
*/ |
||||
|
||||
if (!defined('__CLASS_QRCODE__')) |
||||
{ |
||||
define('__CLASS_QRCODE__', true); |
||||
|
||||
class QRcode |
||||
{ |
||||
public function __construct($value, $level='L') |
||||
{ |
||||
echo ' |
||||
<pre> |
||||
<b>ATTENTION :</b> |
||||
Vous devez télécharger la librairie "QR-code generator >=0.97" (sous licence LGPL) |
||||
a cette adresse : <a href="http://prgm.spipu.net/php_qrcode" target="_blank">http://prgm.spipu.net/php_qrcode</a> |
||||
et mettre tout son contenu dans ce repertoire : '.dirname(__FILE__).' |
||||
en remplacant également ce fichier : '.basename(__FILE__).' |
||||
|
||||
<b>WARNING:</b> |
||||
You have to download the librairy "QR-code generator >=0.97" (under LGPL licence) |
||||
at this url : <a href="http://prgm.spipu.net/php_qrcode" target="_blank">http://prgm.spipu.net/php_qrcode</a> |
||||
and to put all his contents in this folder '.dirname(__FILE__).' |
||||
and to replace also this file : '.basename(__FILE__).' |
||||
</pre>'; |
||||
exit; |
||||
} |
||||
|
||||
public function getQrSize() { return 0; } |
||||
public function disableBorder() { } |
||||
public function displayFPDF(&$fpdf, $x, $y, $s, $background=array(255,255,255), $color=array(0,0,0)) { return true; } |
||||
public function displayHTML() { return true; } |
||||
public function displayPNG($s=4, $background=array(255,255,255), $color=array(0,0,0), $filename = null, $quality = 0) { return true; } |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue