Completed
Push — master ( f161aa...d0d50d )
by
unknown
15:24
created
librairies/HTML2PDF/_tcpdf_5.0.002/fonts/dejavuserifcondensedbi.php 2 patches
Spacing   +298 added lines, -298 removed lines patch added patch discarded remove patch
@@ -1,299 +1,299 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
2
-$type='TrueTypeUnicode';
3
-$name='DejaVuSerifCondensed-BoldItalic';
4
-$desc=array('Ascent'=>939,'Descent'=>-236,'CapHeight'=>-48,'Flags'=>96,'FontBBox'=>'[-815 -389 1584 1235]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>540);
5
-$up=-63;
6
-$ut=44;
7
-$dw=540;
8
-$cw=array(
9
-0=>540,32=>313,33=>395,34=>469,35=>754,36=>626,37=>855,38=>813,39=>275,40=>426,
10
-41=>426,42=>470,43=>754,44=>313,45=>374,46=>313,47=>329,48=>626,49=>626,50=>626,
11
-51=>626,52=>626,53=>626,54=>626,55=>626,56=>626,57=>626,58=>332,59=>332,60=>754,
12
-61=>754,62=>754,63=>527,64=>900,65=>698,66=>760,67=>716,68=>780,69=>686,70=>639,
13
-71=>769,72=>850,73=>421,74=>426,75=>782,76=>633,77=>996,78=>822,79=>784,80=>677,
14
-81=>784,82=>748,83=>650,84=>669,85=>785,86=>698,87=>1011,88=>698,89=>642,90=>657,
15
-91=>426,92=>329,93=>426,94=>754,95=>450,96=>450,97=>583,98=>629,99=>548,100=>629,
16
-101=>572,102=>387,103=>629,104=>654,105=>342,106=>325,107=>624,108=>342,109=>952,110=>654,
17
-111=>600,112=>629,113=>629,114=>474,115=>506,116=>416,117=>654,118=>523,119=>774,120=>536,
18
-121=>523,122=>511,123=>579,124=>327,125=>579,126=>754,8364=>626,8218=>313,402=>387,8222=>518,
19
-8230=>900,8224=>470,8225=>470,710=>450,8240=>1246,352=>650,8249=>360,338=>1062,381=>657,8216=>313,
20
-8217=>313,8220=>518,8221=>518,8226=>575,8211=>450,8212=>900,732=>450,8482=>900,353=>506,8250=>360,
21
-339=>925,382=>511,376=>642,160=>313,161=>395,162=>626,163=>626,164=>572,165=>626,166=>327,
22
-167=>470,168=>450,169=>900,170=>438,171=>563,172=>754,173=>374,174=>900,175=>450,176=>450,
23
-177=>754,178=>394,179=>394,180=>450,181=>659,182=>572,183=>313,184=>450,185=>394,186=>450,
24
-187=>563,188=>938,189=>938,190=>938,191=>527,192=>698,193=>698,194=>698,195=>698,196=>698,
25
-197=>698,198=>931,199=>716,200=>686,201=>686,202=>686,203=>686,204=>421,205=>421,206=>421,
26
-207=>421,208=>787,209=>822,210=>784,211=>784,212=>784,213=>784,214=>784,215=>754,216=>784,
27
-217=>785,218=>785,219=>785,220=>785,221=>642,222=>681,223=>684,224=>583,225=>583,226=>583,
28
-227=>583,228=>583,229=>583,230=>838,231=>548,232=>572,233=>572,234=>572,235=>572,236=>342,
29
-237=>342,238=>342,239=>342,240=>600,241=>654,242=>600,243=>600,244=>600,245=>600,246=>600,
30
-247=>754,248=>600,249=>654,250=>654,251=>654,252=>654,253=>523,254=>629,255=>523,256=>698,
31
-257=>583,258=>698,259=>583,260=>698,261=>583,262=>716,263=>548,264=>716,265=>548,266=>716,
32
-267=>548,268=>716,269=>548,270=>780,271=>629,272=>787,273=>629,274=>686,275=>572,276=>686,
33
-277=>572,278=>686,279=>572,280=>686,281=>572,282=>686,283=>572,284=>769,285=>629,286=>769,
34
-287=>629,288=>769,289=>629,290=>769,291=>629,292=>850,293=>654,294=>850,295=>654,296=>421,
35
-297=>342,298=>421,299=>342,300=>421,301=>342,302=>421,303=>342,304=>421,305=>342,306=>848,
36
-307=>676,308=>426,309=>325,310=>782,311=>624,312=>624,313=>633,314=>342,315=>633,316=>342,
37
-317=>633,318=>457,319=>633,320=>501,321=>639,322=>346,323=>822,324=>654,325=>822,326=>654,
38
-327=>822,328=>654,329=>907,330=>785,331=>654,332=>784,333=>600,334=>784,335=>600,336=>784,
39
-337=>600,340=>748,341=>474,342=>748,343=>474,344=>748,345=>474,346=>650,347=>506,348=>650,
40
-349=>506,350=>650,351=>506,354=>669,355=>416,356=>669,357=>416,358=>669,359=>416,360=>785,
41
-361=>654,362=>785,363=>654,364=>785,365=>654,366=>785,367=>654,368=>785,369=>654,370=>785,
42
-371=>654,372=>1011,373=>774,374=>642,375=>523,377=>657,378=>511,379=>657,380=>511,383=>387,
43
-384=>629,385=>760,386=>769,387=>629,388=>769,389=>629,390=>716,391=>716,392=>548,393=>787,
44
-394=>780,395=>769,396=>629,397=>600,398=>686,399=>784,400=>649,401=>639,403=>769,404=>693,
45
-405=>938,406=>421,407=>421,408=>782,409=>624,410=>342,411=>631,412=>952,413=>822,414=>654,
46
-415=>784,416=>784,417=>600,418=>1080,419=>849,420=>677,421=>629,422=>748,423=>650,424=>506,
47
-425=>636,426=>298,427=>416,428=>669,429=>416,430=>669,431=>785,432=>654,433=>801,434=>801,
48
-435=>642,436=>628,437=>657,438=>511,439=>591,440=>591,441=>591,443=>626,444=>678,445=>511,
49
-446=>482,448=>265,449=>443,450=>413,451=>265,452=>1437,453=>1292,454=>1140,455=>1059,456=>958,
50
-457=>667,458=>1248,459=>1148,460=>980,461=>698,462=>583,463=>421,464=>342,465=>784,466=>600,
51
-467=>785,468=>654,469=>785,470=>654,471=>785,472=>654,473=>785,474=>654,475=>785,476=>654,
52
-477=>572,478=>698,479=>583,480=>698,481=>583,482=>931,483=>877,484=>806,485=>629,486=>769,
53
-487=>629,488=>782,489=>624,490=>784,491=>600,492=>784,493=>600,494=>591,495=>511,496=>325,
54
-497=>1437,498=>1292,499=>1140,500=>769,501=>629,502=>1099,504=>822,505=>654,506=>698,507=>583,
55
-508=>931,509=>838,510=>784,511=>600,512=>698,513=>583,514=>698,515=>583,516=>686,517=>572,
56
-518=>686,519=>572,520=>421,521=>342,522=>421,523=>342,524=>784,525=>600,526=>784,527=>600,
57
-528=>748,529=>474,530=>748,531=>474,532=>785,533=>654,534=>785,535=>654,536=>650,537=>506,
58
-538=>669,539=>416,540=>621,541=>546,542=>850,543=>654,544=>785,545=>711,548=>657,549=>511,
59
-550=>698,551=>583,552=>686,553=>572,554=>784,555=>600,556=>784,557=>600,558=>784,559=>600,
60
-560=>784,561=>600,562=>642,563=>523,564=>516,565=>830,566=>508,567=>325,568=>928,569=>928,
61
-570=>698,571=>716,572=>548,573=>633,574=>669,575=>506,576=>511,577=>594,578=>492,581=>698,
62
-592=>583,593=>629,594=>629,595=>629,596=>548,597=>548,598=>629,599=>657,600=>572,601=>572,
63
-602=>816,603=>547,604=>505,605=>816,606=>647,607=>348,608=>629,609=>629,610=>563,611=>641,
64
-612=>564,613=>654,614=>654,615=>654,616=>342,617=>342,618=>342,619=>368,620=>462,621=>342,
65
-622=>716,623=>952,624=>952,625=>952,626=>654,627=>654,628=>641,629=>600,630=>955,631=>674,
66
-632=>600,633=>514,634=>514,635=>514,636=>474,637=>474,638=>406,639=>438,640=>721,641=>721,
67
-642=>506,643=>298,644=>387,645=>486,646=>298,647=>443,648=>416,649=>654,650=>611,651=>624,
68
-652=>523,653=>774,654=>571,655=>654,656=>511,657=>511,658=>511,659=>511,660=>482,661=>482,
69
-662=>482,663=>490,664=>784,665=>625,666=>647,667=>563,668=>659,669=>345,670=>666,671=>581,
70
-672=>629,673=>482,674=>482,675=>1005,676=>1061,677=>1005,678=>819,679=>643,680=>817,681=>935,
71
-682=>711,683=>716,684=>596,685=>398,686=>552,687=>646,688=>469,689=>466,690=>282,691=>372,
72
-692=>372,693=>432,694=>474,695=>488,696=>329,697=>271,699=>313,700=>313,701=>313,702=>330,
73
-703=>330,704=>282,705=>282,711=>450,712=>254,713=>450,716=>254,720=>332,721=>332,722=>330,
74
-723=>330,726=>353,728=>450,729=>450,730=>450,731=>450,733=>450,734=>375,736=>403,737=>263,
75
-738=>355,739=>338,740=>282,741=>450,742=>450,743=>450,744=>450,745=>450,750=>498,768=>0,
76
-769=>0,770=>0,771=>0,772=>0,773=>0,774=>0,775=>0,776=>0,777=>0,778=>0,
77
-779=>0,780=>0,781=>0,782=>0,783=>0,784=>0,785=>0,786=>0,787=>0,788=>0,
78
-789=>0,790=>0,791=>0,792=>0,793=>0,794=>0,795=>0,796=>0,797=>0,798=>0,
79
-799=>0,800=>0,801=>0,802=>0,803=>0,804=>0,805=>0,806=>0,807=>0,808=>0,
80
-809=>0,810=>0,811=>0,812=>0,813=>0,814=>0,815=>0,816=>0,817=>0,818=>0,
81
-819=>0,820=>0,821=>0,822=>0,823=>0,824=>0,825=>0,826=>0,827=>0,828=>0,
82
-829=>0,830=>0,831=>0,835=>0,847=>0,856=>0,865=>0,880=>701,881=>519,884=>271,
83
-885=>271,890=>450,891=>548,892=>548,893=>548,894=>332,900=>450,901=>450,902=>698,903=>313,
84
-904=>852,905=>1022,906=>595,908=>798,910=>857,911=>820,912=>435,913=>698,914=>760,915=>639,
85
-916=>698,917=>686,918=>657,919=>850,920=>784,921=>421,922=>782,923=>698,924=>996,925=>822,
86
-926=>633,927=>784,928=>850,929=>677,931=>636,932=>669,933=>642,934=>784,935=>698,936=>822,
87
-937=>801,938=>421,939=>642,940=>692,941=>547,942=>654,943=>435,944=>624,945=>692,946=>598,
88
-947=>594,948=>600,949=>547,950=>533,951=>654,952=>600,953=>435,954=>674,955=>631,956=>659,
89
-957=>624,958=>533,959=>600,960=>659,961=>598,962=>548,963=>664,964=>605,965=>624,966=>814,
90
-967=>592,968=>847,969=>857,970=>435,971=>624,972=>600,973=>624,974=>857,976=>600,977=>764,
91
-978=>687,979=>872,980=>687,981=>847,982=>857,983=>589,984=>784,985=>600,986=>716,987=>548,
92
-988=>639,989=>475,990=>531,991=>593,992=>716,993=>600,1008=>589,1009=>598,1010=>548,1011=>325,
93
-1012=>784,1013=>548,1014=>548,1015=>681,1016=>629,1017=>716,1018=>996,1019=>774,1020=>623,1021=>716,
94
-1022=>716,1023=>716,1024=>686,1025=>686,1026=>811,1027=>621,1028=>716,1029=>650,1030=>421,1031=>421,
95
-1032=>426,1033=>1081,1034=>1135,1035=>866,1036=>818,1037=>850,1038=>730,1039=>850,1040=>733,1041=>769,
96
-1042=>760,1043=>621,1044=>800,1045=>686,1046=>1181,1047=>649,1048=>850,1049=>850,1050=>818,1051=>795,
97
-1052=>996,1053=>850,1054=>784,1055=>850,1056=>677,1057=>716,1058=>669,1059=>730,1060=>854,1061=>698,
98
-1062=>870,1063=>822,1064=>1141,1065=>1164,1066=>861,1067=>1081,1068=>743,1069=>716,1070=>1158,1071=>793,
99
-1072=>583,1073=>650,1074=>591,1075=>506,1076=>625,1077=>572,1078=>1175,1079=>574,1080=>654,1081=>654,
100
-1082=>609,1083=>659,1084=>855,1085=>656,1086=>600,1087=>654,1088=>629,1089=>548,1090=>952,1091=>538,
101
-1092=>812,1093=>536,1094=>723,1095=>643,1096=>952,1097=>1021,1098=>654,1099=>916,1100=>593,1101=>580,
102
-1102=>901,1103=>716,1104=>572,1105=>572,1106=>646,1107=>506,1108=>548,1109=>506,1110=>342,1111=>342,
103
-1112=>325,1113=>913,1114=>910,1115=>654,1116=>609,1117=>654,1118=>538,1119=>654,1122=>792,1123=>945,
104
-1124=>1076,1125=>867,1130=>1181,1131=>909,1136=>986,1137=>995,1138=>784,1139=>587,1140=>824,1141=>673,
105
-1164=>761,1165=>606,1168=>630,1169=>556,1170=>621,1171=>506,1172=>768,1173=>634,1174=>1181,1175=>1175,
106
-1176=>649,1177=>574,1178=>812,1179=>633,1182=>818,1183=>609,1184=>937,1185=>684,1186=>856,1187=>725,
107
-1188=>1050,1189=>859,1190=>1191,1191=>911,1194=>716,1195=>548,1196=>669,1197=>1028,1198=>642,1199=>515,
108
-1200=>642,1201=>515,1202=>709,1203=>536,1204=>909,1205=>749,1206=>822,1207=>712,1210=>819,1211=>654,
109
-1216=>421,1217=>1181,1218=>1175,1219=>782,1220=>624,1223=>850,1224=>659,1227=>885,1228=>659,1231=>342,
110
-1232=>733,1233=>583,1234=>733,1235=>583,1236=>931,1237=>877,1238=>686,1239=>572,1240=>784,1241=>572,
111
-1242=>784,1243=>572,1244=>1181,1245=>1175,1246=>649,1247=>574,1248=>591,1249=>511,1250=>850,1251=>654,
112
-1252=>850,1253=>654,1254=>784,1255=>600,1256=>784,1257=>600,1258=>784,1259=>600,1260=>716,1261=>580,
113
-1262=>730,1263=>538,1264=>730,1265=>538,1266=>730,1267=>538,1268=>822,1269=>643,1270=>621,1271=>506,
114
-1272=>1081,1273=>916,1296=>649,1297=>574,1298=>795,1299=>659,1300=>1123,1301=>904,1306=>738,1307=>576,
115
-1308=>925,1309=>770,4256=>688,4257=>851,4258=>788,4259=>795,4260=>712,4261=>979,4262=>921,4263=>1100,
116
-4264=>587,4265=>745,4266=>955,4267=>954,4268=>725,4269=>1030,4270=>880,4271=>820,4272=>1007,4273=>721,
117
-4274=>689,4275=>977,4276=>887,4277=>968,4278=>738,4279=>758,4280=>748,4281=>759,4282=>826,4283=>978,
118
-4284=>701,4285=>748,4286=>740,4287=>1008,4288=>1019,4289=>730,4290=>812,4291=>730,4292=>801,4293=>965,
119
-4304=>535,4305=>563,4306=>579,4307=>798,4308=>553,4309=>549,4310=>599,4311=>823,4312=>552,4313=>540,
120
-4314=>1008,4315=>589,4316=>576,4317=>791,4318=>561,4319=>571,4320=>790,4321=>591,4322=>721,4323=>676,
121
-4324=>782,4325=>575,4326=>820,4327=>559,4328=>583,4329=>576,4330=>656,4331=>577,4332=>575,4333=>566,
122
-4334=>606,4335=>663,4336=>563,4337=>591,4338=>563,4339=>563,4340=>562,4341=>603,4342=>846,4343=>612,
123
-4344=>572,4345=>605,4346=>562,4347=>401,4348=>327,7426=>846,7432=>458,7433=>288,7444=>890,7446=>600,
124
-7447=>600,7453=>663,7454=>853,7455=>853,7468=>439,7469=>586,7470=>479,7472=>491,7473=>432,7474=>432,
125
-7475=>483,7476=>536,7477=>265,7478=>268,7479=>492,7480=>398,7481=>627,7482=>518,7483=>518,7484=>493,
126
-7486=>426,7487=>471,7488=>422,7489=>494,7490=>637,7491=>419,7492=>419,7493=>448,7494=>591,7495=>448,
127
-7496=>448,7497=>400,7498=>400,7499=>370,7500=>370,7501=>448,7502=>270,7503=>471,7504=>655,7505=>426,
128
-7506=>420,7507=>384,7508=>420,7509=>420,7510=>448,7511=>333,7512=>468,7513=>390,7514=>655,7515=>442,
129
-7522=>215,7523=>372,7524=>468,7525=>442,7543=>576,7544=>536,7547=>342,7557=>342,7579=>448,7580=>384,
130
-7581=>384,7582=>420,7583=>370,7584=>244,7585=>335,7586=>448,7587=>470,7588=>270,7589=>276,7590=>270,
131
-7591=>270,7592=>333,7593=>331,7594=>289,7595=>387,7596=>613,7597=>655,7598=>529,7599=>528,7600=>425,
132
-7601=>420,7602=>470,7603=>360,7604=>348,7605=>333,7606=>468,7607=>427,7609=>439,7610=>329,7611=>321,
133
-7612=>474,7613=>371,7614=>407,7615=>420,7620=>0,7621=>0,7622=>0,7623=>0,7624=>0,7625=>0,
134
-7680=>698,7681=>583,7682=>760,7683=>629,7684=>760,7685=>629,7686=>760,7687=>629,7688=>716,7689=>548,
135
-7690=>780,7691=>629,7692=>780,7693=>629,7694=>780,7695=>629,7696=>780,7697=>629,7698=>780,7699=>629,
136
-7700=>686,7701=>572,7702=>686,7703=>572,7704=>686,7705=>572,7706=>686,7707=>572,7708=>686,7709=>572,
137
-7710=>639,7711=>387,7712=>769,7713=>629,7714=>850,7715=>654,7716=>850,7717=>654,7718=>850,7719=>654,
138
-7720=>850,7721=>654,7722=>850,7723=>654,7724=>421,7725=>342,7728=>782,7729=>624,7730=>782,7731=>624,
139
-7732=>782,7733=>624,7734=>633,7735=>342,7736=>633,7737=>342,7738=>633,7739=>342,7740=>633,7741=>342,
140
-7742=>996,7743=>952,7744=>996,7745=>952,7746=>996,7747=>952,7748=>822,7749=>654,7750=>822,7751=>654,
141
-7752=>822,7753=>654,7754=>822,7755=>654,7756=>784,7757=>600,7760=>784,7761=>600,7762=>784,7763=>600,
142
-7764=>677,7765=>629,7766=>677,7767=>629,7768=>748,7769=>474,7770=>748,7771=>474,7772=>748,7773=>474,
143
-7774=>748,7775=>474,7776=>650,7777=>506,7778=>650,7779=>506,7784=>650,7785=>506,7786=>669,7787=>416,
144
-7788=>669,7789=>416,7790=>669,7791=>416,7792=>669,7793=>416,7794=>785,7795=>654,7796=>785,7797=>654,
145
-7798=>785,7799=>654,7800=>785,7801=>654,7802=>785,7803=>654,7804=>698,7805=>523,7806=>698,7807=>523,
146
-7808=>1011,7809=>774,7810=>1011,7811=>774,7812=>1011,7813=>774,7814=>1011,7815=>774,7816=>1011,7817=>774,
147
-7818=>698,7819=>536,7820=>698,7821=>536,7822=>642,7823=>523,7824=>657,7825=>511,7826=>657,7827=>511,
148
-7828=>657,7829=>511,7830=>654,7831=>416,7832=>774,7833=>523,7834=>913,7835=>387,7838=>852,7839=>600,
149
-7840=>698,7841=>583,7842=>698,7843=>583,7852=>698,7853=>583,7854=>698,7855=>583,7856=>698,7857=>583,
150
-7858=>698,7859=>583,7860=>698,7861=>583,7862=>698,7863=>583,7864=>686,7865=>572,7866=>686,7867=>572,
151
-7868=>686,7869=>572,7878=>686,7879=>572,7880=>421,7881=>342,7882=>421,7883=>342,7884=>784,7885=>600,
152
-7886=>784,7887=>600,7896=>784,7897=>600,7908=>785,7909=>654,7910=>785,7911=>654,7922=>642,7923=>523,
153
-7924=>642,7925=>523,7926=>642,7927=>523,7928=>642,7929=>523,7936=>692,7937=>692,7938=>692,7939=>692,
154
-7940=>692,7941=>692,7942=>692,7943=>692,7944=>698,7945=>698,7946=>880,7947=>880,7948=>748,7949=>764,
155
-7950=>698,7951=>698,7952=>547,7953=>547,7954=>547,7955=>547,7956=>547,7957=>547,7960=>826,7961=>817,
156
-7962=>1052,7963=>1052,7964=>984,7965=>1007,7968=>654,7969=>654,7970=>654,7971=>654,7972=>654,7973=>654,
157
-7974=>654,7975=>654,7976=>990,7977=>984,7978=>1222,7979=>1225,7980=>1151,7981=>1177,7982=>1077,7983=>1074,
158
-7984=>435,7985=>435,7986=>435,7987=>435,7988=>435,7989=>435,7990=>435,7991=>435,7992=>566,7993=>555,
159
-7994=>790,7995=>792,7996=>719,7997=>748,7998=>650,7999=>642,8000=>600,8001=>600,8002=>600,8003=>600,
160
-8004=>600,8005=>600,8008=>810,8009=>841,8010=>1116,8011=>1113,8012=>931,8013=>959,8016=>624,8017=>624,
161
-8018=>624,8019=>624,8020=>624,8021=>624,8022=>624,8023=>624,8025=>830,8027=>1067,8029=>1020,8031=>917,
162
-8032=>857,8033=>857,8034=>857,8035=>857,8036=>857,8037=>857,8038=>857,8039=>857,8040=>838,8041=>867,
163
-8042=>1141,8043=>1146,8044=>949,8045=>979,8046=>920,8047=>954,8048=>692,8049=>692,8050=>547,8051=>547,
164
-8052=>654,8053=>654,8054=>435,8055=>435,8056=>600,8057=>600,8058=>624,8059=>624,8060=>857,8061=>857,
165
-8064=>692,8065=>692,8066=>692,8067=>692,8068=>692,8069=>692,8070=>692,8071=>692,8072=>698,8073=>698,
166
-8074=>880,8075=>880,8076=>748,8077=>764,8078=>698,8079=>698,8080=>654,8081=>654,8082=>654,8083=>654,
167
-8084=>654,8085=>654,8086=>654,8087=>654,8088=>990,8089=>984,8090=>1222,8091=>1225,8092=>1151,8093=>1177,
168
-8094=>1077,8095=>1074,8096=>857,8097=>857,8098=>857,8099=>857,8100=>857,8101=>857,8102=>857,8103=>857,
169
-8104=>838,8105=>867,8106=>1141,8107=>1146,8108=>949,8109=>979,8110=>920,8111=>954,8112=>692,8113=>692,
170
-8114=>692,8115=>692,8116=>692,8118=>692,8119=>692,8120=>698,8121=>698,8122=>729,8123=>698,8124=>698,
171
-8125=>450,8126=>450,8127=>450,8128=>450,8129=>450,8130=>654,8131=>654,8132=>654,8134=>654,8135=>654,
172
-8136=>899,8137=>852,8138=>1072,8139=>1006,8140=>850,8141=>450,8142=>450,8143=>450,8144=>435,8145=>435,
173
-8146=>435,8147=>435,8150=>435,8151=>435,8152=>421,8153=>421,8154=>642,8155=>595,8157=>450,8158=>450,
174
-8159=>450,8160=>624,8161=>624,8162=>624,8163=>624,8164=>598,8165=>598,8166=>624,8167=>624,8168=>642,
175
-8169=>642,8170=>917,8171=>857,8172=>819,8173=>450,8174=>450,8175=>450,8178=>857,8179=>857,8180=>857,
176
-8182=>857,8183=>857,8184=>962,8185=>798,8186=>991,8187=>820,8188=>801,8189=>450,8190=>450,8192=>450,
177
-8193=>900,8194=>450,8195=>900,8196=>296,8197=>225,8198=>150,8199=>626,8200=>313,8201=>180,8202=>89,
178
-8203=>0,8204=>0,8205=>0,8206=>0,8207=>0,8208=>374,8209=>374,8210=>626,8213=>900,8214=>450,
179
-8215=>450,8219=>313,8223=>518,8227=>575,8228=>313,8229=>606,8234=>0,8235=>0,8236=>0,8237=>0,
180
-8238=>0,8239=>180,8241=>1631,8242=>237,8243=>402,8244=>567,8245=>237,8246=>402,8247=>567,8248=>659,
181
-8252=>566,8253=>527,8254=>450,8258=>920,8260=>150,8261=>426,8262=>426,8263=>974,8264=>770,8265=>770,
182
-8267=>572,8268=>450,8269=>450,8270=>470,8271=>332,8273=>470,8274=>500,8275=>900,8279=>731,8287=>200,
183
-8288=>0,8289=>0,8290=>0,8291=>0,8292=>0,8298=>0,8299=>0,8300=>0,8301=>0,8302=>0,
184
-8303=>0,8304=>394,8305=>215,8308=>394,8309=>394,8310=>394,8311=>394,8312=>394,8313=>394,8314=>475,
185
-8315=>475,8316=>475,8317=>268,8318=>268,8319=>412,8320=>394,8321=>394,8322=>394,8323=>394,8324=>394,
186
-8325=>394,8326=>394,8327=>394,8328=>394,8329=>394,8330=>475,8331=>475,8332=>475,8333=>268,8334=>268,
187
-8336=>419,8337=>400,8338=>420,8339=>338,8340=>400,8358=>626,8367=>1039,8369=>710,8372=>788,8373=>626,
188
-8451=>1078,8457=>1001,8462=>654,8463=>654,8470=>978,8486=>801,8487=>801,8490=>782,8491=>698,8513=>707,
189
-8514=>518,8515=>573,8516=>684,8523=>813,8531=>932,8532=>932,8533=>932,8534=>932,8535=>932,8536=>932,
190
-8537=>932,8538=>932,8539=>932,8540=>932,8541=>932,8542=>932,8543=>554,8544=>421,8545=>663,8546=>904,
191
-8547=>984,8548=>698,8549=>1014,8550=>1256,8551=>1498,8552=>962,8553=>698,8554=>970,8555=>1212,8556=>633,
192
-8557=>716,8558=>780,8559=>996,8560=>342,8561=>684,8562=>1025,8563=>865,8564=>523,8565=>865,8566=>1207,
193
-8567=>1548,8568=>878,8569=>536,8570=>878,8571=>1220,8572=>342,8573=>548,8574=>629,8575=>952,8576=>1129,
194
-8577=>780,8578=>1141,8579=>716,8580=>548,8592=>754,8593=>754,8594=>754,8595=>754,8596=>754,8597=>754,
195
-8598=>754,8599=>754,8600=>754,8601=>754,8602=>754,8603=>754,8604=>754,8605=>754,8606=>754,8607=>754,
196
-8608=>754,8609=>754,8610=>754,8611=>754,8612=>754,8613=>754,8614=>754,8615=>754,8616=>754,8617=>754,
197
-8618=>754,8619=>754,8620=>754,8621=>754,8622=>754,8623=>765,8624=>754,8625=>754,8626=>754,8627=>754,
198
-8628=>754,8629=>754,8630=>754,8631=>754,8632=>754,8633=>754,8634=>754,8635=>754,8636=>754,8637=>754,
199
-8638=>754,8639=>754,8640=>754,8641=>754,8642=>754,8643=>754,8644=>754,8645=>754,8646=>754,8647=>754,
200
-8648=>754,8649=>754,8650=>754,8651=>754,8652=>754,8653=>754,8654=>754,8655=>754,8656=>754,8657=>754,
201
-8658=>754,8659=>754,8660=>754,8661=>754,8662=>754,8663=>754,8664=>754,8665=>754,8666=>754,8667=>754,
202
-8668=>754,8669=>754,8670=>754,8671=>754,8672=>754,8673=>754,8674=>754,8675=>754,8676=>754,8677=>754,
203
-8678=>754,8679=>754,8680=>754,8681=>754,8682=>754,8683=>754,8684=>754,8685=>754,8686=>754,8687=>754,
204
-8688=>754,8689=>754,8690=>754,8691=>754,8692=>754,8693=>754,8694=>754,8695=>754,8696=>754,8697=>754,
205
-8698=>754,8699=>754,8700=>754,8701=>754,8702=>754,8703=>754,8704=>577,8706=>480,8707=>558,8708=>558,
206
-8710=>677,8711=>677,8712=>666,8713=>666,8715=>666,8716=>666,8719=>757,8720=>757,8721=>677,8722=>754,
207
-8723=>754,8724=>754,8725=>329,8727=>622,8728=>466,8729=>466,8730=>591,8731=>591,8732=>591,8733=>604,
208
-8734=>750,8735=>754,8736=>754,8739=>292,8740=>546,8741=>476,8742=>696,8743=>730,8744=>730,8745=>754,
209
-8746=>754,8747=>521,8748=>900,8749=>1252,8760=>754,8761=>754,8762=>754,8763=>754,8764=>754,8765=>754,
210
-8770=>754,8771=>754,8776=>754,8784=>754,8785=>754,8786=>754,8787=>754,8788=>974,8789=>974,8800=>754,
211
-8801=>754,8804=>754,8805=>754,8834=>754,8835=>754,8836=>754,8837=>754,8838=>754,8839=>754,8844=>754,
212
-8845=>754,8846=>754,8847=>754,8848=>754,8849=>754,8850=>754,8851=>754,8852=>754,8853=>754,8854=>754,
213
-8855=>754,8856=>754,8857=>754,8858=>754,8859=>754,8860=>754,8861=>754,8862=>754,8863=>754,8864=>754,
214
-8865=>754,8866=>795,8867=>795,8868=>864,8869=>864,8870=>554,8871=>554,8872=>795,8873=>795,8874=>795,
215
-8875=>971,8876=>795,8877=>795,8878=>795,8879=>971,8901=>358,8962=>751,8968=>426,8969=>426,8970=>426,
216
-8971=>426,8976=>754,8977=>484,8984=>835,8985=>754,8992=>521,8993=>521,8997=>900,9000=>1299,9085=>907,
217
-9134=>521,9167=>850,9251=>751,9600=>692,9601=>692,9602=>692,9603=>692,9604=>692,9605=>692,9606=>692,
218
-9607=>692,9608=>692,9609=>692,9610=>692,9611=>692,9612=>692,9613=>692,9614=>692,9615=>692,9616=>692,
219
-9617=>692,9618=>692,9619=>692,9620=>692,9621=>692,9622=>692,9623=>692,9624=>692,9625=>692,9626=>692,
220
-9627=>692,9628=>692,9629=>692,9630=>692,9631=>692,9632=>850,9633=>850,9634=>850,9635=>850,9636=>850,
221
-9637=>850,9638=>850,9639=>850,9640=>850,9641=>850,9642=>610,9643=>610,9644=>850,9645=>850,9646=>495,
222
-9647=>495,9648=>692,9649=>692,9650=>692,9651=>692,9652=>452,9653=>452,9654=>692,9655=>692,9656=>452,
223
-9657=>452,9658=>692,9659=>692,9660=>692,9661=>692,9662=>452,9663=>452,9664=>692,9665=>692,9666=>452,
224
-9667=>452,9668=>692,9669=>692,9670=>692,9671=>692,9672=>692,9673=>785,9674=>444,9675=>785,9676=>785,
225
-9677=>785,9678=>785,9679=>785,9680=>785,9681=>785,9682=>785,9683=>785,9684=>785,9685=>785,9686=>474,
226
-9687=>474,9688=>712,9689=>873,9690=>873,9691=>873,9692=>348,9693=>348,9694=>348,9695=>348,9696=>785,
227
-9697=>785,9698=>692,9699=>692,9700=>692,9701=>692,9702=>531,9703=>850,9704=>850,9705=>850,9706=>850,
228
-9707=>850,9708=>692,9709=>692,9710=>692,9711=>1007,9712=>850,9713=>850,9714=>850,9715=>850,9716=>785,
229
-9717=>785,9718=>785,9719=>785,9720=>692,9721=>692,9722=>692,9723=>747,9724=>747,9725=>659,9726=>659,
230
-9727=>692,9728=>807,9784=>807,9785=>807,9786=>807,9787=>807,9788=>807,9791=>552,9792=>658,9793=>658,
231
-9794=>807,9795=>807,9796=>807,9797=>807,9798=>807,9799=>807,9824=>807,9825=>807,9826=>807,9827=>807,
232
-9828=>807,9829=>807,9830=>807,9831=>807,9833=>424,9834=>574,9835=>807,9836=>807,9837=>424,9838=>321,
233
-9839=>435,10145=>754,10181=>411,10182=>411,10208=>444,10216=>411,10217=>411,10224=>754,10225=>754,10226=>754,
234
-10227=>754,10228=>930,10229=>1290,10230=>1290,10231=>1290,10232=>1290,10233=>1290,10234=>1290,10235=>1290,10236=>1290,
235
-10237=>1290,10238=>1290,10239=>1290,10240=>703,10241=>703,10242=>703,10243=>703,10244=>703,10245=>703,10246=>703,
236
-10247=>703,10248=>703,10249=>703,10250=>703,10251=>703,10252=>703,10253=>703,10254=>703,10255=>703,10256=>703,
237
-10257=>703,10258=>703,10259=>703,10260=>703,10261=>703,10262=>703,10263=>703,10264=>703,10265=>703,10266=>703,
238
-10267=>703,10268=>703,10269=>703,10270=>703,10271=>703,10272=>703,10273=>703,10274=>703,10275=>703,10276=>703,
239
-10277=>703,10278=>703,10279=>703,10280=>703,10281=>703,10282=>703,10283=>703,10284=>703,10285=>703,10286=>703,
240
-10287=>703,10288=>703,10289=>703,10290=>703,10291=>703,10292=>703,10293=>703,10294=>703,10295=>703,10296=>703,
241
-10297=>703,10298=>703,10299=>703,10300=>703,10301=>703,10302=>703,10303=>703,10304=>703,10305=>703,10306=>703,
242
-10307=>703,10308=>703,10309=>703,10310=>703,10311=>703,10312=>703,10313=>703,10314=>703,10315=>703,10316=>703,
243
-10317=>703,10318=>703,10319=>703,10320=>703,10321=>703,10322=>703,10323=>703,10324=>703,10325=>703,10326=>703,
244
-10327=>703,10328=>703,10329=>703,10330=>703,10331=>703,10332=>703,10333=>703,10334=>703,10335=>703,10336=>703,
245
-10337=>703,10338=>703,10339=>703,10340=>703,10341=>703,10342=>703,10343=>703,10344=>703,10345=>703,10346=>703,
246
-10347=>703,10348=>703,10349=>703,10350=>703,10351=>703,10352=>703,10353=>703,10354=>703,10355=>703,10356=>703,
247
-10357=>703,10358=>703,10359=>703,10360=>703,10361=>703,10362=>703,10363=>703,10364=>703,10365=>703,10366=>703,
248
-10367=>703,10368=>703,10369=>703,10370=>703,10371=>703,10372=>703,10373=>703,10374=>703,10375=>703,10376=>703,
249
-10377=>703,10378=>703,10379=>703,10380=>703,10381=>703,10382=>703,10383=>703,10384=>703,10385=>703,10386=>703,
250
-10387=>703,10388=>703,10389=>703,10390=>703,10391=>703,10392=>703,10393=>703,10394=>703,10395=>703,10396=>703,
251
-10397=>703,10398=>703,10399=>703,10400=>703,10401=>703,10402=>703,10403=>703,10404=>703,10405=>703,10406=>703,
252
-10407=>703,10408=>703,10409=>703,10410=>703,10411=>703,10412=>703,10413=>703,10414=>703,10415=>703,10416=>703,
253
-10417=>703,10418=>703,10419=>703,10420=>703,10421=>703,10422=>703,10423=>703,10424=>703,10425=>703,10426=>703,
254
-10427=>703,10428=>703,10429=>703,10430=>703,10431=>703,10432=>703,10433=>703,10434=>703,10435=>703,10436=>703,
255
-10437=>703,10438=>703,10439=>703,10440=>703,10441=>703,10442=>703,10443=>703,10444=>703,10445=>703,10446=>703,
256
-10447=>703,10448=>703,10449=>703,10450=>703,10451=>703,10452=>703,10453=>703,10454=>703,10455=>703,10456=>703,
257
-10457=>703,10458=>703,10459=>703,10460=>703,10461=>703,10462=>703,10463=>703,10464=>703,10465=>703,10466=>703,
258
-10467=>703,10468=>703,10469=>703,10470=>703,10471=>703,10472=>703,10473=>703,10474=>703,10475=>703,10476=>703,
259
-10477=>703,10478=>703,10479=>703,10480=>703,10481=>703,10482=>703,10483=>703,10484=>703,10485=>703,10486=>703,
260
-10487=>703,10488=>703,10489=>703,10490=>703,10491=>703,10492=>703,10493=>703,10494=>703,10495=>703,10496=>754,
261
-10497=>754,10498=>754,10499=>754,10500=>754,10501=>754,10502=>754,10503=>754,10504=>754,10505=>754,10506=>754,
262
-10507=>754,10508=>754,10509=>754,10510=>754,10511=>754,10512=>754,10513=>754,10514=>754,10515=>754,10516=>754,
263
-10517=>754,10518=>754,10519=>754,10520=>754,10521=>754,10522=>754,10523=>754,10524=>754,10525=>754,10526=>754,
264
-10527=>754,10528=>754,10529=>754,10530=>754,10531=>754,10532=>754,10533=>754,10534=>754,10535=>754,10536=>754,
265
-10537=>754,10538=>754,10539=>754,10540=>754,10541=>754,10542=>754,10543=>754,10544=>754,10545=>754,10546=>754,
266
-10547=>754,10548=>754,10549=>754,10550=>754,10551=>754,10552=>754,10553=>754,10554=>754,10555=>754,10556=>754,
267
-10557=>754,10558=>754,10559=>754,10560=>754,10561=>754,10562=>754,10563=>754,10564=>754,10565=>754,10566=>754,
268
-10567=>754,10568=>754,10569=>754,10570=>754,10571=>754,10572=>754,10573=>754,10574=>754,10575=>754,10576=>754,
269
-10577=>754,10578=>754,10579=>754,10580=>754,10581=>754,10582=>754,10583=>754,10584=>754,10585=>754,10586=>754,
270
-10587=>754,10588=>754,10589=>754,10590=>754,10591=>754,10592=>754,10593=>754,10594=>754,10595=>754,10596=>754,
271
-10597=>754,10598=>754,10599=>754,10600=>754,10601=>754,10602=>754,10603=>754,10604=>754,10605=>754,10606=>754,
272
-10607=>754,10608=>754,10609=>754,10610=>754,10611=>754,10612=>754,10613=>754,10614=>754,10615=>929,10616=>754,
273
-10617=>754,10618=>864,10619=>754,10620=>754,10621=>754,10622=>754,10623=>754,10731=>444,10764=>1604,10765=>549,
274
-10766=>549,10799=>754,11008=>754,11009=>754,11010=>754,11011=>754,11012=>754,11013=>754,11014=>754,11015=>754,
275
-11016=>754,11017=>754,11018=>754,11019=>754,11020=>754,11021=>754,11022=>754,11023=>754,11024=>754,11025=>754,
276
-11026=>850,11027=>850,11028=>850,11029=>850,11030=>692,11031=>692,11032=>692,11033=>692,11034=>850,11364=>748,
277
-11367=>850,11368=>654,11369=>782,11370=>624,11371=>657,11372=>511,11374=>996,11375=>698,11381=>701,11382=>519,
278
-11383=>814,11385=>514,11386=>600,11388=>282,11389=>439,11520=>695,11521=>571,11522=>723,11523=>592,11524=>708,
279
-11525=>866,11526=>680,11527=>864,11528=>555,11529=>581,11530=>866,11531=>567,11532=>581,11533=>866,11534=>761,
280
-11535=>779,11536=>865,11537=>580,11538=>580,11539=>863,11540=>851,11541=>777,11542=>580,11543=>581,11544=>580,
281
-11545=>584,11546=>619,11547=>842,11548=>883,11549=>613,11550=>608,11551=>766,11552=>1002,11553=>569,11554=>580,
282
-11555=>582,11556=>674,11557=>822,11800=>527,11810=>426,11811=>426,11812=>426,11813=>426,11822=>527,42564=>650,
283
-42565=>506,42566=>421,42567=>342,42576=>1200,42577=>976,42580=>1158,42581=>923,42582=>1158,42583=>926,42760=>450,
284
-42761=>450,42762=>450,42763=>450,42764=>450,42765=>450,42766=>450,42767=>450,42768=>450,42769=>450,42770=>450,
285
-42771=>450,42772=>450,42773=>450,42774=>450,42779=>346,42780=>346,42781=>249,42782=>249,42783=>249,42891=>395,
286
-42892=>275,62464=>653,62465=>663,62466=>707,62467=>917,62468=>663,62469=>658,62470=>716,62471=>952,62472=>663,
287
-62473=>663,62474=>1196,62475=>679,62476=>678,62477=>922,62478=>663,62479=>678,62480=>963,62481=>736,62482=>783,
288
-62483=>737,62484=>914,62485=>677,62486=>907,62487=>677,62488=>684,62489=>678,62490=>720,62491=>678,62492=>684,
289
-62493=>664,62494=>721,62495=>860,62496=>663,62497=>762,62498=>664,62499=>663,62500=>663,62501=>714,62502=>930,
290
-62504=>813,63172=>506,63173=>600,63174=>629,63175=>654,63176=>952,63185=>450,63188=>450,64256=>744,64257=>654,
291
-64258=>654,64259=>998,64260=>1031,64261=>791,64262=>874,65024=>0,65025=>0,65026=>0,65027=>0,65028=>0,
292
-65029=>0,65030=>0,65031=>0,65032=>0,65033=>0,65034=>0,65035=>0,65036=>0,65037=>0,65038=>0,
293
-65039=>0,65529=>0,65530=>0,65531=>0,65532=>0,65533=>1002);
294
-$enc='';
295
-$diff='';
296
-$file='dejavuserifcondensedbi.z';
297
-$ctg='dejavuserifcondensedbi.ctg.z';
298
-$originalsize=293472;
1
+<?php if (!defined('ABSPATH')) exit;
2
+$type = 'TrueTypeUnicode';
3
+$name = 'DejaVuSerifCondensed-BoldItalic';
4
+$desc = array('Ascent'=>939, 'Descent'=>-236, 'CapHeight'=>-48, 'Flags'=>96, 'FontBBox'=>'[-815 -389 1584 1235]', 'ItalicAngle'=>-11, 'StemV'=>120, 'MissingWidth'=>540);
5
+$up = -63;
6
+$ut = 44;
7
+$dw = 540;
8
+$cw = array(
9
+0=>540, 32=>313, 33=>395, 34=>469, 35=>754, 36=>626, 37=>855, 38=>813, 39=>275, 40=>426,
10
+41=>426, 42=>470, 43=>754, 44=>313, 45=>374, 46=>313, 47=>329, 48=>626, 49=>626, 50=>626,
11
+51=>626, 52=>626, 53=>626, 54=>626, 55=>626, 56=>626, 57=>626, 58=>332, 59=>332, 60=>754,
12
+61=>754, 62=>754, 63=>527, 64=>900, 65=>698, 66=>760, 67=>716, 68=>780, 69=>686, 70=>639,
13
+71=>769, 72=>850, 73=>421, 74=>426, 75=>782, 76=>633, 77=>996, 78=>822, 79=>784, 80=>677,
14
+81=>784, 82=>748, 83=>650, 84=>669, 85=>785, 86=>698, 87=>1011, 88=>698, 89=>642, 90=>657,
15
+91=>426, 92=>329, 93=>426, 94=>754, 95=>450, 96=>450, 97=>583, 98=>629, 99=>548, 100=>629,
16
+101=>572, 102=>387, 103=>629, 104=>654, 105=>342, 106=>325, 107=>624, 108=>342, 109=>952, 110=>654,
17
+111=>600, 112=>629, 113=>629, 114=>474, 115=>506, 116=>416, 117=>654, 118=>523, 119=>774, 120=>536,
18
+121=>523, 122=>511, 123=>579, 124=>327, 125=>579, 126=>754, 8364=>626, 8218=>313, 402=>387, 8222=>518,
19
+8230=>900, 8224=>470, 8225=>470, 710=>450, 8240=>1246, 352=>650, 8249=>360, 338=>1062, 381=>657, 8216=>313,
20
+8217=>313, 8220=>518, 8221=>518, 8226=>575, 8211=>450, 8212=>900, 732=>450, 8482=>900, 353=>506, 8250=>360,
21
+339=>925, 382=>511, 376=>642, 160=>313, 161=>395, 162=>626, 163=>626, 164=>572, 165=>626, 166=>327,
22
+167=>470, 168=>450, 169=>900, 170=>438, 171=>563, 172=>754, 173=>374, 174=>900, 175=>450, 176=>450,
23
+177=>754, 178=>394, 179=>394, 180=>450, 181=>659, 182=>572, 183=>313, 184=>450, 185=>394, 186=>450,
24
+187=>563, 188=>938, 189=>938, 190=>938, 191=>527, 192=>698, 193=>698, 194=>698, 195=>698, 196=>698,
25
+197=>698, 198=>931, 199=>716, 200=>686, 201=>686, 202=>686, 203=>686, 204=>421, 205=>421, 206=>421,
26
+207=>421, 208=>787, 209=>822, 210=>784, 211=>784, 212=>784, 213=>784, 214=>784, 215=>754, 216=>784,
27
+217=>785, 218=>785, 219=>785, 220=>785, 221=>642, 222=>681, 223=>684, 224=>583, 225=>583, 226=>583,
28
+227=>583, 228=>583, 229=>583, 230=>838, 231=>548, 232=>572, 233=>572, 234=>572, 235=>572, 236=>342,
29
+237=>342, 238=>342, 239=>342, 240=>600, 241=>654, 242=>600, 243=>600, 244=>600, 245=>600, 246=>600,
30
+247=>754, 248=>600, 249=>654, 250=>654, 251=>654, 252=>654, 253=>523, 254=>629, 255=>523, 256=>698,
31
+257=>583, 258=>698, 259=>583, 260=>698, 261=>583, 262=>716, 263=>548, 264=>716, 265=>548, 266=>716,
32
+267=>548, 268=>716, 269=>548, 270=>780, 271=>629, 272=>787, 273=>629, 274=>686, 275=>572, 276=>686,
33
+277=>572, 278=>686, 279=>572, 280=>686, 281=>572, 282=>686, 283=>572, 284=>769, 285=>629, 286=>769,
34
+287=>629, 288=>769, 289=>629, 290=>769, 291=>629, 292=>850, 293=>654, 294=>850, 295=>654, 296=>421,
35
+297=>342, 298=>421, 299=>342, 300=>421, 301=>342, 302=>421, 303=>342, 304=>421, 305=>342, 306=>848,
36
+307=>676, 308=>426, 309=>325, 310=>782, 311=>624, 312=>624, 313=>633, 314=>342, 315=>633, 316=>342,
37
+317=>633, 318=>457, 319=>633, 320=>501, 321=>639, 322=>346, 323=>822, 324=>654, 325=>822, 326=>654,
38
+327=>822, 328=>654, 329=>907, 330=>785, 331=>654, 332=>784, 333=>600, 334=>784, 335=>600, 336=>784,
39
+337=>600, 340=>748, 341=>474, 342=>748, 343=>474, 344=>748, 345=>474, 346=>650, 347=>506, 348=>650,
40
+349=>506, 350=>650, 351=>506, 354=>669, 355=>416, 356=>669, 357=>416, 358=>669, 359=>416, 360=>785,
41
+361=>654, 362=>785, 363=>654, 364=>785, 365=>654, 366=>785, 367=>654, 368=>785, 369=>654, 370=>785,
42
+371=>654, 372=>1011, 373=>774, 374=>642, 375=>523, 377=>657, 378=>511, 379=>657, 380=>511, 383=>387,
43
+384=>629, 385=>760, 386=>769, 387=>629, 388=>769, 389=>629, 390=>716, 391=>716, 392=>548, 393=>787,
44
+394=>780, 395=>769, 396=>629, 397=>600, 398=>686, 399=>784, 400=>649, 401=>639, 403=>769, 404=>693,
45
+405=>938, 406=>421, 407=>421, 408=>782, 409=>624, 410=>342, 411=>631, 412=>952, 413=>822, 414=>654,
46
+415=>784, 416=>784, 417=>600, 418=>1080, 419=>849, 420=>677, 421=>629, 422=>748, 423=>650, 424=>506,
47
+425=>636, 426=>298, 427=>416, 428=>669, 429=>416, 430=>669, 431=>785, 432=>654, 433=>801, 434=>801,
48
+435=>642, 436=>628, 437=>657, 438=>511, 439=>591, 440=>591, 441=>591, 443=>626, 444=>678, 445=>511,
49
+446=>482, 448=>265, 449=>443, 450=>413, 451=>265, 452=>1437, 453=>1292, 454=>1140, 455=>1059, 456=>958,
50
+457=>667, 458=>1248, 459=>1148, 460=>980, 461=>698, 462=>583, 463=>421, 464=>342, 465=>784, 466=>600,
51
+467=>785, 468=>654, 469=>785, 470=>654, 471=>785, 472=>654, 473=>785, 474=>654, 475=>785, 476=>654,
52
+477=>572, 478=>698, 479=>583, 480=>698, 481=>583, 482=>931, 483=>877, 484=>806, 485=>629, 486=>769,
53
+487=>629, 488=>782, 489=>624, 490=>784, 491=>600, 492=>784, 493=>600, 494=>591, 495=>511, 496=>325,
54
+497=>1437, 498=>1292, 499=>1140, 500=>769, 501=>629, 502=>1099, 504=>822, 505=>654, 506=>698, 507=>583,
55
+508=>931, 509=>838, 510=>784, 511=>600, 512=>698, 513=>583, 514=>698, 515=>583, 516=>686, 517=>572,
56
+518=>686, 519=>572, 520=>421, 521=>342, 522=>421, 523=>342, 524=>784, 525=>600, 526=>784, 527=>600,
57
+528=>748, 529=>474, 530=>748, 531=>474, 532=>785, 533=>654, 534=>785, 535=>654, 536=>650, 537=>506,
58
+538=>669, 539=>416, 540=>621, 541=>546, 542=>850, 543=>654, 544=>785, 545=>711, 548=>657, 549=>511,
59
+550=>698, 551=>583, 552=>686, 553=>572, 554=>784, 555=>600, 556=>784, 557=>600, 558=>784, 559=>600,
60
+560=>784, 561=>600, 562=>642, 563=>523, 564=>516, 565=>830, 566=>508, 567=>325, 568=>928, 569=>928,
61
+570=>698, 571=>716, 572=>548, 573=>633, 574=>669, 575=>506, 576=>511, 577=>594, 578=>492, 581=>698,
62
+592=>583, 593=>629, 594=>629, 595=>629, 596=>548, 597=>548, 598=>629, 599=>657, 600=>572, 601=>572,
63
+602=>816, 603=>547, 604=>505, 605=>816, 606=>647, 607=>348, 608=>629, 609=>629, 610=>563, 611=>641,
64
+612=>564, 613=>654, 614=>654, 615=>654, 616=>342, 617=>342, 618=>342, 619=>368, 620=>462, 621=>342,
65
+622=>716, 623=>952, 624=>952, 625=>952, 626=>654, 627=>654, 628=>641, 629=>600, 630=>955, 631=>674,
66
+632=>600, 633=>514, 634=>514, 635=>514, 636=>474, 637=>474, 638=>406, 639=>438, 640=>721, 641=>721,
67
+642=>506, 643=>298, 644=>387, 645=>486, 646=>298, 647=>443, 648=>416, 649=>654, 650=>611, 651=>624,
68
+652=>523, 653=>774, 654=>571, 655=>654, 656=>511, 657=>511, 658=>511, 659=>511, 660=>482, 661=>482,
69
+662=>482, 663=>490, 664=>784, 665=>625, 666=>647, 667=>563, 668=>659, 669=>345, 670=>666, 671=>581,
70
+672=>629, 673=>482, 674=>482, 675=>1005, 676=>1061, 677=>1005, 678=>819, 679=>643, 680=>817, 681=>935,
71
+682=>711, 683=>716, 684=>596, 685=>398, 686=>552, 687=>646, 688=>469, 689=>466, 690=>282, 691=>372,
72
+692=>372, 693=>432, 694=>474, 695=>488, 696=>329, 697=>271, 699=>313, 700=>313, 701=>313, 702=>330,
73
+703=>330, 704=>282, 705=>282, 711=>450, 712=>254, 713=>450, 716=>254, 720=>332, 721=>332, 722=>330,
74
+723=>330, 726=>353, 728=>450, 729=>450, 730=>450, 731=>450, 733=>450, 734=>375, 736=>403, 737=>263,
75
+738=>355, 739=>338, 740=>282, 741=>450, 742=>450, 743=>450, 744=>450, 745=>450, 750=>498, 768=>0,
76
+769=>0, 770=>0, 771=>0, 772=>0, 773=>0, 774=>0, 775=>0, 776=>0, 777=>0, 778=>0,
77
+779=>0, 780=>0, 781=>0, 782=>0, 783=>0, 784=>0, 785=>0, 786=>0, 787=>0, 788=>0,
78
+789=>0, 790=>0, 791=>0, 792=>0, 793=>0, 794=>0, 795=>0, 796=>0, 797=>0, 798=>0,
79
+799=>0, 800=>0, 801=>0, 802=>0, 803=>0, 804=>0, 805=>0, 806=>0, 807=>0, 808=>0,
80
+809=>0, 810=>0, 811=>0, 812=>0, 813=>0, 814=>0, 815=>0, 816=>0, 817=>0, 818=>0,
81
+819=>0, 820=>0, 821=>0, 822=>0, 823=>0, 824=>0, 825=>0, 826=>0, 827=>0, 828=>0,
82
+829=>0, 830=>0, 831=>0, 835=>0, 847=>0, 856=>0, 865=>0, 880=>701, 881=>519, 884=>271,
83
+885=>271, 890=>450, 891=>548, 892=>548, 893=>548, 894=>332, 900=>450, 901=>450, 902=>698, 903=>313,
84
+904=>852, 905=>1022, 906=>595, 908=>798, 910=>857, 911=>820, 912=>435, 913=>698, 914=>760, 915=>639,
85
+916=>698, 917=>686, 918=>657, 919=>850, 920=>784, 921=>421, 922=>782, 923=>698, 924=>996, 925=>822,
86
+926=>633, 927=>784, 928=>850, 929=>677, 931=>636, 932=>669, 933=>642, 934=>784, 935=>698, 936=>822,
87
+937=>801, 938=>421, 939=>642, 940=>692, 941=>547, 942=>654, 943=>435, 944=>624, 945=>692, 946=>598,
88
+947=>594, 948=>600, 949=>547, 950=>533, 951=>654, 952=>600, 953=>435, 954=>674, 955=>631, 956=>659,
89
+957=>624, 958=>533, 959=>600, 960=>659, 961=>598, 962=>548, 963=>664, 964=>605, 965=>624, 966=>814,
90
+967=>592, 968=>847, 969=>857, 970=>435, 971=>624, 972=>600, 973=>624, 974=>857, 976=>600, 977=>764,
91
+978=>687, 979=>872, 980=>687, 981=>847, 982=>857, 983=>589, 984=>784, 985=>600, 986=>716, 987=>548,
92
+988=>639, 989=>475, 990=>531, 991=>593, 992=>716, 993=>600, 1008=>589, 1009=>598, 1010=>548, 1011=>325,
93
+1012=>784, 1013=>548, 1014=>548, 1015=>681, 1016=>629, 1017=>716, 1018=>996, 1019=>774, 1020=>623, 1021=>716,
94
+1022=>716, 1023=>716, 1024=>686, 1025=>686, 1026=>811, 1027=>621, 1028=>716, 1029=>650, 1030=>421, 1031=>421,
95
+1032=>426, 1033=>1081, 1034=>1135, 1035=>866, 1036=>818, 1037=>850, 1038=>730, 1039=>850, 1040=>733, 1041=>769,
96
+1042=>760, 1043=>621, 1044=>800, 1045=>686, 1046=>1181, 1047=>649, 1048=>850, 1049=>850, 1050=>818, 1051=>795,
97
+1052=>996, 1053=>850, 1054=>784, 1055=>850, 1056=>677, 1057=>716, 1058=>669, 1059=>730, 1060=>854, 1061=>698,
98
+1062=>870, 1063=>822, 1064=>1141, 1065=>1164, 1066=>861, 1067=>1081, 1068=>743, 1069=>716, 1070=>1158, 1071=>793,
99
+1072=>583, 1073=>650, 1074=>591, 1075=>506, 1076=>625, 1077=>572, 1078=>1175, 1079=>574, 1080=>654, 1081=>654,
100
+1082=>609, 1083=>659, 1084=>855, 1085=>656, 1086=>600, 1087=>654, 1088=>629, 1089=>548, 1090=>952, 1091=>538,
101
+1092=>812, 1093=>536, 1094=>723, 1095=>643, 1096=>952, 1097=>1021, 1098=>654, 1099=>916, 1100=>593, 1101=>580,
102
+1102=>901, 1103=>716, 1104=>572, 1105=>572, 1106=>646, 1107=>506, 1108=>548, 1109=>506, 1110=>342, 1111=>342,
103
+1112=>325, 1113=>913, 1114=>910, 1115=>654, 1116=>609, 1117=>654, 1118=>538, 1119=>654, 1122=>792, 1123=>945,
104
+1124=>1076, 1125=>867, 1130=>1181, 1131=>909, 1136=>986, 1137=>995, 1138=>784, 1139=>587, 1140=>824, 1141=>673,
105
+1164=>761, 1165=>606, 1168=>630, 1169=>556, 1170=>621, 1171=>506, 1172=>768, 1173=>634, 1174=>1181, 1175=>1175,
106
+1176=>649, 1177=>574, 1178=>812, 1179=>633, 1182=>818, 1183=>609, 1184=>937, 1185=>684, 1186=>856, 1187=>725,
107
+1188=>1050, 1189=>859, 1190=>1191, 1191=>911, 1194=>716, 1195=>548, 1196=>669, 1197=>1028, 1198=>642, 1199=>515,
108
+1200=>642, 1201=>515, 1202=>709, 1203=>536, 1204=>909, 1205=>749, 1206=>822, 1207=>712, 1210=>819, 1211=>654,
109
+1216=>421, 1217=>1181, 1218=>1175, 1219=>782, 1220=>624, 1223=>850, 1224=>659, 1227=>885, 1228=>659, 1231=>342,
110
+1232=>733, 1233=>583, 1234=>733, 1235=>583, 1236=>931, 1237=>877, 1238=>686, 1239=>572, 1240=>784, 1241=>572,
111
+1242=>784, 1243=>572, 1244=>1181, 1245=>1175, 1246=>649, 1247=>574, 1248=>591, 1249=>511, 1250=>850, 1251=>654,
112
+1252=>850, 1253=>654, 1254=>784, 1255=>600, 1256=>784, 1257=>600, 1258=>784, 1259=>600, 1260=>716, 1261=>580,
113
+1262=>730, 1263=>538, 1264=>730, 1265=>538, 1266=>730, 1267=>538, 1268=>822, 1269=>643, 1270=>621, 1271=>506,
114
+1272=>1081, 1273=>916, 1296=>649, 1297=>574, 1298=>795, 1299=>659, 1300=>1123, 1301=>904, 1306=>738, 1307=>576,
115
+1308=>925, 1309=>770, 4256=>688, 4257=>851, 4258=>788, 4259=>795, 4260=>712, 4261=>979, 4262=>921, 4263=>1100,
116
+4264=>587, 4265=>745, 4266=>955, 4267=>954, 4268=>725, 4269=>1030, 4270=>880, 4271=>820, 4272=>1007, 4273=>721,
117
+4274=>689, 4275=>977, 4276=>887, 4277=>968, 4278=>738, 4279=>758, 4280=>748, 4281=>759, 4282=>826, 4283=>978,
118
+4284=>701, 4285=>748, 4286=>740, 4287=>1008, 4288=>1019, 4289=>730, 4290=>812, 4291=>730, 4292=>801, 4293=>965,
119
+4304=>535, 4305=>563, 4306=>579, 4307=>798, 4308=>553, 4309=>549, 4310=>599, 4311=>823, 4312=>552, 4313=>540,
120
+4314=>1008, 4315=>589, 4316=>576, 4317=>791, 4318=>561, 4319=>571, 4320=>790, 4321=>591, 4322=>721, 4323=>676,
121
+4324=>782, 4325=>575, 4326=>820, 4327=>559, 4328=>583, 4329=>576, 4330=>656, 4331=>577, 4332=>575, 4333=>566,
122
+4334=>606, 4335=>663, 4336=>563, 4337=>591, 4338=>563, 4339=>563, 4340=>562, 4341=>603, 4342=>846, 4343=>612,
123
+4344=>572, 4345=>605, 4346=>562, 4347=>401, 4348=>327, 7426=>846, 7432=>458, 7433=>288, 7444=>890, 7446=>600,
124
+7447=>600, 7453=>663, 7454=>853, 7455=>853, 7468=>439, 7469=>586, 7470=>479, 7472=>491, 7473=>432, 7474=>432,
125
+7475=>483, 7476=>536, 7477=>265, 7478=>268, 7479=>492, 7480=>398, 7481=>627, 7482=>518, 7483=>518, 7484=>493,
126
+7486=>426, 7487=>471, 7488=>422, 7489=>494, 7490=>637, 7491=>419, 7492=>419, 7493=>448, 7494=>591, 7495=>448,
127
+7496=>448, 7497=>400, 7498=>400, 7499=>370, 7500=>370, 7501=>448, 7502=>270, 7503=>471, 7504=>655, 7505=>426,
128
+7506=>420, 7507=>384, 7508=>420, 7509=>420, 7510=>448, 7511=>333, 7512=>468, 7513=>390, 7514=>655, 7515=>442,
129
+7522=>215, 7523=>372, 7524=>468, 7525=>442, 7543=>576, 7544=>536, 7547=>342, 7557=>342, 7579=>448, 7580=>384,
130
+7581=>384, 7582=>420, 7583=>370, 7584=>244, 7585=>335, 7586=>448, 7587=>470, 7588=>270, 7589=>276, 7590=>270,
131
+7591=>270, 7592=>333, 7593=>331, 7594=>289, 7595=>387, 7596=>613, 7597=>655, 7598=>529, 7599=>528, 7600=>425,
132
+7601=>420, 7602=>470, 7603=>360, 7604=>348, 7605=>333, 7606=>468, 7607=>427, 7609=>439, 7610=>329, 7611=>321,
133
+7612=>474, 7613=>371, 7614=>407, 7615=>420, 7620=>0, 7621=>0, 7622=>0, 7623=>0, 7624=>0, 7625=>0,
134
+7680=>698, 7681=>583, 7682=>760, 7683=>629, 7684=>760, 7685=>629, 7686=>760, 7687=>629, 7688=>716, 7689=>548,
135
+7690=>780, 7691=>629, 7692=>780, 7693=>629, 7694=>780, 7695=>629, 7696=>780, 7697=>629, 7698=>780, 7699=>629,
136
+7700=>686, 7701=>572, 7702=>686, 7703=>572, 7704=>686, 7705=>572, 7706=>686, 7707=>572, 7708=>686, 7709=>572,
137
+7710=>639, 7711=>387, 7712=>769, 7713=>629, 7714=>850, 7715=>654, 7716=>850, 7717=>654, 7718=>850, 7719=>654,
138
+7720=>850, 7721=>654, 7722=>850, 7723=>654, 7724=>421, 7725=>342, 7728=>782, 7729=>624, 7730=>782, 7731=>624,
139
+7732=>782, 7733=>624, 7734=>633, 7735=>342, 7736=>633, 7737=>342, 7738=>633, 7739=>342, 7740=>633, 7741=>342,
140
+7742=>996, 7743=>952, 7744=>996, 7745=>952, 7746=>996, 7747=>952, 7748=>822, 7749=>654, 7750=>822, 7751=>654,
141
+7752=>822, 7753=>654, 7754=>822, 7755=>654, 7756=>784, 7757=>600, 7760=>784, 7761=>600, 7762=>784, 7763=>600,
142
+7764=>677, 7765=>629, 7766=>677, 7767=>629, 7768=>748, 7769=>474, 7770=>748, 7771=>474, 7772=>748, 7773=>474,
143
+7774=>748, 7775=>474, 7776=>650, 7777=>506, 7778=>650, 7779=>506, 7784=>650, 7785=>506, 7786=>669, 7787=>416,
144
+7788=>669, 7789=>416, 7790=>669, 7791=>416, 7792=>669, 7793=>416, 7794=>785, 7795=>654, 7796=>785, 7797=>654,
145
+7798=>785, 7799=>654, 7800=>785, 7801=>654, 7802=>785, 7803=>654, 7804=>698, 7805=>523, 7806=>698, 7807=>523,
146
+7808=>1011, 7809=>774, 7810=>1011, 7811=>774, 7812=>1011, 7813=>774, 7814=>1011, 7815=>774, 7816=>1011, 7817=>774,
147
+7818=>698, 7819=>536, 7820=>698, 7821=>536, 7822=>642, 7823=>523, 7824=>657, 7825=>511, 7826=>657, 7827=>511,
148
+7828=>657, 7829=>511, 7830=>654, 7831=>416, 7832=>774, 7833=>523, 7834=>913, 7835=>387, 7838=>852, 7839=>600,
149
+7840=>698, 7841=>583, 7842=>698, 7843=>583, 7852=>698, 7853=>583, 7854=>698, 7855=>583, 7856=>698, 7857=>583,
150
+7858=>698, 7859=>583, 7860=>698, 7861=>583, 7862=>698, 7863=>583, 7864=>686, 7865=>572, 7866=>686, 7867=>572,
151
+7868=>686, 7869=>572, 7878=>686, 7879=>572, 7880=>421, 7881=>342, 7882=>421, 7883=>342, 7884=>784, 7885=>600,
152
+7886=>784, 7887=>600, 7896=>784, 7897=>600, 7908=>785, 7909=>654, 7910=>785, 7911=>654, 7922=>642, 7923=>523,
153
+7924=>642, 7925=>523, 7926=>642, 7927=>523, 7928=>642, 7929=>523, 7936=>692, 7937=>692, 7938=>692, 7939=>692,
154
+7940=>692, 7941=>692, 7942=>692, 7943=>692, 7944=>698, 7945=>698, 7946=>880, 7947=>880, 7948=>748, 7949=>764,
155
+7950=>698, 7951=>698, 7952=>547, 7953=>547, 7954=>547, 7955=>547, 7956=>547, 7957=>547, 7960=>826, 7961=>817,
156
+7962=>1052, 7963=>1052, 7964=>984, 7965=>1007, 7968=>654, 7969=>654, 7970=>654, 7971=>654, 7972=>654, 7973=>654,
157
+7974=>654, 7975=>654, 7976=>990, 7977=>984, 7978=>1222, 7979=>1225, 7980=>1151, 7981=>1177, 7982=>1077, 7983=>1074,
158
+7984=>435, 7985=>435, 7986=>435, 7987=>435, 7988=>435, 7989=>435, 7990=>435, 7991=>435, 7992=>566, 7993=>555,
159
+7994=>790, 7995=>792, 7996=>719, 7997=>748, 7998=>650, 7999=>642, 8000=>600, 8001=>600, 8002=>600, 8003=>600,
160
+8004=>600, 8005=>600, 8008=>810, 8009=>841, 8010=>1116, 8011=>1113, 8012=>931, 8013=>959, 8016=>624, 8017=>624,
161
+8018=>624, 8019=>624, 8020=>624, 8021=>624, 8022=>624, 8023=>624, 8025=>830, 8027=>1067, 8029=>1020, 8031=>917,
162
+8032=>857, 8033=>857, 8034=>857, 8035=>857, 8036=>857, 8037=>857, 8038=>857, 8039=>857, 8040=>838, 8041=>867,
163
+8042=>1141, 8043=>1146, 8044=>949, 8045=>979, 8046=>920, 8047=>954, 8048=>692, 8049=>692, 8050=>547, 8051=>547,
164
+8052=>654, 8053=>654, 8054=>435, 8055=>435, 8056=>600, 8057=>600, 8058=>624, 8059=>624, 8060=>857, 8061=>857,
165
+8064=>692, 8065=>692, 8066=>692, 8067=>692, 8068=>692, 8069=>692, 8070=>692, 8071=>692, 8072=>698, 8073=>698,
166
+8074=>880, 8075=>880, 8076=>748, 8077=>764, 8078=>698, 8079=>698, 8080=>654, 8081=>654, 8082=>654, 8083=>654,
167
+8084=>654, 8085=>654, 8086=>654, 8087=>654, 8088=>990, 8089=>984, 8090=>1222, 8091=>1225, 8092=>1151, 8093=>1177,
168
+8094=>1077, 8095=>1074, 8096=>857, 8097=>857, 8098=>857, 8099=>857, 8100=>857, 8101=>857, 8102=>857, 8103=>857,
169
+8104=>838, 8105=>867, 8106=>1141, 8107=>1146, 8108=>949, 8109=>979, 8110=>920, 8111=>954, 8112=>692, 8113=>692,
170
+8114=>692, 8115=>692, 8116=>692, 8118=>692, 8119=>692, 8120=>698, 8121=>698, 8122=>729, 8123=>698, 8124=>698,
171
+8125=>450, 8126=>450, 8127=>450, 8128=>450, 8129=>450, 8130=>654, 8131=>654, 8132=>654, 8134=>654, 8135=>654,
172
+8136=>899, 8137=>852, 8138=>1072, 8139=>1006, 8140=>850, 8141=>450, 8142=>450, 8143=>450, 8144=>435, 8145=>435,
173
+8146=>435, 8147=>435, 8150=>435, 8151=>435, 8152=>421, 8153=>421, 8154=>642, 8155=>595, 8157=>450, 8158=>450,
174
+8159=>450, 8160=>624, 8161=>624, 8162=>624, 8163=>624, 8164=>598, 8165=>598, 8166=>624, 8167=>624, 8168=>642,
175
+8169=>642, 8170=>917, 8171=>857, 8172=>819, 8173=>450, 8174=>450, 8175=>450, 8178=>857, 8179=>857, 8180=>857,
176
+8182=>857, 8183=>857, 8184=>962, 8185=>798, 8186=>991, 8187=>820, 8188=>801, 8189=>450, 8190=>450, 8192=>450,
177
+8193=>900, 8194=>450, 8195=>900, 8196=>296, 8197=>225, 8198=>150, 8199=>626, 8200=>313, 8201=>180, 8202=>89,
178
+8203=>0, 8204=>0, 8205=>0, 8206=>0, 8207=>0, 8208=>374, 8209=>374, 8210=>626, 8213=>900, 8214=>450,
179
+8215=>450, 8219=>313, 8223=>518, 8227=>575, 8228=>313, 8229=>606, 8234=>0, 8235=>0, 8236=>0, 8237=>0,
180
+8238=>0, 8239=>180, 8241=>1631, 8242=>237, 8243=>402, 8244=>567, 8245=>237, 8246=>402, 8247=>567, 8248=>659,
181
+8252=>566, 8253=>527, 8254=>450, 8258=>920, 8260=>150, 8261=>426, 8262=>426, 8263=>974, 8264=>770, 8265=>770,
182
+8267=>572, 8268=>450, 8269=>450, 8270=>470, 8271=>332, 8273=>470, 8274=>500, 8275=>900, 8279=>731, 8287=>200,
183
+8288=>0, 8289=>0, 8290=>0, 8291=>0, 8292=>0, 8298=>0, 8299=>0, 8300=>0, 8301=>0, 8302=>0,
184
+8303=>0, 8304=>394, 8305=>215, 8308=>394, 8309=>394, 8310=>394, 8311=>394, 8312=>394, 8313=>394, 8314=>475,
185
+8315=>475, 8316=>475, 8317=>268, 8318=>268, 8319=>412, 8320=>394, 8321=>394, 8322=>394, 8323=>394, 8324=>394,
186
+8325=>394, 8326=>394, 8327=>394, 8328=>394, 8329=>394, 8330=>475, 8331=>475, 8332=>475, 8333=>268, 8334=>268,
187
+8336=>419, 8337=>400, 8338=>420, 8339=>338, 8340=>400, 8358=>626, 8367=>1039, 8369=>710, 8372=>788, 8373=>626,
188
+8451=>1078, 8457=>1001, 8462=>654, 8463=>654, 8470=>978, 8486=>801, 8487=>801, 8490=>782, 8491=>698, 8513=>707,
189
+8514=>518, 8515=>573, 8516=>684, 8523=>813, 8531=>932, 8532=>932, 8533=>932, 8534=>932, 8535=>932, 8536=>932,
190
+8537=>932, 8538=>932, 8539=>932, 8540=>932, 8541=>932, 8542=>932, 8543=>554, 8544=>421, 8545=>663, 8546=>904,
191
+8547=>984, 8548=>698, 8549=>1014, 8550=>1256, 8551=>1498, 8552=>962, 8553=>698, 8554=>970, 8555=>1212, 8556=>633,
192
+8557=>716, 8558=>780, 8559=>996, 8560=>342, 8561=>684, 8562=>1025, 8563=>865, 8564=>523, 8565=>865, 8566=>1207,
193
+8567=>1548, 8568=>878, 8569=>536, 8570=>878, 8571=>1220, 8572=>342, 8573=>548, 8574=>629, 8575=>952, 8576=>1129,
194
+8577=>780, 8578=>1141, 8579=>716, 8580=>548, 8592=>754, 8593=>754, 8594=>754, 8595=>754, 8596=>754, 8597=>754,
195
+8598=>754, 8599=>754, 8600=>754, 8601=>754, 8602=>754, 8603=>754, 8604=>754, 8605=>754, 8606=>754, 8607=>754,
196
+8608=>754, 8609=>754, 8610=>754, 8611=>754, 8612=>754, 8613=>754, 8614=>754, 8615=>754, 8616=>754, 8617=>754,
197
+8618=>754, 8619=>754, 8620=>754, 8621=>754, 8622=>754, 8623=>765, 8624=>754, 8625=>754, 8626=>754, 8627=>754,
198
+8628=>754, 8629=>754, 8630=>754, 8631=>754, 8632=>754, 8633=>754, 8634=>754, 8635=>754, 8636=>754, 8637=>754,
199
+8638=>754, 8639=>754, 8640=>754, 8641=>754, 8642=>754, 8643=>754, 8644=>754, 8645=>754, 8646=>754, 8647=>754,
200
+8648=>754, 8649=>754, 8650=>754, 8651=>754, 8652=>754, 8653=>754, 8654=>754, 8655=>754, 8656=>754, 8657=>754,
201
+8658=>754, 8659=>754, 8660=>754, 8661=>754, 8662=>754, 8663=>754, 8664=>754, 8665=>754, 8666=>754, 8667=>754,
202
+8668=>754, 8669=>754, 8670=>754, 8671=>754, 8672=>754, 8673=>754, 8674=>754, 8675=>754, 8676=>754, 8677=>754,
203
+8678=>754, 8679=>754, 8680=>754, 8681=>754, 8682=>754, 8683=>754, 8684=>754, 8685=>754, 8686=>754, 8687=>754,
204
+8688=>754, 8689=>754, 8690=>754, 8691=>754, 8692=>754, 8693=>754, 8694=>754, 8695=>754, 8696=>754, 8697=>754,
205
+8698=>754, 8699=>754, 8700=>754, 8701=>754, 8702=>754, 8703=>754, 8704=>577, 8706=>480, 8707=>558, 8708=>558,
206
+8710=>677, 8711=>677, 8712=>666, 8713=>666, 8715=>666, 8716=>666, 8719=>757, 8720=>757, 8721=>677, 8722=>754,
207
+8723=>754, 8724=>754, 8725=>329, 8727=>622, 8728=>466, 8729=>466, 8730=>591, 8731=>591, 8732=>591, 8733=>604,
208
+8734=>750, 8735=>754, 8736=>754, 8739=>292, 8740=>546, 8741=>476, 8742=>696, 8743=>730, 8744=>730, 8745=>754,
209
+8746=>754, 8747=>521, 8748=>900, 8749=>1252, 8760=>754, 8761=>754, 8762=>754, 8763=>754, 8764=>754, 8765=>754,
210
+8770=>754, 8771=>754, 8776=>754, 8784=>754, 8785=>754, 8786=>754, 8787=>754, 8788=>974, 8789=>974, 8800=>754,
211
+8801=>754, 8804=>754, 8805=>754, 8834=>754, 8835=>754, 8836=>754, 8837=>754, 8838=>754, 8839=>754, 8844=>754,
212
+8845=>754, 8846=>754, 8847=>754, 8848=>754, 8849=>754, 8850=>754, 8851=>754, 8852=>754, 8853=>754, 8854=>754,
213
+8855=>754, 8856=>754, 8857=>754, 8858=>754, 8859=>754, 8860=>754, 8861=>754, 8862=>754, 8863=>754, 8864=>754,
214
+8865=>754, 8866=>795, 8867=>795, 8868=>864, 8869=>864, 8870=>554, 8871=>554, 8872=>795, 8873=>795, 8874=>795,
215
+8875=>971, 8876=>795, 8877=>795, 8878=>795, 8879=>971, 8901=>358, 8962=>751, 8968=>426, 8969=>426, 8970=>426,
216
+8971=>426, 8976=>754, 8977=>484, 8984=>835, 8985=>754, 8992=>521, 8993=>521, 8997=>900, 9000=>1299, 9085=>907,
217
+9134=>521, 9167=>850, 9251=>751, 9600=>692, 9601=>692, 9602=>692, 9603=>692, 9604=>692, 9605=>692, 9606=>692,
218
+9607=>692, 9608=>692, 9609=>692, 9610=>692, 9611=>692, 9612=>692, 9613=>692, 9614=>692, 9615=>692, 9616=>692,
219
+9617=>692, 9618=>692, 9619=>692, 9620=>692, 9621=>692, 9622=>692, 9623=>692, 9624=>692, 9625=>692, 9626=>692,
220
+9627=>692, 9628=>692, 9629=>692, 9630=>692, 9631=>692, 9632=>850, 9633=>850, 9634=>850, 9635=>850, 9636=>850,
221
+9637=>850, 9638=>850, 9639=>850, 9640=>850, 9641=>850, 9642=>610, 9643=>610, 9644=>850, 9645=>850, 9646=>495,
222
+9647=>495, 9648=>692, 9649=>692, 9650=>692, 9651=>692, 9652=>452, 9653=>452, 9654=>692, 9655=>692, 9656=>452,
223
+9657=>452, 9658=>692, 9659=>692, 9660=>692, 9661=>692, 9662=>452, 9663=>452, 9664=>692, 9665=>692, 9666=>452,
224
+9667=>452, 9668=>692, 9669=>692, 9670=>692, 9671=>692, 9672=>692, 9673=>785, 9674=>444, 9675=>785, 9676=>785,
225
+9677=>785, 9678=>785, 9679=>785, 9680=>785, 9681=>785, 9682=>785, 9683=>785, 9684=>785, 9685=>785, 9686=>474,
226
+9687=>474, 9688=>712, 9689=>873, 9690=>873, 9691=>873, 9692=>348, 9693=>348, 9694=>348, 9695=>348, 9696=>785,
227
+9697=>785, 9698=>692, 9699=>692, 9700=>692, 9701=>692, 9702=>531, 9703=>850, 9704=>850, 9705=>850, 9706=>850,
228
+9707=>850, 9708=>692, 9709=>692, 9710=>692, 9711=>1007, 9712=>850, 9713=>850, 9714=>850, 9715=>850, 9716=>785,
229
+9717=>785, 9718=>785, 9719=>785, 9720=>692, 9721=>692, 9722=>692, 9723=>747, 9724=>747, 9725=>659, 9726=>659,
230
+9727=>692, 9728=>807, 9784=>807, 9785=>807, 9786=>807, 9787=>807, 9788=>807, 9791=>552, 9792=>658, 9793=>658,
231
+9794=>807, 9795=>807, 9796=>807, 9797=>807, 9798=>807, 9799=>807, 9824=>807, 9825=>807, 9826=>807, 9827=>807,
232
+9828=>807, 9829=>807, 9830=>807, 9831=>807, 9833=>424, 9834=>574, 9835=>807, 9836=>807, 9837=>424, 9838=>321,
233
+9839=>435, 10145=>754, 10181=>411, 10182=>411, 10208=>444, 10216=>411, 10217=>411, 10224=>754, 10225=>754, 10226=>754,
234
+10227=>754, 10228=>930, 10229=>1290, 10230=>1290, 10231=>1290, 10232=>1290, 10233=>1290, 10234=>1290, 10235=>1290, 10236=>1290,
235
+10237=>1290, 10238=>1290, 10239=>1290, 10240=>703, 10241=>703, 10242=>703, 10243=>703, 10244=>703, 10245=>703, 10246=>703,
236
+10247=>703, 10248=>703, 10249=>703, 10250=>703, 10251=>703, 10252=>703, 10253=>703, 10254=>703, 10255=>703, 10256=>703,
237
+10257=>703, 10258=>703, 10259=>703, 10260=>703, 10261=>703, 10262=>703, 10263=>703, 10264=>703, 10265=>703, 10266=>703,
238
+10267=>703, 10268=>703, 10269=>703, 10270=>703, 10271=>703, 10272=>703, 10273=>703, 10274=>703, 10275=>703, 10276=>703,
239
+10277=>703, 10278=>703, 10279=>703, 10280=>703, 10281=>703, 10282=>703, 10283=>703, 10284=>703, 10285=>703, 10286=>703,
240
+10287=>703, 10288=>703, 10289=>703, 10290=>703, 10291=>703, 10292=>703, 10293=>703, 10294=>703, 10295=>703, 10296=>703,
241
+10297=>703, 10298=>703, 10299=>703, 10300=>703, 10301=>703, 10302=>703, 10303=>703, 10304=>703, 10305=>703, 10306=>703,
242
+10307=>703, 10308=>703, 10309=>703, 10310=>703, 10311=>703, 10312=>703, 10313=>703, 10314=>703, 10315=>703, 10316=>703,
243
+10317=>703, 10318=>703, 10319=>703, 10320=>703, 10321=>703, 10322=>703, 10323=>703, 10324=>703, 10325=>703, 10326=>703,
244
+10327=>703, 10328=>703, 10329=>703, 10330=>703, 10331=>703, 10332=>703, 10333=>703, 10334=>703, 10335=>703, 10336=>703,
245
+10337=>703, 10338=>703, 10339=>703, 10340=>703, 10341=>703, 10342=>703, 10343=>703, 10344=>703, 10345=>703, 10346=>703,
246
+10347=>703, 10348=>703, 10349=>703, 10350=>703, 10351=>703, 10352=>703, 10353=>703, 10354=>703, 10355=>703, 10356=>703,
247
+10357=>703, 10358=>703, 10359=>703, 10360=>703, 10361=>703, 10362=>703, 10363=>703, 10364=>703, 10365=>703, 10366=>703,
248
+10367=>703, 10368=>703, 10369=>703, 10370=>703, 10371=>703, 10372=>703, 10373=>703, 10374=>703, 10375=>703, 10376=>703,
249
+10377=>703, 10378=>703, 10379=>703, 10380=>703, 10381=>703, 10382=>703, 10383=>703, 10384=>703, 10385=>703, 10386=>703,
250
+10387=>703, 10388=>703, 10389=>703, 10390=>703, 10391=>703, 10392=>703, 10393=>703, 10394=>703, 10395=>703, 10396=>703,
251
+10397=>703, 10398=>703, 10399=>703, 10400=>703, 10401=>703, 10402=>703, 10403=>703, 10404=>703, 10405=>703, 10406=>703,
252
+10407=>703, 10408=>703, 10409=>703, 10410=>703, 10411=>703, 10412=>703, 10413=>703, 10414=>703, 10415=>703, 10416=>703,
253
+10417=>703, 10418=>703, 10419=>703, 10420=>703, 10421=>703, 10422=>703, 10423=>703, 10424=>703, 10425=>703, 10426=>703,
254
+10427=>703, 10428=>703, 10429=>703, 10430=>703, 10431=>703, 10432=>703, 10433=>703, 10434=>703, 10435=>703, 10436=>703,
255
+10437=>703, 10438=>703, 10439=>703, 10440=>703, 10441=>703, 10442=>703, 10443=>703, 10444=>703, 10445=>703, 10446=>703,
256
+10447=>703, 10448=>703, 10449=>703, 10450=>703, 10451=>703, 10452=>703, 10453=>703, 10454=>703, 10455=>703, 10456=>703,
257
+10457=>703, 10458=>703, 10459=>703, 10460=>703, 10461=>703, 10462=>703, 10463=>703, 10464=>703, 10465=>703, 10466=>703,
258
+10467=>703, 10468=>703, 10469=>703, 10470=>703, 10471=>703, 10472=>703, 10473=>703, 10474=>703, 10475=>703, 10476=>703,
259
+10477=>703, 10478=>703, 10479=>703, 10480=>703, 10481=>703, 10482=>703, 10483=>703, 10484=>703, 10485=>703, 10486=>703,
260
+10487=>703, 10488=>703, 10489=>703, 10490=>703, 10491=>703, 10492=>703, 10493=>703, 10494=>703, 10495=>703, 10496=>754,
261
+10497=>754, 10498=>754, 10499=>754, 10500=>754, 10501=>754, 10502=>754, 10503=>754, 10504=>754, 10505=>754, 10506=>754,
262
+10507=>754, 10508=>754, 10509=>754, 10510=>754, 10511=>754, 10512=>754, 10513=>754, 10514=>754, 10515=>754, 10516=>754,
263
+10517=>754, 10518=>754, 10519=>754, 10520=>754, 10521=>754, 10522=>754, 10523=>754, 10524=>754, 10525=>754, 10526=>754,
264
+10527=>754, 10528=>754, 10529=>754, 10530=>754, 10531=>754, 10532=>754, 10533=>754, 10534=>754, 10535=>754, 10536=>754,
265
+10537=>754, 10538=>754, 10539=>754, 10540=>754, 10541=>754, 10542=>754, 10543=>754, 10544=>754, 10545=>754, 10546=>754,
266
+10547=>754, 10548=>754, 10549=>754, 10550=>754, 10551=>754, 10552=>754, 10553=>754, 10554=>754, 10555=>754, 10556=>754,
267
+10557=>754, 10558=>754, 10559=>754, 10560=>754, 10561=>754, 10562=>754, 10563=>754, 10564=>754, 10565=>754, 10566=>754,
268
+10567=>754, 10568=>754, 10569=>754, 10570=>754, 10571=>754, 10572=>754, 10573=>754, 10574=>754, 10575=>754, 10576=>754,
269
+10577=>754, 10578=>754, 10579=>754, 10580=>754, 10581=>754, 10582=>754, 10583=>754, 10584=>754, 10585=>754, 10586=>754,
270
+10587=>754, 10588=>754, 10589=>754, 10590=>754, 10591=>754, 10592=>754, 10593=>754, 10594=>754, 10595=>754, 10596=>754,
271
+10597=>754, 10598=>754, 10599=>754, 10600=>754, 10601=>754, 10602=>754, 10603=>754, 10604=>754, 10605=>754, 10606=>754,
272
+10607=>754, 10608=>754, 10609=>754, 10610=>754, 10611=>754, 10612=>754, 10613=>754, 10614=>754, 10615=>929, 10616=>754,
273
+10617=>754, 10618=>864, 10619=>754, 10620=>754, 10621=>754, 10622=>754, 10623=>754, 10731=>444, 10764=>1604, 10765=>549,
274
+10766=>549, 10799=>754, 11008=>754, 11009=>754, 11010=>754, 11011=>754, 11012=>754, 11013=>754, 11014=>754, 11015=>754,
275
+11016=>754, 11017=>754, 11018=>754, 11019=>754, 11020=>754, 11021=>754, 11022=>754, 11023=>754, 11024=>754, 11025=>754,
276
+11026=>850, 11027=>850, 11028=>850, 11029=>850, 11030=>692, 11031=>692, 11032=>692, 11033=>692, 11034=>850, 11364=>748,
277
+11367=>850, 11368=>654, 11369=>782, 11370=>624, 11371=>657, 11372=>511, 11374=>996, 11375=>698, 11381=>701, 11382=>519,
278
+11383=>814, 11385=>514, 11386=>600, 11388=>282, 11389=>439, 11520=>695, 11521=>571, 11522=>723, 11523=>592, 11524=>708,
279
+11525=>866, 11526=>680, 11527=>864, 11528=>555, 11529=>581, 11530=>866, 11531=>567, 11532=>581, 11533=>866, 11534=>761,
280
+11535=>779, 11536=>865, 11537=>580, 11538=>580, 11539=>863, 11540=>851, 11541=>777, 11542=>580, 11543=>581, 11544=>580,
281
+11545=>584, 11546=>619, 11547=>842, 11548=>883, 11549=>613, 11550=>608, 11551=>766, 11552=>1002, 11553=>569, 11554=>580,
282
+11555=>582, 11556=>674, 11557=>822, 11800=>527, 11810=>426, 11811=>426, 11812=>426, 11813=>426, 11822=>527, 42564=>650,
283
+42565=>506, 42566=>421, 42567=>342, 42576=>1200, 42577=>976, 42580=>1158, 42581=>923, 42582=>1158, 42583=>926, 42760=>450,
284
+42761=>450, 42762=>450, 42763=>450, 42764=>450, 42765=>450, 42766=>450, 42767=>450, 42768=>450, 42769=>450, 42770=>450,
285
+42771=>450, 42772=>450, 42773=>450, 42774=>450, 42779=>346, 42780=>346, 42781=>249, 42782=>249, 42783=>249, 42891=>395,
286
+42892=>275, 62464=>653, 62465=>663, 62466=>707, 62467=>917, 62468=>663, 62469=>658, 62470=>716, 62471=>952, 62472=>663,
287
+62473=>663, 62474=>1196, 62475=>679, 62476=>678, 62477=>922, 62478=>663, 62479=>678, 62480=>963, 62481=>736, 62482=>783,
288
+62483=>737, 62484=>914, 62485=>677, 62486=>907, 62487=>677, 62488=>684, 62489=>678, 62490=>720, 62491=>678, 62492=>684,
289
+62493=>664, 62494=>721, 62495=>860, 62496=>663, 62497=>762, 62498=>664, 62499=>663, 62500=>663, 62501=>714, 62502=>930,
290
+62504=>813, 63172=>506, 63173=>600, 63174=>629, 63175=>654, 63176=>952, 63185=>450, 63188=>450, 64256=>744, 64257=>654,
291
+64258=>654, 64259=>998, 64260=>1031, 64261=>791, 64262=>874, 65024=>0, 65025=>0, 65026=>0, 65027=>0, 65028=>0,
292
+65029=>0, 65030=>0, 65031=>0, 65032=>0, 65033=>0, 65034=>0, 65035=>0, 65036=>0, 65037=>0, 65038=>0,
293
+65039=>0, 65529=>0, 65530=>0, 65531=>0, 65532=>0, 65533=>1002);
294
+$enc = '';
295
+$diff = '';
296
+$file = 'dejavuserifcondensedbi.z';
297
+$ctg = 'dejavuserifcondensedbi.ctg.z';
298
+$originalsize = 293472;
299 299
 ?>
300 300
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 $type='TrueTypeUnicode';
3 5
 $name='DejaVuSerifCondensed-BoldItalic';
4 6
 $desc=array('Ascent'=>939,'Descent'=>-236,'CapHeight'=>-48,'Flags'=>96,'FontBBox'=>'[-815 -389 1584 1235]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>540);
Please login to merge, or discard this patch.
includes/librairies/HTML2PDF/_tcpdf_5.0.002/fonts/dejavusansmonobi.php 2 patches
Spacing   +248 added lines, -248 removed lines patch added patch discarded remove patch
@@ -1,250 +1,250 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
2
-$type='TrueTypeUnicode';
3
-$name='DejaVuSansMono-BoldOblique';
4
-$desc=array('Ascent'=>928,'Descent'=>-236,'CapHeight'=>-70,'Flags'=>97,'FontBBox'=>'[-428 -394 808 1053]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>602);
5
-$up=-63;
6
-$ut=44;
7
-$dw=602;
8
-$cw=array(
9
-0=>602,32=>602,33=>602,34=>602,35=>602,36=>602,37=>602,38=>602,39=>602,40=>602,
10
-41=>602,42=>602,43=>602,44=>602,45=>602,46=>602,47=>602,48=>602,49=>602,50=>602,
11
-51=>602,52=>602,53=>602,54=>602,55=>602,56=>602,57=>602,58=>602,59=>602,60=>602,
12
-61=>602,62=>602,63=>602,64=>602,65=>602,66=>602,67=>602,68=>602,69=>602,70=>602,
13
-71=>602,72=>602,73=>602,74=>602,75=>602,76=>602,77=>602,78=>602,79=>602,80=>602,
14
-81=>602,82=>602,83=>602,84=>602,85=>602,86=>602,87=>602,88=>602,89=>602,90=>602,
15
-91=>602,92=>602,93=>602,94=>602,95=>602,96=>602,97=>602,98=>602,99=>602,100=>602,
16
-101=>602,102=>602,103=>602,104=>602,105=>602,106=>602,107=>602,108=>602,109=>602,110=>602,
17
-111=>602,112=>602,113=>602,114=>602,115=>602,116=>602,117=>602,118=>602,119=>602,120=>602,
18
-121=>602,122=>602,123=>602,124=>602,125=>602,126=>602,8364=>602,8218=>602,402=>602,8222=>602,
19
-8230=>602,8224=>602,8225=>602,710=>602,8240=>602,352=>602,8249=>602,338=>602,381=>602,8216=>602,
20
-8217=>602,8220=>602,8221=>602,8226=>602,8211=>602,8212=>602,732=>602,8482=>602,353=>602,8250=>602,
21
-339=>602,382=>602,376=>602,160=>602,161=>602,162=>602,163=>602,164=>602,165=>602,166=>602,
22
-167=>602,168=>602,169=>602,170=>602,171=>602,172=>602,173=>602,174=>602,175=>602,176=>602,
23
-177=>602,178=>602,179=>602,180=>602,181=>602,182=>602,183=>602,184=>602,185=>602,186=>602,
24
-187=>602,188=>602,189=>602,190=>602,191=>602,192=>602,193=>602,194=>602,195=>602,196=>602,
25
-197=>602,198=>602,199=>602,200=>602,201=>602,202=>602,203=>602,204=>602,205=>602,206=>602,
26
-207=>602,208=>602,209=>602,210=>602,211=>602,212=>602,213=>602,214=>602,215=>602,216=>602,
27
-217=>602,218=>602,219=>602,220=>602,221=>602,222=>602,223=>602,224=>602,225=>602,226=>602,
28
-227=>602,228=>602,229=>602,230=>602,231=>602,232=>602,233=>602,234=>602,235=>602,236=>602,
29
-237=>602,238=>602,239=>602,240=>602,241=>602,242=>602,243=>602,244=>602,245=>602,246=>602,
30
-247=>602,248=>602,249=>602,250=>602,251=>602,252=>602,253=>602,254=>602,255=>602,256=>602,
31
-257=>602,258=>602,259=>602,260=>602,261=>602,262=>602,263=>602,264=>602,265=>602,266=>602,
32
-267=>602,268=>602,269=>602,270=>602,271=>602,272=>602,273=>602,274=>602,275=>602,276=>602,
33
-277=>602,278=>602,279=>602,280=>602,281=>602,282=>602,283=>602,284=>602,285=>602,286=>602,
34
-287=>602,288=>602,289=>602,290=>602,291=>602,292=>602,293=>602,294=>602,295=>602,296=>602,
35
-297=>602,298=>602,299=>602,300=>602,301=>602,302=>602,303=>602,304=>602,305=>602,306=>602,
36
-307=>602,308=>602,309=>602,310=>602,311=>602,312=>602,313=>602,314=>602,315=>602,316=>602,
37
-317=>602,318=>602,319=>602,320=>602,321=>602,322=>602,323=>602,324=>602,325=>602,326=>602,
38
-327=>602,328=>602,329=>602,330=>602,331=>602,332=>602,333=>602,334=>602,335=>602,336=>602,
39
-337=>602,340=>602,341=>602,342=>602,343=>602,344=>602,345=>602,346=>602,347=>602,348=>602,
40
-349=>602,350=>602,351=>602,354=>602,355=>602,356=>602,357=>602,358=>602,359=>602,360=>602,
41
-361=>602,362=>602,363=>602,364=>602,365=>602,366=>602,367=>602,368=>602,369=>602,370=>602,
42
-371=>602,372=>602,373=>602,374=>602,375=>602,377=>602,378=>602,379=>602,380=>602,383=>602,
43
-384=>602,385=>602,386=>602,387=>602,388=>602,389=>602,390=>602,391=>602,392=>602,393=>602,
44
-394=>602,395=>602,396=>602,397=>602,398=>602,399=>602,400=>602,401=>602,403=>602,404=>602,
45
-405=>602,406=>602,407=>602,408=>602,409=>602,410=>602,411=>602,412=>602,413=>602,414=>602,
46
-415=>602,416=>602,417=>602,418=>602,419=>602,420=>602,421=>602,422=>602,423=>602,424=>602,
47
-425=>602,426=>602,427=>602,428=>602,429=>602,430=>602,431=>602,432=>602,433=>602,434=>602,
48
-435=>602,436=>602,437=>602,438=>602,439=>602,440=>602,441=>602,442=>602,443=>602,444=>602,
49
-445=>602,446=>602,447=>602,448=>602,449=>602,450=>602,451=>602,461=>602,462=>602,463=>602,
50
-464=>602,465=>602,466=>602,467=>602,468=>602,469=>602,470=>602,471=>602,472=>602,473=>602,
51
-474=>602,475=>602,476=>602,477=>602,478=>602,479=>602,480=>602,481=>602,482=>602,483=>602,
52
-486=>602,487=>602,488=>602,489=>602,490=>602,491=>602,492=>602,493=>602,494=>602,495=>602,
53
-500=>602,501=>602,502=>602,504=>602,505=>602,508=>602,509=>602,510=>602,511=>602,512=>602,
54
-513=>602,514=>602,515=>602,516=>602,517=>602,518=>602,519=>602,520=>602,521=>602,522=>602,
55
-523=>602,524=>602,525=>602,526=>602,527=>602,528=>602,529=>602,530=>602,531=>602,532=>602,
56
-533=>602,534=>602,535=>602,536=>602,537=>602,538=>602,539=>602,540=>602,541=>602,542=>602,
57
-543=>602,545=>602,548=>602,549=>602,550=>602,551=>602,552=>602,553=>602,554=>602,555=>602,
58
-556=>602,557=>602,558=>602,559=>602,560=>602,561=>602,562=>602,563=>602,564=>602,565=>602,
59
-566=>602,567=>602,568=>602,569=>602,570=>602,571=>602,572=>602,573=>602,574=>602,575=>602,
60
-576=>602,577=>602,580=>602,581=>602,588=>602,589=>602,592=>602,593=>602,594=>602,595=>602,
61
-596=>602,597=>602,598=>602,599=>602,600=>602,601=>602,602=>602,603=>602,604=>602,605=>602,
62
-606=>602,607=>602,608=>602,609=>602,610=>602,611=>602,612=>602,613=>602,614=>602,615=>602,
63
-616=>602,617=>602,618=>602,619=>602,620=>602,621=>602,622=>602,623=>602,624=>602,625=>602,
64
-626=>602,627=>602,628=>602,629=>602,630=>602,631=>602,632=>602,633=>602,634=>602,635=>602,
65
-636=>602,637=>602,638=>602,639=>602,640=>602,641=>602,642=>602,643=>602,644=>602,645=>602,
66
-646=>602,647=>602,648=>602,649=>602,650=>602,651=>602,652=>602,653=>602,654=>602,655=>602,
67
-656=>602,657=>602,658=>602,659=>602,660=>602,661=>602,662=>602,663=>602,664=>602,665=>602,
68
-666=>602,667=>602,668=>602,669=>602,670=>602,671=>602,672=>602,673=>602,674=>602,675=>602,
69
-676=>602,677=>602,678=>602,679=>602,680=>602,681=>602,682=>602,683=>602,684=>602,685=>602,
70
-686=>602,687=>602,688=>602,689=>602,690=>602,691=>602,692=>602,693=>602,694=>602,695=>602,
71
-696=>602,697=>602,699=>602,700=>602,701=>602,702=>602,703=>602,704=>602,705=>602,711=>602,
72
-712=>602,713=>602,716=>602,717=>602,720=>602,721=>602,722=>602,723=>602,726=>602,727=>602,
73
-728=>602,729=>602,730=>602,731=>602,733=>602,734=>602,736=>602,737=>602,738=>602,739=>602,
74
-740=>602,741=>602,742=>602,743=>602,744=>602,745=>602,750=>602,755=>602,768=>602,769=>602,
75
-770=>602,771=>602,772=>602,773=>602,774=>602,775=>602,776=>602,777=>602,778=>602,779=>602,
76
-780=>602,781=>602,782=>602,783=>602,784=>602,785=>602,786=>602,787=>602,788=>602,789=>602,
77
-790=>602,791=>602,792=>602,793=>602,794=>602,795=>602,796=>602,797=>602,798=>602,799=>602,
78
-800=>602,801=>602,802=>602,803=>602,804=>602,805=>602,806=>602,807=>602,808=>602,809=>602,
79
-810=>602,811=>602,812=>602,813=>602,814=>602,815=>602,816=>602,817=>602,818=>602,819=>602,
80
-820=>602,821=>602,822=>602,823=>602,824=>602,825=>602,826=>602,827=>602,828=>602,829=>602,
81
-830=>602,831=>602,835=>602,856=>602,865=>602,884=>602,885=>602,890=>602,894=>602,900=>602,
82
-901=>602,902=>602,903=>602,904=>602,905=>602,906=>602,908=>602,910=>602,911=>602,912=>602,
83
-913=>602,914=>602,915=>602,916=>602,917=>602,918=>602,919=>602,920=>602,921=>602,922=>602,
84
-923=>602,924=>602,925=>602,926=>602,927=>602,928=>602,929=>602,931=>602,932=>602,933=>602,
85
-934=>602,935=>602,936=>602,937=>602,938=>602,939=>602,940=>602,941=>602,942=>602,943=>602,
86
-944=>602,945=>602,946=>602,947=>602,948=>602,949=>602,950=>602,951=>602,952=>602,953=>602,
87
-954=>602,955=>602,956=>602,957=>602,958=>602,959=>602,960=>602,961=>602,962=>602,963=>602,
88
-964=>602,965=>602,966=>602,967=>602,968=>602,969=>602,970=>602,971=>602,972=>602,973=>602,
89
-974=>602,976=>602,977=>602,978=>602,979=>602,980=>602,981=>602,982=>602,983=>602,984=>602,
90
-985=>602,986=>602,987=>602,988=>602,989=>602,990=>602,991=>602,992=>602,993=>602,1008=>602,
91
-1009=>602,1010=>602,1011=>602,1012=>602,1013=>602,1014=>602,1015=>602,1016=>602,1017=>602,1018=>602,
92
-1019=>602,1020=>602,1021=>602,1022=>602,1023=>602,1024=>602,1025=>602,1026=>602,1027=>602,1028=>602,
93
-1029=>602,1030=>602,1031=>602,1032=>602,1033=>602,1034=>602,1035=>602,1036=>602,1037=>602,1038=>602,
94
-1039=>602,1040=>602,1041=>602,1042=>602,1043=>602,1044=>602,1045=>602,1046=>602,1047=>602,1048=>602,
95
-1049=>602,1050=>602,1051=>602,1052=>602,1053=>602,1054=>602,1055=>602,1056=>602,1057=>602,1058=>602,
96
-1059=>602,1060=>602,1061=>602,1062=>602,1063=>602,1064=>602,1065=>602,1066=>602,1067=>602,1068=>602,
97
-1069=>602,1070=>602,1071=>602,1072=>602,1073=>602,1074=>602,1075=>602,1076=>602,1077=>602,1078=>602,
98
-1079=>602,1080=>602,1081=>602,1082=>602,1083=>602,1084=>602,1085=>602,1086=>602,1087=>602,1088=>602,
99
-1089=>602,1090=>602,1091=>602,1092=>602,1093=>602,1094=>602,1095=>602,1096=>602,1097=>602,1098=>602,
100
-1099=>602,1100=>602,1101=>602,1102=>602,1103=>602,1104=>602,1105=>602,1106=>602,1107=>602,1108=>602,
101
-1109=>602,1110=>602,1111=>602,1112=>602,1113=>602,1114=>602,1115=>602,1116=>602,1117=>602,1118=>602,
102
-1119=>602,1122=>602,1123=>602,1138=>602,1139=>602,1168=>602,1169=>602,1170=>602,1171=>602,1172=>602,
103
-1173=>602,1174=>602,1175=>602,1176=>602,1177=>602,1178=>602,1179=>602,1186=>602,1187=>602,1194=>602,
104
-1195=>602,1196=>602,1197=>602,1198=>602,1199=>602,1200=>602,1201=>602,1202=>602,1203=>602,1210=>602,
105
-1211=>602,1216=>602,1217=>602,1218=>602,1219=>602,1220=>602,1223=>602,1224=>602,1227=>602,1228=>602,
106
-1231=>602,1232=>602,1233=>602,1234=>602,1235=>602,1236=>602,1237=>602,1238=>602,1239=>602,1240=>602,
107
-1241=>602,1242=>602,1243=>602,1244=>602,1245=>602,1246=>602,1247=>602,1248=>602,1249=>602,1250=>602,
108
-1251=>602,1252=>602,1253=>602,1254=>602,1255=>602,1256=>602,1257=>602,1258=>602,1259=>602,1260=>602,
109
-1261=>602,1262=>602,1263=>602,1264=>602,1265=>602,1266=>602,1267=>602,1268=>602,1269=>602,1270=>602,
110
-1271=>602,1272=>602,1273=>602,1296=>602,1297=>602,1306=>602,1307=>602,1308=>602,1309=>602,3713=>602,
111
-3714=>602,3716=>602,3719=>602,3720=>602,3722=>602,3725=>602,3732=>602,3733=>602,3734=>602,3735=>602,
112
-3737=>602,3738=>602,3739=>602,3740=>602,3741=>602,3742=>602,3743=>602,3745=>602,3746=>602,3747=>602,
113
-3749=>602,3751=>602,3754=>602,3755=>602,3757=>602,3758=>602,3759=>602,3760=>602,3761=>602,3762=>602,
114
-3763=>602,3764=>602,3765=>602,3766=>602,3767=>602,3768=>602,3769=>602,3771=>602,3772=>602,3784=>602,
115
-3785=>602,3786=>602,3787=>602,3788=>602,3789=>602,4304=>602,4305=>602,4306=>602,4307=>602,4308=>602,
116
-4309=>602,4310=>602,4311=>602,4312=>602,4313=>602,4314=>602,4315=>602,4316=>602,4317=>602,4318=>602,
117
-4319=>602,4320=>602,4321=>602,4322=>602,4323=>602,4324=>602,4325=>602,4326=>602,4327=>602,4328=>602,
118
-4329=>602,4330=>602,4331=>602,4332=>602,4333=>602,4334=>602,4335=>602,4336=>602,4337=>602,4338=>602,
119
-4339=>602,4340=>602,4341=>602,4342=>602,4343=>602,4344=>602,4345=>602,4346=>602,4347=>602,4348=>602,
120
-7426=>602,7432=>602,7433=>602,7444=>602,7446=>602,7447=>602,7453=>602,7454=>602,7455=>602,7468=>602,
121
-7469=>602,7470=>602,7472=>602,7473=>602,7474=>602,7475=>602,7476=>602,7477=>602,7478=>602,7479=>602,
122
-7480=>602,7481=>602,7482=>602,7483=>602,7484=>602,7486=>602,7487=>602,7488=>602,7489=>602,7490=>602,
123
-7491=>602,7492=>602,7493=>602,7494=>602,7495=>602,7496=>602,7497=>602,7498=>602,7499=>602,7500=>602,
124
-7501=>602,7502=>602,7503=>602,7504=>602,7505=>602,7506=>602,7507=>602,7508=>602,7509=>602,7510=>602,
125
-7511=>602,7512=>602,7513=>602,7514=>602,7515=>602,7522=>602,7523=>602,7524=>602,7525=>602,7543=>602,
126
-7544=>602,7547=>602,7557=>602,7579=>602,7580=>602,7581=>602,7582=>602,7583=>602,7584=>602,7585=>602,
127
-7586=>602,7587=>602,7588=>602,7589=>602,7590=>602,7591=>602,7592=>602,7593=>602,7594=>602,7595=>602,
128
-7596=>602,7597=>602,7598=>602,7599=>602,7600=>602,7601=>602,7602=>602,7603=>602,7604=>602,7605=>602,
129
-7606=>602,7607=>602,7609=>602,7610=>602,7611=>602,7612=>602,7613=>602,7614=>602,7615=>602,7680=>602,
130
-7681=>602,7682=>602,7683=>602,7684=>602,7685=>602,7686=>602,7687=>602,7688=>602,7689=>602,7690=>602,
131
-7691=>602,7692=>602,7693=>602,7694=>602,7695=>602,7696=>602,7697=>602,7698=>602,7699=>602,7704=>602,
132
-7705=>602,7706=>602,7707=>602,7708=>602,7709=>602,7710=>602,7711=>602,7712=>602,7713=>602,7714=>602,
133
-7715=>602,7716=>602,7717=>602,7718=>602,7719=>602,7720=>602,7721=>602,7722=>602,7723=>602,7724=>602,
134
-7725=>602,7728=>602,7729=>602,7730=>602,7731=>602,7732=>602,7733=>602,7734=>602,7735=>602,7736=>602,
135
-7737=>602,7738=>602,7739=>602,7740=>602,7741=>602,7742=>602,7743=>602,7744=>602,7745=>602,7746=>602,
136
-7747=>602,7748=>602,7749=>602,7750=>602,7751=>602,7752=>602,7753=>602,7754=>602,7755=>602,7756=>602,
137
-7757=>602,7764=>602,7765=>602,7766=>602,7767=>602,7768=>602,7769=>602,7770=>602,7771=>602,7772=>602,
138
-7773=>602,7774=>602,7775=>602,7776=>602,7777=>602,7778=>602,7779=>602,7784=>602,7785=>602,7786=>602,
139
-7787=>602,7788=>602,7789=>602,7790=>602,7791=>602,7792=>602,7793=>602,7794=>602,7795=>602,7796=>602,
140
-7797=>602,7798=>602,7799=>602,7800=>602,7801=>602,7804=>602,7805=>602,7806=>602,7807=>602,7808=>602,
141
-7809=>602,7810=>602,7811=>602,7812=>602,7813=>602,7814=>602,7815=>602,7816=>602,7817=>602,7818=>602,
142
-7819=>602,7820=>602,7821=>602,7822=>602,7823=>602,7824=>602,7825=>602,7826=>602,7827=>602,7828=>602,
143
-7829=>602,7830=>602,7831=>602,7832=>602,7833=>602,7835=>602,7839=>602,7840=>602,7841=>602,7852=>602,
144
-7853=>602,7856=>602,7857=>602,7862=>602,7863=>602,7864=>602,7865=>602,7868=>602,7869=>602,7878=>602,
145
-7879=>602,7882=>602,7883=>602,7884=>602,7885=>602,7896=>602,7897=>602,7898=>602,7899=>602,7900=>602,
146
-7901=>602,7904=>602,7905=>602,7906=>602,7907=>602,7908=>602,7909=>602,7912=>602,7913=>602,7914=>602,
147
-7915=>602,7918=>602,7919=>602,7920=>602,7921=>602,7922=>602,7923=>602,7924=>602,7925=>602,7928=>602,
148
-7929=>602,7936=>602,7937=>602,7938=>602,7939=>602,7940=>602,7941=>602,7942=>602,7943=>602,7944=>602,
149
-7945=>602,7946=>602,7947=>602,7948=>602,7949=>602,7950=>602,7951=>602,7952=>602,7953=>602,7954=>602,
150
-7955=>602,7956=>602,7957=>602,7960=>602,7961=>602,7962=>602,7963=>602,7964=>602,7965=>602,7968=>602,
151
-7969=>602,7970=>602,7971=>602,7972=>602,7973=>602,7974=>602,7975=>602,7976=>602,7977=>602,7978=>602,
152
-7979=>602,7980=>602,7981=>602,7982=>602,7983=>602,7984=>602,7985=>602,7986=>602,7987=>602,7988=>602,
153
-7989=>602,7990=>602,7991=>602,7992=>602,7993=>602,7994=>602,7995=>602,7996=>602,7997=>602,7998=>602,
154
-7999=>602,8000=>602,8001=>602,8002=>602,8003=>602,8004=>602,8005=>602,8008=>602,8009=>602,8010=>602,
155
-8011=>602,8012=>602,8013=>602,8016=>602,8017=>602,8018=>602,8019=>602,8020=>602,8021=>602,8022=>602,
156
-8023=>602,8025=>602,8027=>602,8029=>602,8031=>602,8032=>602,8033=>602,8034=>602,8035=>602,8036=>602,
157
-8037=>602,8038=>602,8039=>602,8040=>602,8041=>602,8042=>602,8043=>602,8044=>602,8045=>602,8046=>602,
158
-8047=>602,8048=>602,8049=>602,8050=>602,8051=>602,8052=>602,8053=>602,8054=>602,8055=>602,8056=>602,
159
-8057=>602,8058=>602,8059=>602,8060=>602,8061=>602,8064=>602,8065=>602,8066=>602,8067=>602,8068=>602,
160
-8069=>602,8070=>602,8071=>602,8072=>602,8073=>602,8074=>602,8075=>602,8076=>602,8077=>602,8078=>602,
161
-8079=>602,8080=>602,8081=>602,8082=>602,8083=>602,8084=>602,8085=>602,8086=>602,8087=>602,8088=>602,
162
-8089=>602,8090=>602,8091=>602,8092=>602,8093=>602,8094=>602,8095=>602,8096=>602,8097=>602,8098=>602,
163
-8099=>602,8100=>602,8101=>602,8102=>602,8103=>602,8104=>602,8105=>602,8106=>602,8107=>602,8108=>602,
164
-8109=>602,8110=>602,8111=>602,8112=>602,8113=>602,8114=>602,8115=>602,8116=>602,8118=>602,8119=>602,
165
-8120=>602,8121=>602,8122=>602,8123=>602,8124=>602,8125=>602,8126=>602,8127=>602,8128=>602,8129=>602,
166
-8130=>602,8131=>602,8132=>602,8134=>602,8135=>602,8136=>602,8137=>602,8138=>602,8139=>602,8140=>602,
167
-8141=>602,8142=>602,8143=>602,8144=>602,8145=>602,8146=>602,8147=>602,8150=>602,8151=>602,8152=>602,
168
-8153=>602,8154=>602,8155=>602,8157=>602,8158=>602,8159=>602,8160=>602,8161=>602,8162=>602,8163=>602,
169
-8164=>602,8165=>602,8166=>602,8167=>602,8168=>602,8169=>602,8170=>602,8171=>602,8172=>602,8173=>602,
170
-8174=>602,8175=>602,8178=>602,8179=>602,8180=>602,8182=>602,8183=>602,8184=>602,8185=>602,8186=>602,
171
-8187=>602,8188=>602,8189=>602,8190=>602,8192=>602,8193=>602,8194=>602,8195=>602,8196=>602,8197=>602,
172
-8198=>602,8199=>602,8200=>602,8201=>602,8202=>602,8208=>602,8209=>602,8210=>602,8213=>602,8215=>602,
173
-8219=>602,8223=>602,8227=>602,8239=>602,8241=>602,8242=>602,8243=>602,8244=>602,8245=>602,8246=>602,
174
-8247=>602,8252=>602,8253=>602,8254=>602,8261=>602,8262=>602,8263=>602,8264=>602,8265=>602,8287=>602,
175
-8304=>602,8305=>602,8308=>602,8309=>602,8310=>602,8311=>602,8312=>602,8313=>602,8314=>602,8315=>602,
176
-8316=>602,8317=>602,8318=>602,8319=>602,8320=>602,8321=>602,8322=>602,8323=>602,8324=>602,8325=>602,
177
-8326=>602,8327=>602,8328=>602,8329=>602,8330=>602,8331=>602,8332=>602,8333=>602,8334=>602,8336=>602,
178
-8337=>602,8338=>602,8339=>602,8340=>602,8352=>602,8353=>602,8354=>602,8355=>602,8356=>602,8357=>602,
179
-8358=>602,8359=>602,8360=>602,8361=>602,8362=>602,8363=>602,8365=>602,8366=>602,8367=>602,8368=>602,
180
-8369=>602,8370=>602,8371=>602,8372=>602,8373=>602,8450=>602,8453=>602,8461=>602,8462=>602,8463=>602,
181
-8469=>602,8470=>602,8471=>602,8473=>602,8474=>602,8477=>602,8484=>602,8486=>602,8490=>602,8491=>602,
182
-8494=>602,8531=>602,8532=>602,8533=>602,8534=>602,8535=>602,8536=>602,8537=>602,8538=>602,8539=>602,
183
-8540=>602,8541=>602,8542=>602,8543=>602,8592=>602,8593=>602,8594=>602,8595=>602,8596=>602,8597=>602,
184
-8598=>602,8599=>602,8600=>602,8601=>602,8602=>602,8603=>602,8604=>602,8605=>602,8606=>602,8607=>602,
185
-8608=>602,8609=>602,8610=>602,8611=>602,8612=>602,8613=>602,8614=>602,8615=>602,8616=>602,8617=>602,
186
-8618=>602,8619=>602,8620=>602,8621=>602,8622=>602,8623=>602,8624=>602,8625=>602,8626=>602,8627=>602,
187
-8628=>602,8629=>602,8630=>602,8631=>602,8632=>602,8633=>602,8634=>602,8635=>602,8636=>602,8637=>602,
188
-8638=>602,8639=>602,8640=>602,8641=>602,8642=>602,8643=>602,8644=>602,8645=>602,8646=>602,8647=>602,
189
-8648=>602,8649=>602,8650=>602,8651=>602,8652=>602,8653=>602,8654=>602,8655=>602,8656=>602,8657=>602,
190
-8658=>602,8659=>602,8660=>602,8661=>602,8662=>602,8663=>602,8664=>602,8665=>602,8666=>602,8667=>602,
191
-8668=>602,8669=>602,8670=>602,8671=>602,8672=>602,8673=>602,8674=>602,8675=>602,8676=>602,8677=>602,
192
-8678=>602,8679=>602,8680=>602,8681=>602,8682=>602,8683=>602,8684=>602,8685=>602,8686=>602,8687=>602,
193
-8688=>602,8689=>602,8690=>602,8691=>602,8692=>602,8693=>602,8694=>602,8695=>602,8696=>602,8697=>602,
194
-8698=>602,8699=>602,8700=>602,8701=>602,8702=>602,8703=>602,8704=>602,8705=>602,8706=>602,8707=>602,
195
-8708=>602,8709=>602,8710=>602,8711=>602,8712=>602,8713=>602,8714=>602,8715=>602,8716=>602,8717=>602,
196
-8719=>602,8721=>602,8722=>602,8723=>602,8725=>602,8727=>602,8728=>602,8729=>602,8730=>602,8731=>602,
197
-8732=>602,8733=>602,8734=>602,8735=>602,8736=>602,8743=>602,8744=>602,8745=>602,8746=>602,8747=>602,
198
-8748=>602,8749=>602,8760=>602,8761=>602,8762=>602,8763=>602,8764=>602,8765=>602,8769=>602,8770=>602,
199
-8771=>602,8772=>602,8773=>602,8774=>602,8775=>602,8776=>602,8777=>602,8778=>602,8779=>602,8780=>602,
200
-8781=>602,8782=>602,8783=>602,8784=>602,8785=>602,8786=>602,8787=>602,8788=>602,8789=>602,8790=>602,
201
-8791=>602,8792=>602,8793=>602,8794=>602,8795=>602,8796=>602,8797=>602,8798=>602,8799=>602,8800=>602,
202
-8801=>602,8802=>602,8803=>602,8804=>602,8805=>602,8806=>602,8807=>602,8808=>602,8809=>602,8813=>602,
203
-8814=>602,8815=>602,8816=>602,8817=>602,8818=>602,8819=>602,8820=>602,8821=>602,8822=>602,8823=>602,
204
-8824=>602,8825=>602,8826=>602,8827=>602,8828=>602,8829=>602,8830=>602,8831=>602,8832=>602,8833=>602,
205
-8834=>602,8835=>602,8836=>602,8837=>602,8838=>602,8839=>602,8840=>602,8841=>602,8842=>602,8843=>602,
206
-8847=>602,8848=>602,8849=>602,8850=>602,8853=>602,8854=>602,8855=>602,8856=>602,8857=>602,8858=>602,
207
-8859=>602,8860=>602,8861=>602,8862=>602,8863=>602,8864=>602,8865=>602,8901=>602,8902=>602,8909=>602,
208
-8922=>602,8923=>602,8924=>602,8925=>602,8926=>602,8927=>602,8928=>602,8929=>602,8930=>602,8931=>602,
209
-8932=>602,8933=>602,8934=>602,8935=>602,8936=>602,8937=>602,8943=>602,8960=>602,8961=>602,8962=>602,
210
-8963=>602,8964=>602,8965=>602,8966=>602,8968=>602,8969=>602,8970=>602,8971=>602,8972=>602,8973=>602,
211
-8974=>602,8975=>602,8976=>602,8977=>602,8978=>602,8979=>602,8980=>602,8981=>602,8984=>602,8985=>602,
212
-8988=>602,8989=>602,8990=>602,8991=>602,8992=>602,8993=>602,8997=>602,8998=>602,8999=>602,9000=>602,
213
-9003=>602,9013=>602,9015=>602,9016=>602,9017=>602,9018=>602,9019=>602,9020=>602,9021=>602,9022=>602,
214
-9025=>602,9026=>602,9027=>602,9028=>602,9031=>602,9032=>602,9033=>602,9035=>602,9036=>602,9037=>602,
215
-9040=>602,9042=>602,9043=>602,9044=>602,9047=>602,9048=>602,9049=>602,9050=>602,9051=>602,9052=>602,
216
-9054=>602,9055=>602,9056=>602,9059=>602,9060=>602,9061=>602,9064=>602,9065=>602,9067=>602,9068=>602,
217
-9069=>602,9070=>602,9071=>602,9072=>602,9075=>602,9076=>602,9077=>602,9078=>602,9079=>602,9080=>602,
218
-9081=>602,9082=>602,9085=>602,9088=>602,9089=>602,9090=>602,9091=>602,9096=>602,9097=>602,9098=>602,
219
-9099=>602,9109=>602,9115=>602,9116=>602,9117=>602,9118=>602,9119=>602,9120=>602,9121=>602,9122=>602,
220
-9123=>602,9124=>602,9125=>602,9126=>602,9127=>602,9128=>602,9129=>602,9130=>602,9131=>602,9132=>602,
221
-9133=>602,9134=>602,9166=>602,9167=>602,9251=>602,9600=>602,9601=>602,9602=>602,9603=>602,9604=>602,
222
-9605=>602,9606=>602,9607=>602,9608=>602,9609=>602,9610=>602,9611=>602,9612=>602,9613=>602,9614=>602,
223
-9615=>602,9616=>602,9617=>602,9618=>602,9619=>602,9620=>602,9621=>602,9622=>602,9623=>602,9624=>602,
224
-9625=>602,9626=>602,9627=>602,9628=>602,9629=>602,9630=>602,9631=>602,9632=>602,9633=>602,9634=>602,
225
-9635=>602,9636=>602,9637=>602,9638=>602,9639=>602,9640=>602,9641=>602,9642=>602,9643=>602,9644=>602,
226
-9645=>602,9646=>602,9647=>602,9648=>602,9649=>602,9650=>602,9651=>602,9652=>602,9653=>602,9654=>602,
227
-9655=>602,9656=>602,9657=>602,9658=>602,9659=>602,9660=>602,9661=>602,9662=>602,9663=>602,9664=>602,
228
-9665=>602,9666=>602,9667=>602,9668=>602,9669=>602,9670=>602,9671=>602,9672=>602,9673=>602,9674=>602,
229
-9675=>602,9676=>602,9677=>602,9678=>602,9679=>602,9680=>602,9681=>602,9682=>602,9683=>602,9684=>602,
230
-9685=>602,9686=>602,9687=>602,9688=>602,9689=>602,9690=>602,9691=>602,9692=>602,9693=>602,9694=>602,
231
-9695=>602,9696=>602,9697=>602,9698=>602,9699=>602,9700=>602,9701=>602,9702=>602,9703=>602,9704=>602,
232
-9705=>602,9706=>602,9707=>602,9708=>602,9709=>602,9710=>602,9711=>602,9712=>602,9713=>602,9714=>602,
233
-9715=>602,9716=>602,9717=>602,9718=>602,9719=>602,9720=>602,9721=>602,9722=>602,9723=>602,9724=>602,
234
-9725=>602,9726=>602,9727=>602,9728=>602,9784=>602,9785=>602,9786=>602,9787=>602,9788=>602,9791=>602,
235
-9792=>602,9793=>602,9794=>602,9795=>602,9796=>602,9797=>602,9798=>602,9799=>602,9824=>602,9825=>602,
236
-9826=>602,9827=>602,9828=>602,9829=>602,9830=>602,9831=>602,9833=>602,9834=>602,9835=>602,9836=>602,
237
-9837=>602,9838=>602,9839=>602,10181=>602,10182=>602,10208=>602,10216=>602,10217=>602,10731=>602,10746=>602,
238
-10747=>602,10799=>602,11026=>602,11027=>602,11028=>602,11029=>602,11030=>602,11031=>602,11032=>602,11033=>602,
239
-11034=>602,11364=>602,11374=>602,11375=>602,11381=>602,11382=>602,11383=>602,11385=>602,11386=>602,11388=>602,
240
-11389=>602,11800=>602,11810=>602,11811=>602,11812=>602,11813=>602,11822=>602,42760=>602,42761=>602,42762=>602,
241
-42763=>602,42764=>602,42765=>602,42766=>602,42767=>602,42768=>602,42769=>602,42770=>602,42771=>602,42772=>602,
242
-42773=>602,42774=>602,42779=>602,42780=>602,42781=>602,42782=>602,42783=>602,42790=>602,42791=>602,42889=>602,
243
-42890=>602,42891=>602,42892=>602,63173=>602,64257=>602,64258=>602,65529=>602,65530=>602,65531=>602,65532=>602,
1
+<?php if (!defined('ABSPATH')) exit;
2
+$type = 'TrueTypeUnicode';
3
+$name = 'DejaVuSansMono-BoldOblique';
4
+$desc = array('Ascent'=>928, 'Descent'=>-236, 'CapHeight'=>-70, 'Flags'=>97, 'FontBBox'=>'[-428 -394 808 1053]', 'ItalicAngle'=>-11, 'StemV'=>120, 'MissingWidth'=>602);
5
+$up = -63;
6
+$ut = 44;
7
+$dw = 602;
8
+$cw = array(
9
+0=>602, 32=>602, 33=>602, 34=>602, 35=>602, 36=>602, 37=>602, 38=>602, 39=>602, 40=>602,
10
+41=>602, 42=>602, 43=>602, 44=>602, 45=>602, 46=>602, 47=>602, 48=>602, 49=>602, 50=>602,
11
+51=>602, 52=>602, 53=>602, 54=>602, 55=>602, 56=>602, 57=>602, 58=>602, 59=>602, 60=>602,
12
+61=>602, 62=>602, 63=>602, 64=>602, 65=>602, 66=>602, 67=>602, 68=>602, 69=>602, 70=>602,
13
+71=>602, 72=>602, 73=>602, 74=>602, 75=>602, 76=>602, 77=>602, 78=>602, 79=>602, 80=>602,
14
+81=>602, 82=>602, 83=>602, 84=>602, 85=>602, 86=>602, 87=>602, 88=>602, 89=>602, 90=>602,
15
+91=>602, 92=>602, 93=>602, 94=>602, 95=>602, 96=>602, 97=>602, 98=>602, 99=>602, 100=>602,
16
+101=>602, 102=>602, 103=>602, 104=>602, 105=>602, 106=>602, 107=>602, 108=>602, 109=>602, 110=>602,
17
+111=>602, 112=>602, 113=>602, 114=>602, 115=>602, 116=>602, 117=>602, 118=>602, 119=>602, 120=>602,
18
+121=>602, 122=>602, 123=>602, 124=>602, 125=>602, 126=>602, 8364=>602, 8218=>602, 402=>602, 8222=>602,
19
+8230=>602, 8224=>602, 8225=>602, 710=>602, 8240=>602, 352=>602, 8249=>602, 338=>602, 381=>602, 8216=>602,
20
+8217=>602, 8220=>602, 8221=>602, 8226=>602, 8211=>602, 8212=>602, 732=>602, 8482=>602, 353=>602, 8250=>602,
21
+339=>602, 382=>602, 376=>602, 160=>602, 161=>602, 162=>602, 163=>602, 164=>602, 165=>602, 166=>602,
22
+167=>602, 168=>602, 169=>602, 170=>602, 171=>602, 172=>602, 173=>602, 174=>602, 175=>602, 176=>602,
23
+177=>602, 178=>602, 179=>602, 180=>602, 181=>602, 182=>602, 183=>602, 184=>602, 185=>602, 186=>602,
24
+187=>602, 188=>602, 189=>602, 190=>602, 191=>602, 192=>602, 193=>602, 194=>602, 195=>602, 196=>602,
25
+197=>602, 198=>602, 199=>602, 200=>602, 201=>602, 202=>602, 203=>602, 204=>602, 205=>602, 206=>602,
26
+207=>602, 208=>602, 209=>602, 210=>602, 211=>602, 212=>602, 213=>602, 214=>602, 215=>602, 216=>602,
27
+217=>602, 218=>602, 219=>602, 220=>602, 221=>602, 222=>602, 223=>602, 224=>602, 225=>602, 226=>602,
28
+227=>602, 228=>602, 229=>602, 230=>602, 231=>602, 232=>602, 233=>602, 234=>602, 235=>602, 236=>602,
29
+237=>602, 238=>602, 239=>602, 240=>602, 241=>602, 242=>602, 243=>602, 244=>602, 245=>602, 246=>602,
30
+247=>602, 248=>602, 249=>602, 250=>602, 251=>602, 252=>602, 253=>602, 254=>602, 255=>602, 256=>602,
31
+257=>602, 258=>602, 259=>602, 260=>602, 261=>602, 262=>602, 263=>602, 264=>602, 265=>602, 266=>602,
32
+267=>602, 268=>602, 269=>602, 270=>602, 271=>602, 272=>602, 273=>602, 274=>602, 275=>602, 276=>602,
33
+277=>602, 278=>602, 279=>602, 280=>602, 281=>602, 282=>602, 283=>602, 284=>602, 285=>602, 286=>602,
34
+287=>602, 288=>602, 289=>602, 290=>602, 291=>602, 292=>602, 293=>602, 294=>602, 295=>602, 296=>602,
35
+297=>602, 298=>602, 299=>602, 300=>602, 301=>602, 302=>602, 303=>602, 304=>602, 305=>602, 306=>602,
36
+307=>602, 308=>602, 309=>602, 310=>602, 311=>602, 312=>602, 313=>602, 314=>602, 315=>602, 316=>602,
37
+317=>602, 318=>602, 319=>602, 320=>602, 321=>602, 322=>602, 323=>602, 324=>602, 325=>602, 326=>602,
38
+327=>602, 328=>602, 329=>602, 330=>602, 331=>602, 332=>602, 333=>602, 334=>602, 335=>602, 336=>602,
39
+337=>602, 340=>602, 341=>602, 342=>602, 343=>602, 344=>602, 345=>602, 346=>602, 347=>602, 348=>602,
40
+349=>602, 350=>602, 351=>602, 354=>602, 355=>602, 356=>602, 357=>602, 358=>602, 359=>602, 360=>602,
41
+361=>602, 362=>602, 363=>602, 364=>602, 365=>602, 366=>602, 367=>602, 368=>602, 369=>602, 370=>602,
42
+371=>602, 372=>602, 373=>602, 374=>602, 375=>602, 377=>602, 378=>602, 379=>602, 380=>602, 383=>602,
43
+384=>602, 385=>602, 386=>602, 387=>602, 388=>602, 389=>602, 390=>602, 391=>602, 392=>602, 393=>602,
44
+394=>602, 395=>602, 396=>602, 397=>602, 398=>602, 399=>602, 400=>602, 401=>602, 403=>602, 404=>602,
45
+405=>602, 406=>602, 407=>602, 408=>602, 409=>602, 410=>602, 411=>602, 412=>602, 413=>602, 414=>602,
46
+415=>602, 416=>602, 417=>602, 418=>602, 419=>602, 420=>602, 421=>602, 422=>602, 423=>602, 424=>602,
47
+425=>602, 426=>602, 427=>602, 428=>602, 429=>602, 430=>602, 431=>602, 432=>602, 433=>602, 434=>602,
48
+435=>602, 436=>602, 437=>602, 438=>602, 439=>602, 440=>602, 441=>602, 442=>602, 443=>602, 444=>602,
49
+445=>602, 446=>602, 447=>602, 448=>602, 449=>602, 450=>602, 451=>602, 461=>602, 462=>602, 463=>602,
50
+464=>602, 465=>602, 466=>602, 467=>602, 468=>602, 469=>602, 470=>602, 471=>602, 472=>602, 473=>602,
51
+474=>602, 475=>602, 476=>602, 477=>602, 478=>602, 479=>602, 480=>602, 481=>602, 482=>602, 483=>602,
52
+486=>602, 487=>602, 488=>602, 489=>602, 490=>602, 491=>602, 492=>602, 493=>602, 494=>602, 495=>602,
53
+500=>602, 501=>602, 502=>602, 504=>602, 505=>602, 508=>602, 509=>602, 510=>602, 511=>602, 512=>602,
54
+513=>602, 514=>602, 515=>602, 516=>602, 517=>602, 518=>602, 519=>602, 520=>602, 521=>602, 522=>602,
55
+523=>602, 524=>602, 525=>602, 526=>602, 527=>602, 528=>602, 529=>602, 530=>602, 531=>602, 532=>602,
56
+533=>602, 534=>602, 535=>602, 536=>602, 537=>602, 538=>602, 539=>602, 540=>602, 541=>602, 542=>602,
57
+543=>602, 545=>602, 548=>602, 549=>602, 550=>602, 551=>602, 552=>602, 553=>602, 554=>602, 555=>602,
58
+556=>602, 557=>602, 558=>602, 559=>602, 560=>602, 561=>602, 562=>602, 563=>602, 564=>602, 565=>602,
59
+566=>602, 567=>602, 568=>602, 569=>602, 570=>602, 571=>602, 572=>602, 573=>602, 574=>602, 575=>602,
60
+576=>602, 577=>602, 580=>602, 581=>602, 588=>602, 589=>602, 592=>602, 593=>602, 594=>602, 595=>602,
61
+596=>602, 597=>602, 598=>602, 599=>602, 600=>602, 601=>602, 602=>602, 603=>602, 604=>602, 605=>602,
62
+606=>602, 607=>602, 608=>602, 609=>602, 610=>602, 611=>602, 612=>602, 613=>602, 614=>602, 615=>602,
63
+616=>602, 617=>602, 618=>602, 619=>602, 620=>602, 621=>602, 622=>602, 623=>602, 624=>602, 625=>602,
64
+626=>602, 627=>602, 628=>602, 629=>602, 630=>602, 631=>602, 632=>602, 633=>602, 634=>602, 635=>602,
65
+636=>602, 637=>602, 638=>602, 639=>602, 640=>602, 641=>602, 642=>602, 643=>602, 644=>602, 645=>602,
66
+646=>602, 647=>602, 648=>602, 649=>602, 650=>602, 651=>602, 652=>602, 653=>602, 654=>602, 655=>602,
67
+656=>602, 657=>602, 658=>602, 659=>602, 660=>602, 661=>602, 662=>602, 663=>602, 664=>602, 665=>602,
68
+666=>602, 667=>602, 668=>602, 669=>602, 670=>602, 671=>602, 672=>602, 673=>602, 674=>602, 675=>602,
69
+676=>602, 677=>602, 678=>602, 679=>602, 680=>602, 681=>602, 682=>602, 683=>602, 684=>602, 685=>602,
70
+686=>602, 687=>602, 688=>602, 689=>602, 690=>602, 691=>602, 692=>602, 693=>602, 694=>602, 695=>602,
71
+696=>602, 697=>602, 699=>602, 700=>602, 701=>602, 702=>602, 703=>602, 704=>602, 705=>602, 711=>602,
72
+712=>602, 713=>602, 716=>602, 717=>602, 720=>602, 721=>602, 722=>602, 723=>602, 726=>602, 727=>602,
73
+728=>602, 729=>602, 730=>602, 731=>602, 733=>602, 734=>602, 736=>602, 737=>602, 738=>602, 739=>602,
74
+740=>602, 741=>602, 742=>602, 743=>602, 744=>602, 745=>602, 750=>602, 755=>602, 768=>602, 769=>602,
75
+770=>602, 771=>602, 772=>602, 773=>602, 774=>602, 775=>602, 776=>602, 777=>602, 778=>602, 779=>602,
76
+780=>602, 781=>602, 782=>602, 783=>602, 784=>602, 785=>602, 786=>602, 787=>602, 788=>602, 789=>602,
77
+790=>602, 791=>602, 792=>602, 793=>602, 794=>602, 795=>602, 796=>602, 797=>602, 798=>602, 799=>602,
78
+800=>602, 801=>602, 802=>602, 803=>602, 804=>602, 805=>602, 806=>602, 807=>602, 808=>602, 809=>602,
79
+810=>602, 811=>602, 812=>602, 813=>602, 814=>602, 815=>602, 816=>602, 817=>602, 818=>602, 819=>602,
80
+820=>602, 821=>602, 822=>602, 823=>602, 824=>602, 825=>602, 826=>602, 827=>602, 828=>602, 829=>602,
81
+830=>602, 831=>602, 835=>602, 856=>602, 865=>602, 884=>602, 885=>602, 890=>602, 894=>602, 900=>602,
82
+901=>602, 902=>602, 903=>602, 904=>602, 905=>602, 906=>602, 908=>602, 910=>602, 911=>602, 912=>602,
83
+913=>602, 914=>602, 915=>602, 916=>602, 917=>602, 918=>602, 919=>602, 920=>602, 921=>602, 922=>602,
84
+923=>602, 924=>602, 925=>602, 926=>602, 927=>602, 928=>602, 929=>602, 931=>602, 932=>602, 933=>602,
85
+934=>602, 935=>602, 936=>602, 937=>602, 938=>602, 939=>602, 940=>602, 941=>602, 942=>602, 943=>602,
86
+944=>602, 945=>602, 946=>602, 947=>602, 948=>602, 949=>602, 950=>602, 951=>602, 952=>602, 953=>602,
87
+954=>602, 955=>602, 956=>602, 957=>602, 958=>602, 959=>602, 960=>602, 961=>602, 962=>602, 963=>602,
88
+964=>602, 965=>602, 966=>602, 967=>602, 968=>602, 969=>602, 970=>602, 971=>602, 972=>602, 973=>602,
89
+974=>602, 976=>602, 977=>602, 978=>602, 979=>602, 980=>602, 981=>602, 982=>602, 983=>602, 984=>602,
90
+985=>602, 986=>602, 987=>602, 988=>602, 989=>602, 990=>602, 991=>602, 992=>602, 993=>602, 1008=>602,
91
+1009=>602, 1010=>602, 1011=>602, 1012=>602, 1013=>602, 1014=>602, 1015=>602, 1016=>602, 1017=>602, 1018=>602,
92
+1019=>602, 1020=>602, 1021=>602, 1022=>602, 1023=>602, 1024=>602, 1025=>602, 1026=>602, 1027=>602, 1028=>602,
93
+1029=>602, 1030=>602, 1031=>602, 1032=>602, 1033=>602, 1034=>602, 1035=>602, 1036=>602, 1037=>602, 1038=>602,
94
+1039=>602, 1040=>602, 1041=>602, 1042=>602, 1043=>602, 1044=>602, 1045=>602, 1046=>602, 1047=>602, 1048=>602,
95
+1049=>602, 1050=>602, 1051=>602, 1052=>602, 1053=>602, 1054=>602, 1055=>602, 1056=>602, 1057=>602, 1058=>602,
96
+1059=>602, 1060=>602, 1061=>602, 1062=>602, 1063=>602, 1064=>602, 1065=>602, 1066=>602, 1067=>602, 1068=>602,
97
+1069=>602, 1070=>602, 1071=>602, 1072=>602, 1073=>602, 1074=>602, 1075=>602, 1076=>602, 1077=>602, 1078=>602,
98
+1079=>602, 1080=>602, 1081=>602, 1082=>602, 1083=>602, 1084=>602, 1085=>602, 1086=>602, 1087=>602, 1088=>602,
99
+1089=>602, 1090=>602, 1091=>602, 1092=>602, 1093=>602, 1094=>602, 1095=>602, 1096=>602, 1097=>602, 1098=>602,
100
+1099=>602, 1100=>602, 1101=>602, 1102=>602, 1103=>602, 1104=>602, 1105=>602, 1106=>602, 1107=>602, 1108=>602,
101
+1109=>602, 1110=>602, 1111=>602, 1112=>602, 1113=>602, 1114=>602, 1115=>602, 1116=>602, 1117=>602, 1118=>602,
102
+1119=>602, 1122=>602, 1123=>602, 1138=>602, 1139=>602, 1168=>602, 1169=>602, 1170=>602, 1171=>602, 1172=>602,
103
+1173=>602, 1174=>602, 1175=>602, 1176=>602, 1177=>602, 1178=>602, 1179=>602, 1186=>602, 1187=>602, 1194=>602,
104
+1195=>602, 1196=>602, 1197=>602, 1198=>602, 1199=>602, 1200=>602, 1201=>602, 1202=>602, 1203=>602, 1210=>602,
105
+1211=>602, 1216=>602, 1217=>602, 1218=>602, 1219=>602, 1220=>602, 1223=>602, 1224=>602, 1227=>602, 1228=>602,
106
+1231=>602, 1232=>602, 1233=>602, 1234=>602, 1235=>602, 1236=>602, 1237=>602, 1238=>602, 1239=>602, 1240=>602,
107
+1241=>602, 1242=>602, 1243=>602, 1244=>602, 1245=>602, 1246=>602, 1247=>602, 1248=>602, 1249=>602, 1250=>602,
108
+1251=>602, 1252=>602, 1253=>602, 1254=>602, 1255=>602, 1256=>602, 1257=>602, 1258=>602, 1259=>602, 1260=>602,
109
+1261=>602, 1262=>602, 1263=>602, 1264=>602, 1265=>602, 1266=>602, 1267=>602, 1268=>602, 1269=>602, 1270=>602,
110
+1271=>602, 1272=>602, 1273=>602, 1296=>602, 1297=>602, 1306=>602, 1307=>602, 1308=>602, 1309=>602, 3713=>602,
111
+3714=>602, 3716=>602, 3719=>602, 3720=>602, 3722=>602, 3725=>602, 3732=>602, 3733=>602, 3734=>602, 3735=>602,
112
+3737=>602, 3738=>602, 3739=>602, 3740=>602, 3741=>602, 3742=>602, 3743=>602, 3745=>602, 3746=>602, 3747=>602,
113
+3749=>602, 3751=>602, 3754=>602, 3755=>602, 3757=>602, 3758=>602, 3759=>602, 3760=>602, 3761=>602, 3762=>602,
114
+3763=>602, 3764=>602, 3765=>602, 3766=>602, 3767=>602, 3768=>602, 3769=>602, 3771=>602, 3772=>602, 3784=>602,
115
+3785=>602, 3786=>602, 3787=>602, 3788=>602, 3789=>602, 4304=>602, 4305=>602, 4306=>602, 4307=>602, 4308=>602,
116
+4309=>602, 4310=>602, 4311=>602, 4312=>602, 4313=>602, 4314=>602, 4315=>602, 4316=>602, 4317=>602, 4318=>602,
117
+4319=>602, 4320=>602, 4321=>602, 4322=>602, 4323=>602, 4324=>602, 4325=>602, 4326=>602, 4327=>602, 4328=>602,
118
+4329=>602, 4330=>602, 4331=>602, 4332=>602, 4333=>602, 4334=>602, 4335=>602, 4336=>602, 4337=>602, 4338=>602,
119
+4339=>602, 4340=>602, 4341=>602, 4342=>602, 4343=>602, 4344=>602, 4345=>602, 4346=>602, 4347=>602, 4348=>602,
120
+7426=>602, 7432=>602, 7433=>602, 7444=>602, 7446=>602, 7447=>602, 7453=>602, 7454=>602, 7455=>602, 7468=>602,
121
+7469=>602, 7470=>602, 7472=>602, 7473=>602, 7474=>602, 7475=>602, 7476=>602, 7477=>602, 7478=>602, 7479=>602,
122
+7480=>602, 7481=>602, 7482=>602, 7483=>602, 7484=>602, 7486=>602, 7487=>602, 7488=>602, 7489=>602, 7490=>602,
123
+7491=>602, 7492=>602, 7493=>602, 7494=>602, 7495=>602, 7496=>602, 7497=>602, 7498=>602, 7499=>602, 7500=>602,
124
+7501=>602, 7502=>602, 7503=>602, 7504=>602, 7505=>602, 7506=>602, 7507=>602, 7508=>602, 7509=>602, 7510=>602,
125
+7511=>602, 7512=>602, 7513=>602, 7514=>602, 7515=>602, 7522=>602, 7523=>602, 7524=>602, 7525=>602, 7543=>602,
126
+7544=>602, 7547=>602, 7557=>602, 7579=>602, 7580=>602, 7581=>602, 7582=>602, 7583=>602, 7584=>602, 7585=>602,
127
+7586=>602, 7587=>602, 7588=>602, 7589=>602, 7590=>602, 7591=>602, 7592=>602, 7593=>602, 7594=>602, 7595=>602,
128
+7596=>602, 7597=>602, 7598=>602, 7599=>602, 7600=>602, 7601=>602, 7602=>602, 7603=>602, 7604=>602, 7605=>602,
129
+7606=>602, 7607=>602, 7609=>602, 7610=>602, 7611=>602, 7612=>602, 7613=>602, 7614=>602, 7615=>602, 7680=>602,
130
+7681=>602, 7682=>602, 7683=>602, 7684=>602, 7685=>602, 7686=>602, 7687=>602, 7688=>602, 7689=>602, 7690=>602,
131
+7691=>602, 7692=>602, 7693=>602, 7694=>602, 7695=>602, 7696=>602, 7697=>602, 7698=>602, 7699=>602, 7704=>602,
132
+7705=>602, 7706=>602, 7707=>602, 7708=>602, 7709=>602, 7710=>602, 7711=>602, 7712=>602, 7713=>602, 7714=>602,
133
+7715=>602, 7716=>602, 7717=>602, 7718=>602, 7719=>602, 7720=>602, 7721=>602, 7722=>602, 7723=>602, 7724=>602,
134
+7725=>602, 7728=>602, 7729=>602, 7730=>602, 7731=>602, 7732=>602, 7733=>602, 7734=>602, 7735=>602, 7736=>602,
135
+7737=>602, 7738=>602, 7739=>602, 7740=>602, 7741=>602, 7742=>602, 7743=>602, 7744=>602, 7745=>602, 7746=>602,
136
+7747=>602, 7748=>602, 7749=>602, 7750=>602, 7751=>602, 7752=>602, 7753=>602, 7754=>602, 7755=>602, 7756=>602,
137
+7757=>602, 7764=>602, 7765=>602, 7766=>602, 7767=>602, 7768=>602, 7769=>602, 7770=>602, 7771=>602, 7772=>602,
138
+7773=>602, 7774=>602, 7775=>602, 7776=>602, 7777=>602, 7778=>602, 7779=>602, 7784=>602, 7785=>602, 7786=>602,
139
+7787=>602, 7788=>602, 7789=>602, 7790=>602, 7791=>602, 7792=>602, 7793=>602, 7794=>602, 7795=>602, 7796=>602,
140
+7797=>602, 7798=>602, 7799=>602, 7800=>602, 7801=>602, 7804=>602, 7805=>602, 7806=>602, 7807=>602, 7808=>602,
141
+7809=>602, 7810=>602, 7811=>602, 7812=>602, 7813=>602, 7814=>602, 7815=>602, 7816=>602, 7817=>602, 7818=>602,
142
+7819=>602, 7820=>602, 7821=>602, 7822=>602, 7823=>602, 7824=>602, 7825=>602, 7826=>602, 7827=>602, 7828=>602,
143
+7829=>602, 7830=>602, 7831=>602, 7832=>602, 7833=>602, 7835=>602, 7839=>602, 7840=>602, 7841=>602, 7852=>602,
144
+7853=>602, 7856=>602, 7857=>602, 7862=>602, 7863=>602, 7864=>602, 7865=>602, 7868=>602, 7869=>602, 7878=>602,
145
+7879=>602, 7882=>602, 7883=>602, 7884=>602, 7885=>602, 7896=>602, 7897=>602, 7898=>602, 7899=>602, 7900=>602,
146
+7901=>602, 7904=>602, 7905=>602, 7906=>602, 7907=>602, 7908=>602, 7909=>602, 7912=>602, 7913=>602, 7914=>602,
147
+7915=>602, 7918=>602, 7919=>602, 7920=>602, 7921=>602, 7922=>602, 7923=>602, 7924=>602, 7925=>602, 7928=>602,
148
+7929=>602, 7936=>602, 7937=>602, 7938=>602, 7939=>602, 7940=>602, 7941=>602, 7942=>602, 7943=>602, 7944=>602,
149
+7945=>602, 7946=>602, 7947=>602, 7948=>602, 7949=>602, 7950=>602, 7951=>602, 7952=>602, 7953=>602, 7954=>602,
150
+7955=>602, 7956=>602, 7957=>602, 7960=>602, 7961=>602, 7962=>602, 7963=>602, 7964=>602, 7965=>602, 7968=>602,
151
+7969=>602, 7970=>602, 7971=>602, 7972=>602, 7973=>602, 7974=>602, 7975=>602, 7976=>602, 7977=>602, 7978=>602,
152
+7979=>602, 7980=>602, 7981=>602, 7982=>602, 7983=>602, 7984=>602, 7985=>602, 7986=>602, 7987=>602, 7988=>602,
153
+7989=>602, 7990=>602, 7991=>602, 7992=>602, 7993=>602, 7994=>602, 7995=>602, 7996=>602, 7997=>602, 7998=>602,
154
+7999=>602, 8000=>602, 8001=>602, 8002=>602, 8003=>602, 8004=>602, 8005=>602, 8008=>602, 8009=>602, 8010=>602,
155
+8011=>602, 8012=>602, 8013=>602, 8016=>602, 8017=>602, 8018=>602, 8019=>602, 8020=>602, 8021=>602, 8022=>602,
156
+8023=>602, 8025=>602, 8027=>602, 8029=>602, 8031=>602, 8032=>602, 8033=>602, 8034=>602, 8035=>602, 8036=>602,
157
+8037=>602, 8038=>602, 8039=>602, 8040=>602, 8041=>602, 8042=>602, 8043=>602, 8044=>602, 8045=>602, 8046=>602,
158
+8047=>602, 8048=>602, 8049=>602, 8050=>602, 8051=>602, 8052=>602, 8053=>602, 8054=>602, 8055=>602, 8056=>602,
159
+8057=>602, 8058=>602, 8059=>602, 8060=>602, 8061=>602, 8064=>602, 8065=>602, 8066=>602, 8067=>602, 8068=>602,
160
+8069=>602, 8070=>602, 8071=>602, 8072=>602, 8073=>602, 8074=>602, 8075=>602, 8076=>602, 8077=>602, 8078=>602,
161
+8079=>602, 8080=>602, 8081=>602, 8082=>602, 8083=>602, 8084=>602, 8085=>602, 8086=>602, 8087=>602, 8088=>602,
162
+8089=>602, 8090=>602, 8091=>602, 8092=>602, 8093=>602, 8094=>602, 8095=>602, 8096=>602, 8097=>602, 8098=>602,
163
+8099=>602, 8100=>602, 8101=>602, 8102=>602, 8103=>602, 8104=>602, 8105=>602, 8106=>602, 8107=>602, 8108=>602,
164
+8109=>602, 8110=>602, 8111=>602, 8112=>602, 8113=>602, 8114=>602, 8115=>602, 8116=>602, 8118=>602, 8119=>602,
165
+8120=>602, 8121=>602, 8122=>602, 8123=>602, 8124=>602, 8125=>602, 8126=>602, 8127=>602, 8128=>602, 8129=>602,
166
+8130=>602, 8131=>602, 8132=>602, 8134=>602, 8135=>602, 8136=>602, 8137=>602, 8138=>602, 8139=>602, 8140=>602,
167
+8141=>602, 8142=>602, 8143=>602, 8144=>602, 8145=>602, 8146=>602, 8147=>602, 8150=>602, 8151=>602, 8152=>602,
168
+8153=>602, 8154=>602, 8155=>602, 8157=>602, 8158=>602, 8159=>602, 8160=>602, 8161=>602, 8162=>602, 8163=>602,
169
+8164=>602, 8165=>602, 8166=>602, 8167=>602, 8168=>602, 8169=>602, 8170=>602, 8171=>602, 8172=>602, 8173=>602,
170
+8174=>602, 8175=>602, 8178=>602, 8179=>602, 8180=>602, 8182=>602, 8183=>602, 8184=>602, 8185=>602, 8186=>602,
171
+8187=>602, 8188=>602, 8189=>602, 8190=>602, 8192=>602, 8193=>602, 8194=>602, 8195=>602, 8196=>602, 8197=>602,
172
+8198=>602, 8199=>602, 8200=>602, 8201=>602, 8202=>602, 8208=>602, 8209=>602, 8210=>602, 8213=>602, 8215=>602,
173
+8219=>602, 8223=>602, 8227=>602, 8239=>602, 8241=>602, 8242=>602, 8243=>602, 8244=>602, 8245=>602, 8246=>602,
174
+8247=>602, 8252=>602, 8253=>602, 8254=>602, 8261=>602, 8262=>602, 8263=>602, 8264=>602, 8265=>602, 8287=>602,
175
+8304=>602, 8305=>602, 8308=>602, 8309=>602, 8310=>602, 8311=>602, 8312=>602, 8313=>602, 8314=>602, 8315=>602,
176
+8316=>602, 8317=>602, 8318=>602, 8319=>602, 8320=>602, 8321=>602, 8322=>602, 8323=>602, 8324=>602, 8325=>602,
177
+8326=>602, 8327=>602, 8328=>602, 8329=>602, 8330=>602, 8331=>602, 8332=>602, 8333=>602, 8334=>602, 8336=>602,
178
+8337=>602, 8338=>602, 8339=>602, 8340=>602, 8352=>602, 8353=>602, 8354=>602, 8355=>602, 8356=>602, 8357=>602,
179
+8358=>602, 8359=>602, 8360=>602, 8361=>602, 8362=>602, 8363=>602, 8365=>602, 8366=>602, 8367=>602, 8368=>602,
180
+8369=>602, 8370=>602, 8371=>602, 8372=>602, 8373=>602, 8450=>602, 8453=>602, 8461=>602, 8462=>602, 8463=>602,
181
+8469=>602, 8470=>602, 8471=>602, 8473=>602, 8474=>602, 8477=>602, 8484=>602, 8486=>602, 8490=>602, 8491=>602,
182
+8494=>602, 8531=>602, 8532=>602, 8533=>602, 8534=>602, 8535=>602, 8536=>602, 8537=>602, 8538=>602, 8539=>602,
183
+8540=>602, 8541=>602, 8542=>602, 8543=>602, 8592=>602, 8593=>602, 8594=>602, 8595=>602, 8596=>602, 8597=>602,
184
+8598=>602, 8599=>602, 8600=>602, 8601=>602, 8602=>602, 8603=>602, 8604=>602, 8605=>602, 8606=>602, 8607=>602,
185
+8608=>602, 8609=>602, 8610=>602, 8611=>602, 8612=>602, 8613=>602, 8614=>602, 8615=>602, 8616=>602, 8617=>602,
186
+8618=>602, 8619=>602, 8620=>602, 8621=>602, 8622=>602, 8623=>602, 8624=>602, 8625=>602, 8626=>602, 8627=>602,
187
+8628=>602, 8629=>602, 8630=>602, 8631=>602, 8632=>602, 8633=>602, 8634=>602, 8635=>602, 8636=>602, 8637=>602,
188
+8638=>602, 8639=>602, 8640=>602, 8641=>602, 8642=>602, 8643=>602, 8644=>602, 8645=>602, 8646=>602, 8647=>602,
189
+8648=>602, 8649=>602, 8650=>602, 8651=>602, 8652=>602, 8653=>602, 8654=>602, 8655=>602, 8656=>602, 8657=>602,
190
+8658=>602, 8659=>602, 8660=>602, 8661=>602, 8662=>602, 8663=>602, 8664=>602, 8665=>602, 8666=>602, 8667=>602,
191
+8668=>602, 8669=>602, 8670=>602, 8671=>602, 8672=>602, 8673=>602, 8674=>602, 8675=>602, 8676=>602, 8677=>602,
192
+8678=>602, 8679=>602, 8680=>602, 8681=>602, 8682=>602, 8683=>602, 8684=>602, 8685=>602, 8686=>602, 8687=>602,
193
+8688=>602, 8689=>602, 8690=>602, 8691=>602, 8692=>602, 8693=>602, 8694=>602, 8695=>602, 8696=>602, 8697=>602,
194
+8698=>602, 8699=>602, 8700=>602, 8701=>602, 8702=>602, 8703=>602, 8704=>602, 8705=>602, 8706=>602, 8707=>602,
195
+8708=>602, 8709=>602, 8710=>602, 8711=>602, 8712=>602, 8713=>602, 8714=>602, 8715=>602, 8716=>602, 8717=>602,
196
+8719=>602, 8721=>602, 8722=>602, 8723=>602, 8725=>602, 8727=>602, 8728=>602, 8729=>602, 8730=>602, 8731=>602,
197
+8732=>602, 8733=>602, 8734=>602, 8735=>602, 8736=>602, 8743=>602, 8744=>602, 8745=>602, 8746=>602, 8747=>602,
198
+8748=>602, 8749=>602, 8760=>602, 8761=>602, 8762=>602, 8763=>602, 8764=>602, 8765=>602, 8769=>602, 8770=>602,
199
+8771=>602, 8772=>602, 8773=>602, 8774=>602, 8775=>602, 8776=>602, 8777=>602, 8778=>602, 8779=>602, 8780=>602,
200
+8781=>602, 8782=>602, 8783=>602, 8784=>602, 8785=>602, 8786=>602, 8787=>602, 8788=>602, 8789=>602, 8790=>602,
201
+8791=>602, 8792=>602, 8793=>602, 8794=>602, 8795=>602, 8796=>602, 8797=>602, 8798=>602, 8799=>602, 8800=>602,
202
+8801=>602, 8802=>602, 8803=>602, 8804=>602, 8805=>602, 8806=>602, 8807=>602, 8808=>602, 8809=>602, 8813=>602,
203
+8814=>602, 8815=>602, 8816=>602, 8817=>602, 8818=>602, 8819=>602, 8820=>602, 8821=>602, 8822=>602, 8823=>602,
204
+8824=>602, 8825=>602, 8826=>602, 8827=>602, 8828=>602, 8829=>602, 8830=>602, 8831=>602, 8832=>602, 8833=>602,
205
+8834=>602, 8835=>602, 8836=>602, 8837=>602, 8838=>602, 8839=>602, 8840=>602, 8841=>602, 8842=>602, 8843=>602,
206
+8847=>602, 8848=>602, 8849=>602, 8850=>602, 8853=>602, 8854=>602, 8855=>602, 8856=>602, 8857=>602, 8858=>602,
207
+8859=>602, 8860=>602, 8861=>602, 8862=>602, 8863=>602, 8864=>602, 8865=>602, 8901=>602, 8902=>602, 8909=>602,
208
+8922=>602, 8923=>602, 8924=>602, 8925=>602, 8926=>602, 8927=>602, 8928=>602, 8929=>602, 8930=>602, 8931=>602,
209
+8932=>602, 8933=>602, 8934=>602, 8935=>602, 8936=>602, 8937=>602, 8943=>602, 8960=>602, 8961=>602, 8962=>602,
210
+8963=>602, 8964=>602, 8965=>602, 8966=>602, 8968=>602, 8969=>602, 8970=>602, 8971=>602, 8972=>602, 8973=>602,
211
+8974=>602, 8975=>602, 8976=>602, 8977=>602, 8978=>602, 8979=>602, 8980=>602, 8981=>602, 8984=>602, 8985=>602,
212
+8988=>602, 8989=>602, 8990=>602, 8991=>602, 8992=>602, 8993=>602, 8997=>602, 8998=>602, 8999=>602, 9000=>602,
213
+9003=>602, 9013=>602, 9015=>602, 9016=>602, 9017=>602, 9018=>602, 9019=>602, 9020=>602, 9021=>602, 9022=>602,
214
+9025=>602, 9026=>602, 9027=>602, 9028=>602, 9031=>602, 9032=>602, 9033=>602, 9035=>602, 9036=>602, 9037=>602,
215
+9040=>602, 9042=>602, 9043=>602, 9044=>602, 9047=>602, 9048=>602, 9049=>602, 9050=>602, 9051=>602, 9052=>602,
216
+9054=>602, 9055=>602, 9056=>602, 9059=>602, 9060=>602, 9061=>602, 9064=>602, 9065=>602, 9067=>602, 9068=>602,
217
+9069=>602, 9070=>602, 9071=>602, 9072=>602, 9075=>602, 9076=>602, 9077=>602, 9078=>602, 9079=>602, 9080=>602,
218
+9081=>602, 9082=>602, 9085=>602, 9088=>602, 9089=>602, 9090=>602, 9091=>602, 9096=>602, 9097=>602, 9098=>602,
219
+9099=>602, 9109=>602, 9115=>602, 9116=>602, 9117=>602, 9118=>602, 9119=>602, 9120=>602, 9121=>602, 9122=>602,
220
+9123=>602, 9124=>602, 9125=>602, 9126=>602, 9127=>602, 9128=>602, 9129=>602, 9130=>602, 9131=>602, 9132=>602,
221
+9133=>602, 9134=>602, 9166=>602, 9167=>602, 9251=>602, 9600=>602, 9601=>602, 9602=>602, 9603=>602, 9604=>602,
222
+9605=>602, 9606=>602, 9607=>602, 9608=>602, 9609=>602, 9610=>602, 9611=>602, 9612=>602, 9613=>602, 9614=>602,
223
+9615=>602, 9616=>602, 9617=>602, 9618=>602, 9619=>602, 9620=>602, 9621=>602, 9622=>602, 9623=>602, 9624=>602,
224
+9625=>602, 9626=>602, 9627=>602, 9628=>602, 9629=>602, 9630=>602, 9631=>602, 9632=>602, 9633=>602, 9634=>602,
225
+9635=>602, 9636=>602, 9637=>602, 9638=>602, 9639=>602, 9640=>602, 9641=>602, 9642=>602, 9643=>602, 9644=>602,
226
+9645=>602, 9646=>602, 9647=>602, 9648=>602, 9649=>602, 9650=>602, 9651=>602, 9652=>602, 9653=>602, 9654=>602,
227
+9655=>602, 9656=>602, 9657=>602, 9658=>602, 9659=>602, 9660=>602, 9661=>602, 9662=>602, 9663=>602, 9664=>602,
228
+9665=>602, 9666=>602, 9667=>602, 9668=>602, 9669=>602, 9670=>602, 9671=>602, 9672=>602, 9673=>602, 9674=>602,
229
+9675=>602, 9676=>602, 9677=>602, 9678=>602, 9679=>602, 9680=>602, 9681=>602, 9682=>602, 9683=>602, 9684=>602,
230
+9685=>602, 9686=>602, 9687=>602, 9688=>602, 9689=>602, 9690=>602, 9691=>602, 9692=>602, 9693=>602, 9694=>602,
231
+9695=>602, 9696=>602, 9697=>602, 9698=>602, 9699=>602, 9700=>602, 9701=>602, 9702=>602, 9703=>602, 9704=>602,
232
+9705=>602, 9706=>602, 9707=>602, 9708=>602, 9709=>602, 9710=>602, 9711=>602, 9712=>602, 9713=>602, 9714=>602,
233
+9715=>602, 9716=>602, 9717=>602, 9718=>602, 9719=>602, 9720=>602, 9721=>602, 9722=>602, 9723=>602, 9724=>602,
234
+9725=>602, 9726=>602, 9727=>602, 9728=>602, 9784=>602, 9785=>602, 9786=>602, 9787=>602, 9788=>602, 9791=>602,
235
+9792=>602, 9793=>602, 9794=>602, 9795=>602, 9796=>602, 9797=>602, 9798=>602, 9799=>602, 9824=>602, 9825=>602,
236
+9826=>602, 9827=>602, 9828=>602, 9829=>602, 9830=>602, 9831=>602, 9833=>602, 9834=>602, 9835=>602, 9836=>602,
237
+9837=>602, 9838=>602, 9839=>602, 10181=>602, 10182=>602, 10208=>602, 10216=>602, 10217=>602, 10731=>602, 10746=>602,
238
+10747=>602, 10799=>602, 11026=>602, 11027=>602, 11028=>602, 11029=>602, 11030=>602, 11031=>602, 11032=>602, 11033=>602,
239
+11034=>602, 11364=>602, 11374=>602, 11375=>602, 11381=>602, 11382=>602, 11383=>602, 11385=>602, 11386=>602, 11388=>602,
240
+11389=>602, 11800=>602, 11810=>602, 11811=>602, 11812=>602, 11813=>602, 11822=>602, 42760=>602, 42761=>602, 42762=>602,
241
+42763=>602, 42764=>602, 42765=>602, 42766=>602, 42767=>602, 42768=>602, 42769=>602, 42770=>602, 42771=>602, 42772=>602,
242
+42773=>602, 42774=>602, 42779=>602, 42780=>602, 42781=>602, 42782=>602, 42783=>602, 42790=>602, 42791=>602, 42889=>602,
243
+42890=>602, 42891=>602, 42892=>602, 63173=>602, 64257=>602, 64258=>602, 65529=>602, 65530=>602, 65531=>602, 65532=>602,
244 244
 65533=>602);
245
-$enc='';
246
-$diff='';
247
-$file='dejavusansmonobi.z';
248
-$ctg='dejavusansmonobi.ctg.z';
249
-$originalsize=223408;
245
+$enc = '';
246
+$diff = '';
247
+$file = 'dejavusansmonobi.z';
248
+$ctg = 'dejavusansmonobi.ctg.z';
249
+$originalsize = 223408;
250 250
 ?>
251 251
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 $type='TrueTypeUnicode';
3 5
 $name='DejaVuSansMono-BoldOblique';
4 6
 $desc=array('Ascent'=>928,'Descent'=>-236,'CapHeight'=>-70,'Flags'=>97,'FontBBox'=>'[-428 -394 808 1053]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>602);
Please login to merge, or discard this patch.
includes/librairies/HTML2PDF/_tcpdf_5.0.002/barcodes.php 3 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -51,14 +51,14 @@  discard block
 block discarded – undo
51 51
  */
52 52
 
53 53
 	/**
54
-	* PHP class to creates array representations for common 1D barcodes to be used with TCPDF (http://www.tcpdf.org).<br>
55
-	* @name TCPDFBarcode
56
-	* @package com.tecnick.tcpdf
57
-	* @version 1.0.008
58
-	* @author Nicola Asuni
59
-	* @link http://www.tcpdf.org
60
-	* @license http://www.gnu.org/copyleft/lesser.html LGPL
61
-	*/
54
+	 * PHP class to creates array representations for common 1D barcodes to be used with TCPDF (http://www.tcpdf.org).<br>
55
+	 * @name TCPDFBarcode
56
+	 * @package com.tecnick.tcpdf
57
+	 * @version 1.0.008
58
+	 * @author Nicola Asuni
59
+	 * @link http://www.tcpdf.org
60
+	 * @license http://www.gnu.org/copyleft/lesser.html LGPL
61
+	 */
62 62
 class TCPDFBarcode {
63 63
 	
64 64
 	/**
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	 * <li>$arrcode['bcode'][$k]['h'] bar height in units.</li>
80 80
 	 * <li>$arrcode['bcode'][$k]['p'] bar top position (0 = top, 1 = middle)</li></ul>
81 81
 	 * @param string $code code to print
82
- 	 * @param string $type type of barcode: <ul><li>C39 : CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.</li><li>C39+ : CODE 39 with checksum</li><li>C39E : CODE 39 EXTENDED</li><li>C39E+ : CODE 39 EXTENDED + CHECKSUM</li><li>C93 : CODE 93 - USS-93</li><li>S25 : Standard 2 of 5</li><li>S25+ : Standard 2 of 5 + CHECKSUM</li><li>I25 : Interleaved 2 of 5</li><li>I25+ : Interleaved 2 of 5 + CHECKSUM</li><li>C128A : CODE 128 A</li><li>C128B : CODE 128 B</li><li>C128C : CODE 128 C</li><li>EAN2 : 2-Digits UPC-Based Extention</li><li>EAN5 : 5-Digits UPC-Based Extention</li><li>EAN8 : EAN 8</li><li>EAN13 : EAN 13</li><li>UPCA : UPC-A</li><li>UPCE : UPC-E</li><li>MSI : MSI (Variation of Plessey code)</li><li>MSI+ : MSI + CHECKSUM (modulo 11)</li><li>POSTNET : POSTNET</li><li>PLANET : PLANET</li><li>RMS4CC : RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)</li><li>KIX : KIX (Klant index - Customer index)</li><li>IMB: Intelligent Mail Barcode - Onecode - USPS-B-3200</li><li>CODABAR : CODABAR</li><li>CODE11 : CODE 11</li><li>PHARMA : PHARMACODE</li><li>PHARMA2T : PHARMACODE TWO-TRACKS</li></ul>
82
+	 * @param string $type type of barcode: <ul><li>C39 : CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.</li><li>C39+ : CODE 39 with checksum</li><li>C39E : CODE 39 EXTENDED</li><li>C39E+ : CODE 39 EXTENDED + CHECKSUM</li><li>C93 : CODE 93 - USS-93</li><li>S25 : Standard 2 of 5</li><li>S25+ : Standard 2 of 5 + CHECKSUM</li><li>I25 : Interleaved 2 of 5</li><li>I25+ : Interleaved 2 of 5 + CHECKSUM</li><li>C128A : CODE 128 A</li><li>C128B : CODE 128 B</li><li>C128C : CODE 128 C</li><li>EAN2 : 2-Digits UPC-Based Extention</li><li>EAN5 : 5-Digits UPC-Based Extention</li><li>EAN8 : EAN 8</li><li>EAN13 : EAN 13</li><li>UPCA : UPC-A</li><li>UPCE : UPC-E</li><li>MSI : MSI (Variation of Plessey code)</li><li>MSI+ : MSI + CHECKSUM (modulo 11)</li><li>POSTNET : POSTNET</li><li>PLANET : PLANET</li><li>RMS4CC : RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)</li><li>KIX : KIX (Klant index - Customer index)</li><li>IMB: Intelligent Mail Barcode - Onecode - USPS-B-3200</li><li>CODABAR : CODABAR</li><li>CODE11 : CODE 11</li><li>PHARMA : PHARMACODE</li><li>PHARMA2T : PHARMACODE TWO-TRACKS</li></ul>
83 83
 	 */
84 84
 	public function __construct($code, $type) {
85 85
 		$this->setBarcode($code, $type);
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	
88 88
 	/** 
89 89
 	 * Return an array representations of barcode.
90
- 	 * @return array
90
+	 * @return array
91 91
 	 */
92 92
 	public function getBarcodeArray() {
93 93
 		return $this->barcode_array;
@@ -96,8 +96,8 @@  discard block
 block discarded – undo
96 96
 	/** 
97 97
 	 * Set the barcode.
98 98
 	 * @param string $code code to print
99
- 	 * @param string $type type of barcode: <ul><li>C39 : CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.</li><li>C39+ : CODE 39 with checksum</li><li>C39E : CODE 39 EXTENDED</li><li>C39E+ : CODE 39 EXTENDED + CHECKSUM</li><li>C93 : CODE 93 - USS-93</li><li>S25 : Standard 2 of 5</li><li>S25+ : Standard 2 of 5 + CHECKSUM</li><li>I25 : Interleaved 2 of 5</li><li>I25+ : Interleaved 2 of 5 + CHECKSUM</li><li>C128A : CODE 128 A</li><li>C128B : CODE 128 B</li><li>C128C : CODE 128 C</li><li>EAN2 : 2-Digits UPC-Based Extention</li><li>EAN5 : 5-Digits UPC-Based Extention</li><li>EAN8 : EAN 8</li><li>EAN13 : EAN 13</li><li>UPCA : UPC-A</li><li>UPCE : UPC-E</li><li>MSI : MSI (Variation of Plessey code)</li><li>MSI+ : MSI + CHECKSUM (modulo 11)</li><li>POSTNET : POSTNET</li><li>PLANET : PLANET</li><li>RMS4CC : RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)</li><li>KIX : KIX (Klant index - Customer index)</li><li>IMB: Intelligent Mail Barcode - Onecode - USPS-B-3200</li><li>CODABAR : CODABAR</li><li>CODE11 : CODE 11</li><li>PHARMA : PHARMACODE</li><li>PHARMA2T : PHARMACODE TWO-TRACKS</li></ul>
100
- 	 * @return array
99
+	 * @param string $type type of barcode: <ul><li>C39 : CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.</li><li>C39+ : CODE 39 with checksum</li><li>C39E : CODE 39 EXTENDED</li><li>C39E+ : CODE 39 EXTENDED + CHECKSUM</li><li>C93 : CODE 93 - USS-93</li><li>S25 : Standard 2 of 5</li><li>S25+ : Standard 2 of 5 + CHECKSUM</li><li>I25 : Interleaved 2 of 5</li><li>I25+ : Interleaved 2 of 5 + CHECKSUM</li><li>C128A : CODE 128 A</li><li>C128B : CODE 128 B</li><li>C128C : CODE 128 C</li><li>EAN2 : 2-Digits UPC-Based Extention</li><li>EAN5 : 5-Digits UPC-Based Extention</li><li>EAN8 : EAN 8</li><li>EAN13 : EAN 13</li><li>UPCA : UPC-A</li><li>UPCE : UPC-E</li><li>MSI : MSI (Variation of Plessey code)</li><li>MSI+ : MSI + CHECKSUM (modulo 11)</li><li>POSTNET : POSTNET</li><li>PLANET : PLANET</li><li>RMS4CC : RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)</li><li>KIX : KIX (Klant index - Customer index)</li><li>IMB: Intelligent Mail Barcode - Onecode - USPS-B-3200</li><li>CODABAR : CODABAR</li><li>CODE11 : CODE 11</li><li>PHARMA : PHARMACODE</li><li>PHARMA2T : PHARMACODE TWO-TRACKS</li></ul>
100
+	 * @return array
101 101
 	 */
102 102
 	public function setBarcode($code, $type) {
103 103
 		switch (strtoupper($type)) {
Please login to merge, or discard this patch.
Spacing   +225 added lines, -225 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 //============================================================+
3 3
 // File name   : barcodes.php
4 4
 // Begin       : 2008-06-09
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 	 * @return array barcode representation.
235 235
 	 * @access protected
236 236
 	 */
237
-	protected function barcode_code39($code, $extended=false, $checksum=false) {
237
+	protected function barcode_code39($code, $extended = false, $checksum = false) {
238 238
 		$chr['0'] = '111221211';
239 239
 		$chr['1'] = '211211112';
240 240
 		$chr['2'] = '112211112';
@@ -293,14 +293,14 @@  discard block
 block discarded – undo
293 293
 			$code .= $this->checksum_code39($code);
294 294
 		}
295 295
 		// add start and stop codes
296
-		$code = '*'.$code.'*';
296
+		$code = '*' . $code . '*';
297 297
 		
298 298
 		$bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
299 299
 		$k = 0;
300 300
 		$clen = strlen($code);
301 301
 		for ($i = 0; $i < $clen; ++$i) {
302 302
 			$char = $code{$i};
303
-			if(!isset($chr[$char])) {
303
+			if (!isset($chr[$char])) {
304 304
 				// invalid character
305 305
 				return false;
306 306
 			}
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
 			chr(124) => '%Q', chr(125) => '%R', chr(126) => '%S', chr(127) => '%T');
365 365
 		$code_ext = '';
366 366
 		$clen = strlen($code);
367
-		for ($i = 0 ; $i < $clen; ++$i) {
367
+		for ($i = 0; $i < $clen; ++$i) {
368 368
 			if (ord($code{$i}) > 127) {
369 369
 				return false;
370 370
 			}
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
 			'W', 'X', 'Y', 'Z', '-', '.', ' ', '$', '/', '+', '%');
388 388
 		$sum = 0;
389 389
 		$clen = strlen($code);
390
-		for ($i = 0 ; $i < $clen; ++$i) {
390
+		for ($i = 0; $i < $clen; ++$i) {
391 391
 			$k = array_keys($chars, $code{$i});
392 392
 			$sum += $k[0];
393 393
 		}
@@ -454,41 +454,41 @@  discard block
 block discarded – undo
454 454
 		$chr['*'] = '111141';
455 455
 		$code = strtoupper($code);
456 456
 		$encode = array(
457
-			chr(0) => chr(131).'U', chr(1) => chr(128).'A', chr(2) => chr(128).'B', chr(3) => chr(128).'C',
458
-			chr(4) => chr(128).'D', chr(5) => chr(128).'E', chr(6) => chr(128).'F', chr(7) => chr(128).'G',
459
-			chr(8) => chr(128).'H', chr(9) => chr(128).'I', chr(10) => chr(128).'J', chr(11) => '£K',
460
-			chr(12) => chr(128).'L', chr(13) => chr(128).'M', chr(14) => chr(128).'N', chr(15) => chr(128).'O',
461
-			chr(16) => chr(128).'P', chr(17) => chr(128).'Q', chr(18) => chr(128).'R', chr(19) => chr(128).'S',
462
-			chr(20) => chr(128).'T', chr(21) => chr(128).'U', chr(22) => chr(128).'V', chr(23) => chr(128).'W',
463
-			chr(24) => chr(128).'X', chr(25) => chr(128).'Y', chr(26) => chr(128).'Z', chr(27) => chr(131).'A',
464
-			chr(28) => chr(131).'B', chr(29) => chr(131).'C', chr(30) => chr(131).'D', chr(31) => chr(131).'E',
465
-			chr(32) => ' ', chr(33) => chr(129).'A', chr(34) => chr(129).'B', chr(35) => chr(129).'C',
466
-			chr(36) => chr(129).'D', chr(37) => chr(129).'E', chr(38) => chr(129).'F', chr(39) => chr(129).'G',
467
-			chr(40) => chr(129).'H', chr(41) => chr(129).'I', chr(42) => chr(129).'J', chr(43) => chr(129).'K',
468
-			chr(44) => chr(129).'L', chr(45) => '-', chr(46) => '.', chr(47) => chr(129).'O',
457
+			chr(0) => chr(131) . 'U', chr(1) => chr(128) . 'A', chr(2) => chr(128) . 'B', chr(3) => chr(128) . 'C',
458
+			chr(4) => chr(128) . 'D', chr(5) => chr(128) . 'E', chr(6) => chr(128) . 'F', chr(7) => chr(128) . 'G',
459
+			chr(8) => chr(128) . 'H', chr(9) => chr(128) . 'I', chr(10) => chr(128) . 'J', chr(11) => '£K',
460
+			chr(12) => chr(128) . 'L', chr(13) => chr(128) . 'M', chr(14) => chr(128) . 'N', chr(15) => chr(128) . 'O',
461
+			chr(16) => chr(128) . 'P', chr(17) => chr(128) . 'Q', chr(18) => chr(128) . 'R', chr(19) => chr(128) . 'S',
462
+			chr(20) => chr(128) . 'T', chr(21) => chr(128) . 'U', chr(22) => chr(128) . 'V', chr(23) => chr(128) . 'W',
463
+			chr(24) => chr(128) . 'X', chr(25) => chr(128) . 'Y', chr(26) => chr(128) . 'Z', chr(27) => chr(131) . 'A',
464
+			chr(28) => chr(131) . 'B', chr(29) => chr(131) . 'C', chr(30) => chr(131) . 'D', chr(31) => chr(131) . 'E',
465
+			chr(32) => ' ', chr(33) => chr(129) . 'A', chr(34) => chr(129) . 'B', chr(35) => chr(129) . 'C',
466
+			chr(36) => chr(129) . 'D', chr(37) => chr(129) . 'E', chr(38) => chr(129) . 'F', chr(39) => chr(129) . 'G',
467
+			chr(40) => chr(129) . 'H', chr(41) => chr(129) . 'I', chr(42) => chr(129) . 'J', chr(43) => chr(129) . 'K',
468
+			chr(44) => chr(129) . 'L', chr(45) => '-', chr(46) => '.', chr(47) => chr(129) . 'O',
469 469
 			chr(48) => '0', chr(49) => '1', chr(50) => '2', chr(51) => '3',
470 470
 			chr(52) => '4', chr(53) => '5', chr(54) => '6', chr(55) => '7',
471
-			chr(56) => '8', chr(57) => '9', chr(58) => chr(129).'Z', chr(59) => chr(131).'F',
472
-			chr(60) => chr(131).'G', chr(61) => chr(131).'H', chr(62) => chr(131).'I', chr(63) => chr(131).'J',
473
-			chr(64) => chr(131).'V', chr(65) => 'A', chr(66) => 'B', chr(67) => 'C',
471
+			chr(56) => '8', chr(57) => '9', chr(58) => chr(129) . 'Z', chr(59) => chr(131) . 'F',
472
+			chr(60) => chr(131) . 'G', chr(61) => chr(131) . 'H', chr(62) => chr(131) . 'I', chr(63) => chr(131) . 'J',
473
+			chr(64) => chr(131) . 'V', chr(65) => 'A', chr(66) => 'B', chr(67) => 'C',
474 474
 			chr(68) => 'D', chr(69) => 'E', chr(70) => 'F', chr(71) => 'G',
475 475
 			chr(72) => 'H', chr(73) => 'I', chr(74) => 'J', chr(75) => 'K',
476 476
 			chr(76) => 'L', chr(77) => 'M', chr(78) => 'N', chr(79) => 'O',
477 477
 			chr(80) => 'P', chr(81) => 'Q', chr(82) => 'R', chr(83) => 'S',
478 478
 			chr(84) => 'T', chr(85) => 'U', chr(86) => 'V', chr(87) => 'W',
479
-			chr(88) => 'X', chr(89) => 'Y', chr(90) => 'Z', chr(91) => chr(131).'K',
480
-			chr(92) => chr(131).'L', chr(93) => chr(131).'M', chr(94) => chr(131).'N', chr(95) => chr(131).'O',
481
-			chr(96) => chr(131).'W', chr(97) => chr(130).'A', chr(98) => chr(130).'B', chr(99) => chr(130).'C',
482
-			chr(100) => chr(130).'D', chr(101) => chr(130).'E', chr(102) => chr(130).'F', chr(103) => chr(130).'G',
483
-			chr(104) => chr(130).'H', chr(105) => chr(130).'I', chr(106) => chr(130).'J', chr(107) => chr(130).'K',
484
-			chr(108) => chr(130).'L', chr(109) => chr(130).'M', chr(110) => chr(130).'N', chr(111) => chr(130).'O',
485
-			chr(112) => chr(130).'P', chr(113) => chr(130).'Q', chr(114) => chr(130).'R', chr(115) => chr(130).'S',
486
-			chr(116) => chr(130).'T', chr(117) => chr(130).'U', chr(118) => chr(130).'V', chr(119) => chr(130).'W',
487
-			chr(120) => chr(130).'X', chr(121) => chr(130).'Y', chr(122) => chr(130).'Z', chr(123) => chr(131).'P',
488
-			chr(124) => chr(131).'Q', chr(125) => chr(131).'R', chr(126) => chr(131).'S', chr(127) => chr(131).'T');
479
+			chr(88) => 'X', chr(89) => 'Y', chr(90) => 'Z', chr(91) => chr(131) . 'K',
480
+			chr(92) => chr(131) . 'L', chr(93) => chr(131) . 'M', chr(94) => chr(131) . 'N', chr(95) => chr(131) . 'O',
481
+			chr(96) => chr(131) . 'W', chr(97) => chr(130) . 'A', chr(98) => chr(130) . 'B', chr(99) => chr(130) . 'C',
482
+			chr(100) => chr(130) . 'D', chr(101) => chr(130) . 'E', chr(102) => chr(130) . 'F', chr(103) => chr(130) . 'G',
483
+			chr(104) => chr(130) . 'H', chr(105) => chr(130) . 'I', chr(106) => chr(130) . 'J', chr(107) => chr(130) . 'K',
484
+			chr(108) => chr(130) . 'L', chr(109) => chr(130) . 'M', chr(110) => chr(130) . 'N', chr(111) => chr(130) . 'O',
485
+			chr(112) => chr(130) . 'P', chr(113) => chr(130) . 'Q', chr(114) => chr(130) . 'R', chr(115) => chr(130) . 'S',
486
+			chr(116) => chr(130) . 'T', chr(117) => chr(130) . 'U', chr(118) => chr(130) . 'V', chr(119) => chr(130) . 'W',
487
+			chr(120) => chr(130) . 'X', chr(121) => chr(130) . 'Y', chr(122) => chr(130) . 'Z', chr(123) => chr(131) . 'P',
488
+			chr(124) => chr(131) . 'Q', chr(125) => chr(131) . 'R', chr(126) => chr(131) . 'S', chr(127) => chr(131) . 'T');
489 489
 		$code_ext = '';
490 490
 		$clen = strlen($code);
491
-		for ($i = 0 ; $i < $clen; ++$i) {
491
+		for ($i = 0; $i < $clen; ++$i) {
492 492
 			if (ord($code{$i}) > 127) {
493 493
 				return false;
494 494
 			}
@@ -497,13 +497,13 @@  discard block
 block discarded – undo
497 497
 		// checksum
498 498
 		$code .= $this->checksum_code93($code);
499 499
 		// add start and stop codes
500
-		$code = '*'.$code.'*';
500
+		$code = '*' . $code . '*';
501 501
 		$bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
502 502
 		$k = 0;
503 503
 		$clen = strlen($code);
504 504
 		for ($i = 0; $i < $clen; ++$i) {
505 505
 			$char = $code{$i};
506
-			if(!isset($chr[$char])) {
506
+			if (!isset($chr[$char])) {
507 507
 				// invalid character
508 508
 				return false;
509 509
 			}
@@ -538,7 +538,7 @@  discard block
 block discarded – undo
538 538
 			'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',
539 539
 			'W', 'X', 'Y', 'Z', '-', '.', ' ', '$', '/', '+', '%');
540 540
 		// translate special characters
541
-		$code = strtr($code, chr(128).chr(129).chr(130).chr(131), '$/+%');	
541
+		$code = strtr($code, chr(128) . chr(129) . chr(130) . chr(131), '$/+%');	
542 542
 		$len = strlen($code);
543 543
 		// calculate check digit C
544 544
 		$p = 1;
@@ -567,7 +567,7 @@  discard block
 block discarded – undo
567 567
 		}
568 568
 		$check %= 47;
569 569
 		$k = $chars[$check];
570
-		return $c.$k;
570
+		return $c . $k;
571 571
 	}
572 572
 	
573 573
 	/**
@@ -579,15 +579,15 @@  discard block
 block discarded – undo
579 579
 	protected function checksum_s25($code) {
580 580
 		$len = strlen($code);
581 581
 		$sum = 0;
582
-		for ($i = 0; $i < $len; $i+=2) {
582
+		for ($i = 0; $i < $len; $i += 2) {
583 583
 			$sum += $code{$i};
584 584
 		}
585 585
 		$sum *= 3;
586
-		for ($i = 1; $i < $len; $i+=2) {
586
+		for ($i = 1; $i < $len; $i += 2) {
587 587
 			$sum += ($code{$i});
588 588
 		}
589 589
 		$r = $sum % 10;
590
-		if($r > 0) {
590
+		if ($r > 0) {
591 591
 			$r = (10 - $r);
592 592
 		}
593 593
 		return $r;
@@ -602,7 +602,7 @@  discard block
 block discarded – undo
602 602
 	 * @return array barcode representation.
603 603
 	 * @access protected
604 604
 	 */
605
-	protected function barcode_msi($code, $checksum=false) {
605
+	protected function barcode_msi($code, $checksum = false) {
606 606
 		$chr['0'] = '100100100100';
607 607
 		$chr['1'] = '100100100110';
608 608
 		$chr['2'] = '100100110100';
@@ -661,7 +661,7 @@  discard block
 block discarded – undo
661 661
 	 * @return array barcode representation.
662 662
 	 * @access protected
663 663
 	 */
664
-	protected function barcode_s25($code, $checksum=false) {
664
+	protected function barcode_s25($code, $checksum = false) {
665 665
 		$chr['0'] = '10101110111010';
666 666
 		$chr['1'] = '11101010101110';
667 667
 		$chr['2'] = '10111010101110';
@@ -676,9 +676,9 @@  discard block
 block discarded – undo
676 676
 			// add checksum
677 677
 			$code .= $this->checksum_s25($code);
678 678
 		}
679
-		if((strlen($code) % 2) != 0) {
679
+		if ((strlen($code) % 2) != 0) {
680 680
 			// add leading zero if code-length is odd
681
-			$code = '0'.$code;
681
+			$code = '0' . $code;
682 682
 		}
683 683
 		$seq = '11011010';
684 684
 		$clen = strlen($code);
@@ -708,7 +708,7 @@  discard block
 block discarded – undo
708 708
 		$k = 0;
709 709
 		for ($i = 0; $i < $len; ++$i) {
710 710
 			$w += 1;
711
-			if (($i == ($len - 1)) OR (($i < ($len - 1)) AND ($seq{$i} != $seq{($i+1)}))) {
711
+			if (($i == ($len - 1)) OR (($i < ($len - 1)) AND ($seq{$i} != $seq{($i + 1)}))) {
712 712
 				if ($seq{$i} == '1') {
713 713
 					$t = true; // bar
714 714
 				} else {
@@ -732,7 +732,7 @@  discard block
 block discarded – undo
732 732
 	 * @return array barcode representation.
733 733
 	 * @access protected
734 734
 	 */
735
-	protected function barcode_i25($code, $checksum=false) {
735
+	protected function barcode_i25($code, $checksum = false) {
736 736
 		$chr['0'] = '11221';
737 737
 		$chr['1'] = '21112';
738 738
 		$chr['2'] = '12112';
@@ -749,27 +749,27 @@  discard block
 block discarded – undo
749 749
 			// add checksum
750 750
 			$code .= $this->checksum_s25($code);
751 751
 		}
752
-		if((strlen($code) % 2) != 0) {
752
+		if ((strlen($code) % 2) != 0) {
753 753
 			// add leading zero if code-length is odd
754
-			$code = '0'.$code;
754
+			$code = '0' . $code;
755 755
 		}
756 756
 		// add start and stop codes
757
-		$code = 'AA'.strtolower($code).'ZA';
757
+		$code = 'AA' . strtolower($code) . 'ZA';
758 758
 			
759 759
 		$bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
760 760
 		$k = 0;
761 761
 		$clen = strlen($code);
762 762
 		for ($i = 0; $i < $clen; $i = ($i + 2)) {
763 763
 			$char_bar = $code{$i};
764
-			$char_space = $code{$i+1};
765
-			if((!isset($chr[$char_bar])) OR (!isset($chr[$char_space]))) {
764
+			$char_space = $code{$i + 1};
765
+			if ((!isset($chr[$char_bar])) OR (!isset($chr[$char_space]))) {
766 766
 				// invalid character
767 767
 				return false;
768 768
 			}
769 769
 			// create a bar-space sequence
770 770
 			$seq = '';
771 771
 			$chrlen = strlen($chr[$char_bar]);
772
-			for ($s = 0; $s < $chrlen; $s++){
772
+			for ($s = 0; $s < $chrlen; $s++) {
773 773
 				$seq .= $chr[$char_bar]{$s} . $chr[$char_space]{$s};
774 774
 			}
775 775
 			$seqlen = strlen($seq);
@@ -796,7 +796,7 @@  discard block
 block discarded – undo
796 796
 	 * @return array barcode representation.
797 797
 	 * @access protected
798 798
 	 */
799
-	protected function barcode_c128($code, $type='B') {
799
+	protected function barcode_c128($code, $type = 'B') {
800 800
 		$chr = array(
801 801
 			'212222', /* 00 */
802 802
 			'222122', /* 01 */
@@ -908,7 +908,7 @@  discard block
 block discarded – undo
908 908
 			'200000'  /* END */
909 909
 		);
910 910
 		$keys = '';
911
-		switch(strtoupper($type)) {
911
+		switch (strtoupper($type)) {
912 912
 			case 'A': {
913 913
 				$startid = 103;
914 914
 				$keys = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_';
@@ -919,7 +919,7 @@  discard block
 block discarded – undo
919 919
 			}
920 920
 			case 'B': {
921 921
 				$startid = 104;
922
-				$keys = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~'.chr(127);
922
+				$keys = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~' . chr(127);
923 923
 				break;
924 924
 			}
925 925
 			case 'C': {
@@ -935,7 +935,7 @@  discard block
 block discarded – undo
935 935
 				$new_code = '';
936 936
 				$hclen = (strlen($code) / 2);
937 937
 				for ($i = 0; $i < $hclen; ++$i) {
938
-					$new_code .= chr(intval($code{(2 * $i)}.$code{(2 * $i + 1)}));
938
+					$new_code .= chr(intval($code{(2 * $i)} . $code{(2 * $i + 1)}));
939 939
 				}
940 940
 				$code = $new_code;
941 941
 				break;
@@ -948,20 +948,20 @@  discard block
 block discarded – undo
948 948
 		$sum = $startid;
949 949
 		$clen = strlen($code);
950 950
 		for ($i = 0; $i < $clen; ++$i) {
951
-			$sum +=  (strpos($keys, $code{$i}) * ($i+1));
951
+			$sum += (strpos($keys, $code{$i}) * ($i + 1));
952 952
 		}
953 953
 		$check = ($sum % 103);
954 954
 		// add start, check and stop codes
955
-		$code = chr($startid).$code.chr($check).chr(106).chr(107);
955
+		$code = chr($startid) . $code . chr($check) . chr(106) . chr(107);
956 956
 		$bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array());
957 957
 		$k = 0;
958 958
 		$len = strlen($code);
959 959
 		for ($i = 0; $i < $len; ++$i) {
960 960
 			$ck = strpos($keys, $code{$i});
961
-			if (($i == 0) OR ($i > ($len-4))) {
961
+			if (($i == 0) OR ($i > ($len - 4))) {
962 962
 				$char_num = ord($code{$i});
963 963
 				$seq = $chr[$char_num];
964
-			} elseif(($ck >= 0) AND isset($chr[$ck])) {
964
+			} elseif (($ck >= 0) AND isset($chr[$ck])) {
965 965
 					$seq = $chr[$ck];
966 966
 			} else {
967 967
 				// invalid character
@@ -992,7 +992,7 @@  discard block
 block discarded – undo
992 992
 	 * @return array barcode representation.
993 993
 	 * @access protected
994 994
 	 */
995
-	protected function barcode_eanupc($code, $len=13) {
995
+	protected function barcode_eanupc($code, $len = 13) {
996 996
 		$upce = false;
997 997
 		if ($len == 6) {
998 998
 			$len = 12; // UPC-A
@@ -1004,21 +1004,21 @@  discard block
 block discarded – undo
1004 1004
 		$code_len = strlen($code);
1005 1005
 		// calculate check digit
1006 1006
 		$sum_a = 0;
1007
-		for ($i = 1; $i < $data_len; $i+=2) {
1007
+		for ($i = 1; $i < $data_len; $i += 2) {
1008 1008
 			$sum_a += $code{$i};
1009 1009
 		}
1010 1010
 		if ($len > 12) {
1011 1011
 			$sum_a *= 3;
1012 1012
 		}
1013 1013
 		$sum_b = 0;
1014
-		for ($i = 0; $i < $data_len; $i+=2) {
1014
+		for ($i = 0; $i < $data_len; $i += 2) {
1015 1015
 			$sum_b += ($code{$i});
1016 1016
 		}
1017 1017
 		if ($len < 13) {
1018 1018
 			$sum_b *= 3;
1019 1019
 		}
1020 1020
 		$r = ($sum_a + $sum_b) % 10;
1021
-		if($r > 0) {
1021
+		if ($r > 0) {
1022 1022
 			$r = (10 - $r);
1023 1023
 		}
1024 1024
 		if ($code_len == $data_len) {
@@ -1030,7 +1030,7 @@  discard block
 block discarded – undo
1030 1030
 		}
1031 1031
 		if ($len == 12) {
1032 1032
 			// UPC-A
1033
-			$code = '0'.$code;
1033
+			$code = '0' . $code;
1034 1034
 			++$len;
1035 1035
 		}
1036 1036
 		if ($upce) {
@@ -1038,20 +1038,20 @@  discard block
 block discarded – undo
1038 1038
 			$tmp = substr($code, 4, 3);
1039 1039
 			if (($tmp == '000') OR ($tmp == '100') OR ($tmp == '200')) {
1040 1040
 				// manufacturer code ends in 000, 100, or 200
1041
-				$upce_code = substr($code, 2, 2).substr($code, 9, 3).substr($code, 4, 1);
1041
+				$upce_code = substr($code, 2, 2) . substr($code, 9, 3) . substr($code, 4, 1);
1042 1042
 			} else {
1043 1043
 				$tmp = substr($code, 5, 2);
1044 1044
 				if ($tmp == '00') {
1045 1045
 					// manufacturer code ends in 00
1046
-					$upce_code = substr($code, 2, 3).substr($code, 10, 2).'3';
1046
+					$upce_code = substr($code, 2, 3) . substr($code, 10, 2) . '3';
1047 1047
 				} else {
1048 1048
 					$tmp = substr($code, 6, 1);
1049 1049
 					if ($tmp == '0') {
1050 1050
 						// manufacturer code ends in 0
1051
-						$upce_code = substr($code, 2, 4).substr($code, 11, 1).'4';
1051
+						$upce_code = substr($code, 2, 4) . substr($code, 11, 1) . '4';
1052 1052
 					} else {
1053 1053
 						// manufacturer code does not end in zero
1054
-						$upce_code = substr($code, 2, 5).substr($code, 11, 1);
1054
+						$upce_code = substr($code, 2, 5) . substr($code, 11, 1);
1055 1055
 					}
1056 1056
 				}
1057 1057
 			}
@@ -1093,41 +1093,41 @@  discard block
 block discarded – undo
1093 1093
 				'9'=>'1110100')
1094 1094
 		);
1095 1095
 		$parities = array(
1096
-			'0'=>array('A','A','A','A','A','A'),
1097
-			'1'=>array('A','A','B','A','B','B'),
1098
-			'2'=>array('A','A','B','B','A','B'),
1099
-			'3'=>array('A','A','B','B','B','A'),
1100
-			'4'=>array('A','B','A','A','B','B'),
1101
-			'5'=>array('A','B','B','A','A','B'),
1102
-			'6'=>array('A','B','B','B','A','A'),
1103
-			'7'=>array('A','B','A','B','A','B'),
1104
-			'8'=>array('A','B','A','B','B','A'),
1105
-			'9'=>array('A','B','B','A','B','A')
1096
+			'0'=>array('A', 'A', 'A', 'A', 'A', 'A'),
1097
+			'1'=>array('A', 'A', 'B', 'A', 'B', 'B'),
1098
+			'2'=>array('A', 'A', 'B', 'B', 'A', 'B'),
1099
+			'3'=>array('A', 'A', 'B', 'B', 'B', 'A'),
1100
+			'4'=>array('A', 'B', 'A', 'A', 'B', 'B'),
1101
+			'5'=>array('A', 'B', 'B', 'A', 'A', 'B'),
1102
+			'6'=>array('A', 'B', 'B', 'B', 'A', 'A'),
1103
+			'7'=>array('A', 'B', 'A', 'B', 'A', 'B'),
1104
+			'8'=>array('A', 'B', 'A', 'B', 'B', 'A'),
1105
+			'9'=>array('A', 'B', 'B', 'A', 'B', 'A')
1106 1106
 		);
1107 1107
 		$upce_parities = array();
1108 1108
 		$upce_parities[0] = array(
1109
-			'0'=>array('B','B','B','A','A','A'),
1110
-			'1'=>array('B','B','A','B','A','A'),
1111
-			'2'=>array('B','B','A','A','B','A'),
1112
-			'3'=>array('B','B','A','A','A','B'),
1113
-			'4'=>array('B','A','B','B','A','A'),
1114
-			'5'=>array('B','A','A','B','B','A'),
1115
-			'6'=>array('B','A','A','A','B','B'),
1116
-			'7'=>array('B','A','B','A','B','A'),
1117
-			'8'=>array('B','A','B','A','A','B'),
1118
-			'9'=>array('B','A','A','B','A','B')
1109
+			'0'=>array('B', 'B', 'B', 'A', 'A', 'A'),
1110
+			'1'=>array('B', 'B', 'A', 'B', 'A', 'A'),
1111
+			'2'=>array('B', 'B', 'A', 'A', 'B', 'A'),
1112
+			'3'=>array('B', 'B', 'A', 'A', 'A', 'B'),
1113
+			'4'=>array('B', 'A', 'B', 'B', 'A', 'A'),
1114
+			'5'=>array('B', 'A', 'A', 'B', 'B', 'A'),
1115
+			'6'=>array('B', 'A', 'A', 'A', 'B', 'B'),
1116
+			'7'=>array('B', 'A', 'B', 'A', 'B', 'A'),
1117
+			'8'=>array('B', 'A', 'B', 'A', 'A', 'B'),
1118
+			'9'=>array('B', 'A', 'A', 'B', 'A', 'B')
1119 1119
 		);
1120 1120
 		$upce_parities[1] = array(
1121
-			'0'=>array('A','A','A','B','B','B'),
1122
-			'1'=>array('A','A','B','A','B','B'),
1123
-			'2'=>array('A','A','B','B','A','B'),
1124
-			'3'=>array('A','A','B','B','B','A'),
1125
-			'4'=>array('A','B','A','A','B','B'),
1126
-			'5'=>array('A','B','B','A','A','B'),
1127
-			'6'=>array('A','B','B','B','A','A'),
1128
-			'7'=>array('A','B','A','B','A','B'),
1129
-			'8'=>array('A','B','A','B','B','A'),
1130
-			'9'=>array('A','B','B','A','B','A')
1121
+			'0'=>array('A', 'A', 'A', 'B', 'B', 'B'),
1122
+			'1'=>array('A', 'A', 'B', 'A', 'B', 'B'),
1123
+			'2'=>array('A', 'A', 'B', 'B', 'A', 'B'),
1124
+			'3'=>array('A', 'A', 'B', 'B', 'B', 'A'),
1125
+			'4'=>array('A', 'B', 'A', 'A', 'B', 'B'),
1126
+			'5'=>array('A', 'B', 'B', 'A', 'A', 'B'),
1127
+			'6'=>array('A', 'B', 'B', 'B', 'A', 'A'),
1128
+			'7'=>array('A', 'B', 'A', 'B', 'A', 'B'),
1129
+			'8'=>array('A', 'B', 'A', 'B', 'B', 'A'),
1130
+			'9'=>array('A', 'B', 'B', 'A', 'B', 'A')
1131 1131
 		);
1132 1132
 		$k = 0;
1133 1133
 		$seq = '101'; // left guard bar
@@ -1148,7 +1148,7 @@  discard block
 block discarded – undo
1148 1148
 			} else {
1149 1149
 				$p = $parities[$code{0}];
1150 1150
 				for ($i = 1; $i < $half_len; ++$i) {
1151
-					$seq .= $codes[$p[$i-1]][$code{$i}];
1151
+					$seq .= $codes[$p[$i - 1]][$code{$i}];
1152 1152
 				}
1153 1153
 			}
1154 1154
 			$seq .= '01010'; // center guard bar
@@ -1161,7 +1161,7 @@  discard block
 block discarded – undo
1161 1161
 		$w = 0;
1162 1162
 		for ($i = 0; $i < $clen; ++$i) {
1163 1163
 			$w += 1;
1164
-			if (($i == ($clen - 1)) OR (($i < ($clen - 1)) AND ($seq{$i} != $seq{($i+1)}))) {
1164
+			if (($i == ($clen - 1)) OR (($i < ($clen - 1)) AND ($seq{$i} != $seq{($i + 1)}))) {
1165 1165
 				if ($seq{$i} == '1') {
1166 1166
 					$t = true; // bar
1167 1167
 				} else {
@@ -1185,14 +1185,14 @@  discard block
 block discarded – undo
1185 1185
 	 * @return array barcode representation.
1186 1186
 	 * @access protected
1187 1187
 	 */
1188
-	protected function barcode_eanext($code, $len=5) {
1188
+	protected function barcode_eanext($code, $len = 5) {
1189 1189
 		//Padding
1190 1190
 		$code = str_pad($code, $len, '0', STR_PAD_LEFT);
1191 1191
 		// calculate check digit
1192 1192
 		if ($len == 2) {
1193 1193
 			$r = $code % 4;
1194 1194
 		} elseif ($len == 5) {
1195
-			$r = (3 * ($code{0} + $code{2} + $code{4})) + (9 * ($code{1} + $code{3}));
1195
+			$r = (3 * ($code{0} +$code{2} +$code{4})) + (9 * ($code{1} +$code{3}));
1196 1196
 			$r %= 10;
1197 1197
 		} else {
1198 1198
 			return false;
@@ -1224,22 +1224,22 @@  discard block
 block discarded – undo
1224 1224
 		);
1225 1225
 		$parities = array();
1226 1226
 		$parities[2] = array(
1227
-			'0'=>array('A','A'),
1228
-			'1'=>array('A','B'),
1229
-			'2'=>array('B','A'),
1230
-			'3'=>array('B','B')
1227
+			'0'=>array('A', 'A'),
1228
+			'1'=>array('A', 'B'),
1229
+			'2'=>array('B', 'A'),
1230
+			'3'=>array('B', 'B')
1231 1231
 		);
1232 1232
 		$parities[5] = array(
1233
-			'0'=>array('B','B','A','A','A'),
1234
-			'1'=>array('B','A','B','A','A'),
1235
-			'2'=>array('B','A','A','B','A'),
1236
-			'3'=>array('B','A','A','A','B'),
1237
-			'4'=>array('A','B','B','A','A'),
1238
-			'5'=>array('A','A','B','B','A'),
1239
-			'6'=>array('A','A','A','B','B'),
1240
-			'7'=>array('A','B','A','B','A'),
1241
-			'8'=>array('A','B','A','A','B'),
1242
-			'9'=>array('A','A','B','A','B')
1233
+			'0'=>array('B', 'B', 'A', 'A', 'A'),
1234
+			'1'=>array('B', 'A', 'B', 'A', 'A'),
1235
+			'2'=>array('B', 'A', 'A', 'B', 'A'),
1236
+			'3'=>array('B', 'A', 'A', 'A', 'B'),
1237
+			'4'=>array('A', 'B', 'B', 'A', 'A'),
1238
+			'5'=>array('A', 'A', 'B', 'B', 'A'),
1239
+			'6'=>array('A', 'A', 'A', 'B', 'B'),
1240
+			'7'=>array('A', 'B', 'A', 'B', 'A'),
1241
+			'8'=>array('A', 'B', 'A', 'A', 'B'),
1242
+			'9'=>array('A', 'A', 'B', 'A', 'B')
1243 1243
 		);	
1244 1244
 		$p = $parities[$len][$r];
1245 1245
 		$seq = '1011'; // left guard bar
@@ -1260,33 +1260,33 @@  discard block
 block discarded – undo
1260 1260
 	 * @return array barcode representation.
1261 1261
 	 * @access protected
1262 1262
 	 */
1263
-	protected function barcode_postnet($code, $planet=false) {
1263
+	protected function barcode_postnet($code, $planet = false) {
1264 1264
 		// bar lenght
1265 1265
 		if ($planet) {
1266 1266
 			$barlen = Array(
1267
-				0 => Array(1,1,2,2,2),
1268
-				1 => Array(2,2,2,1,1),
1269
-				2 => Array(2,2,1,2,1),
1270
-				3 => Array(2,2,1,1,2),
1271
-				4 => Array(2,1,2,2,1),
1272
-				5 => Array(2,1,2,1,2),
1273
-				6 => Array(2,1,1,2,2),
1274
-				7 => Array(1,2,2,2,1),
1275
-				8 => Array(1,2,2,1,2),
1276
-				9 => Array(1,2,1,2,2)
1267
+				0 => Array(1, 1, 2, 2, 2),
1268
+				1 => Array(2, 2, 2, 1, 1),
1269
+				2 => Array(2, 2, 1, 2, 1),
1270
+				3 => Array(2, 2, 1, 1, 2),
1271
+				4 => Array(2, 1, 2, 2, 1),
1272
+				5 => Array(2, 1, 2, 1, 2),
1273
+				6 => Array(2, 1, 1, 2, 2),
1274
+				7 => Array(1, 2, 2, 2, 1),
1275
+				8 => Array(1, 2, 2, 1, 2),
1276
+				9 => Array(1, 2, 1, 2, 2)
1277 1277
 			);
1278 1278
 		} else {
1279 1279
 			$barlen = Array(
1280
-				0 => Array(2,2,1,1,1),
1281
-				1 => Array(1,1,1,2,2),
1282
-				2 => Array(1,1,2,1,2),
1283
-				3 => Array(1,1,2,2,1),
1284
-				4 => Array(1,2,1,1,2),
1285
-				5 => Array(1,2,1,2,1),
1286
-				6 => Array(1,2,2,1,1),
1287
-				7 => Array(2,1,1,1,2),
1288
-				8 => Array(2,1,1,2,1),
1289
-				9 => Array(2,1,2,1,1)
1280
+				0 => Array(2, 2, 1, 1, 1),
1281
+				1 => Array(1, 1, 1, 2, 2),
1282
+				2 => Array(1, 1, 2, 1, 2),
1283
+				3 => Array(1, 1, 2, 2, 1),
1284
+				4 => Array(1, 2, 1, 1, 2),
1285
+				5 => Array(1, 2, 1, 2, 1),
1286
+				6 => Array(1, 2, 2, 1, 1),
1287
+				7 => Array(2, 1, 1, 1, 2),
1288
+				8 => Array(2, 1, 1, 2, 1),
1289
+				9 => Array(2, 1, 2, 1, 1)
1290 1290
 			);
1291 1291
 		}
1292 1292
 		$bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 2, 'bcode' => array());
@@ -1300,7 +1300,7 @@  discard block
 block discarded – undo
1300 1300
 			$sum += intval($code{$i});
1301 1301
 		}
1302 1302
 		$chkd = ($sum % 10);
1303
-		if($chkd > 0) {
1303
+		if ($chkd > 0) {
1304 1304
 			$chkd = (10 - $chkd);
1305 1305
 		}
1306 1306
 		$code .= $chkd;
@@ -1333,7 +1333,7 @@  discard block
 block discarded – undo
1333 1333
 	 * @return array barcode representation.
1334 1334
 	 * @access protected
1335 1335
 	 */
1336
-	protected function barcode_rms4cc($code, $kix=false) {
1336
+	protected function barcode_rms4cc($code, $kix = false) {
1337 1337
 		$notkix = !$kix;
1338 1338
 		// bar mode
1339 1339
 		// 1 = pos 1, length 2
@@ -1341,42 +1341,42 @@  discard block
 block discarded – undo
1341 1341
 		// 3 = pos 2, length 1
1342 1342
 		// 4 = pos 2, length 2
1343 1343
 		$barmode = array(
1344
-			'0' => array(3,3,2,2),
1345
-			'1' => array(3,4,1,2),
1346
-			'2' => array(3,4,2,1),
1347
-			'3' => array(4,3,1,2),
1348
-			'4' => array(4,3,2,1),
1349
-			'5' => array(4,4,1,1),
1350
-			'6' => array(3,1,4,2),
1351
-			'7' => array(3,2,3,2),
1352
-			'8' => array(3,2,4,1),
1353
-			'9' => array(4,1,3,2),
1354
-			'A' => array(4,1,4,1),
1355
-			'B' => array(4,2,3,1),
1356
-			'C' => array(3,1,2,4),
1357
-			'D' => array(3,2,1,4),
1358
-			'E' => array(3,2,2,3),
1359
-			'F' => array(4,1,1,4),
1360
-			'G' => array(4,1,2,3),
1361
-			'H' => array(4,2,1,3),
1362
-			'I' => array(1,3,4,2),
1363
-			'J' => array(1,4,3,2),
1364
-			'K' => array(1,4,4,1),
1365
-			'L' => array(2,3,3,2),
1366
-			'M' => array(2,3,4,1),
1367
-			'N' => array(2,4,3,1),
1368
-			'O' => array(1,3,2,4),
1369
-			'P' => array(1,4,1,4),
1370
-			'Q' => array(1,4,2,3),
1371
-			'R' => array(2,3,1,4),
1372
-			'S' => array(2,3,2,3),
1373
-			'T' => array(2,4,1,3),
1374
-			'U' => array(1,1,4,4),
1375
-			'V' => array(1,2,3,4),
1376
-			'W' => array(1,2,4,3),
1377
-			'X' => array(2,1,3,4),
1378
-			'Y' => array(2,1,4,3),
1379
-			'Z' => array(2,2,3,3)		
1344
+			'0' => array(3, 3, 2, 2),
1345
+			'1' => array(3, 4, 1, 2),
1346
+			'2' => array(3, 4, 2, 1),
1347
+			'3' => array(4, 3, 1, 2),
1348
+			'4' => array(4, 3, 2, 1),
1349
+			'5' => array(4, 4, 1, 1),
1350
+			'6' => array(3, 1, 4, 2),
1351
+			'7' => array(3, 2, 3, 2),
1352
+			'8' => array(3, 2, 4, 1),
1353
+			'9' => array(4, 1, 3, 2),
1354
+			'A' => array(4, 1, 4, 1),
1355
+			'B' => array(4, 2, 3, 1),
1356
+			'C' => array(3, 1, 2, 4),
1357
+			'D' => array(3, 2, 1, 4),
1358
+			'E' => array(3, 2, 2, 3),
1359
+			'F' => array(4, 1, 1, 4),
1360
+			'G' => array(4, 1, 2, 3),
1361
+			'H' => array(4, 2, 1, 3),
1362
+			'I' => array(1, 3, 4, 2),
1363
+			'J' => array(1, 4, 3, 2),
1364
+			'K' => array(1, 4, 4, 1),
1365
+			'L' => array(2, 3, 3, 2),
1366
+			'M' => array(2, 3, 4, 1),
1367
+			'N' => array(2, 4, 3, 1),
1368
+			'O' => array(1, 3, 2, 4),
1369
+			'P' => array(1, 4, 1, 4),
1370
+			'Q' => array(1, 4, 2, 3),
1371
+			'R' => array(2, 3, 1, 4),
1372
+			'S' => array(2, 3, 2, 3),
1373
+			'T' => array(2, 4, 1, 3),
1374
+			'U' => array(1, 1, 4, 4),
1375
+			'V' => array(1, 2, 3, 4),
1376
+			'W' => array(1, 2, 4, 3),
1377
+			'X' => array(2, 1, 3, 4),
1378
+			'Y' => array(2, 1, 4, 3),
1379
+			'Z' => array(2, 2, 3, 3)		
1380 1380
 		);
1381 1381
 		$code = strtoupper($code);
1382 1382
 		$len = strlen($code);
@@ -1384,42 +1384,42 @@  discard block
 block discarded – undo
1384 1384
 		if ($notkix) {
1385 1385
 			// table for checksum calculation (row,col)
1386 1386
 			$checktable = array(
1387
-				'0' => array(1,1),
1388
-				'1' => array(1,2),
1389
-				'2' => array(1,3),
1390
-				'3' => array(1,4),
1391
-				'4' => array(1,5),
1392
-				'5' => array(1,0),
1393
-				'6' => array(2,1),
1394
-				'7' => array(2,2),
1395
-				'8' => array(2,3),
1396
-				'9' => array(2,4),
1397
-				'A' => array(2,5),
1398
-				'B' => array(2,0),
1399
-				'C' => array(3,1),
1400
-				'D' => array(3,2),
1401
-				'E' => array(3,3),
1402
-				'F' => array(3,4),
1403
-				'G' => array(3,5),
1404
-				'H' => array(3,0),
1405
-				'I' => array(4,1),
1406
-				'J' => array(4,2),
1407
-				'K' => array(4,3),
1408
-				'L' => array(4,4),
1409
-				'M' => array(4,5),
1410
-				'N' => array(4,0),
1411
-				'O' => array(5,1),
1412
-				'P' => array(5,2),
1413
-				'Q' => array(5,3),
1414
-				'R' => array(5,4),
1415
-				'S' => array(5,5),
1416
-				'T' => array(5,0),
1417
-				'U' => array(0,1),
1418
-				'V' => array(0,2),
1419
-				'W' => array(0,3),
1420
-				'X' => array(0,4),
1421
-				'Y' => array(0,5),
1422
-				'Z' => array(0,0)
1387
+				'0' => array(1, 1),
1388
+				'1' => array(1, 2),
1389
+				'2' => array(1, 3),
1390
+				'3' => array(1, 4),
1391
+				'4' => array(1, 5),
1392
+				'5' => array(1, 0),
1393
+				'6' => array(2, 1),
1394
+				'7' => array(2, 2),
1395
+				'8' => array(2, 3),
1396
+				'9' => array(2, 4),
1397
+				'A' => array(2, 5),
1398
+				'B' => array(2, 0),
1399
+				'C' => array(3, 1),
1400
+				'D' => array(3, 2),
1401
+				'E' => array(3, 3),
1402
+				'F' => array(3, 4),
1403
+				'G' => array(3, 5),
1404
+				'H' => array(3, 0),
1405
+				'I' => array(4, 1),
1406
+				'J' => array(4, 2),
1407
+				'K' => array(4, 3),
1408
+				'L' => array(4, 4),
1409
+				'M' => array(4, 5),
1410
+				'N' => array(4, 0),
1411
+				'O' => array(5, 1),
1412
+				'P' => array(5, 2),
1413
+				'Q' => array(5, 3),
1414
+				'R' => array(5, 4),
1415
+				'S' => array(5, 5),
1416
+				'T' => array(5, 0),
1417
+				'U' => array(0, 1),
1418
+				'V' => array(0, 2),
1419
+				'W' => array(0, 3),
1420
+				'X' => array(0, 4),
1421
+				'Y' => array(0, 5),
1422
+				'Z' => array(0, 0)
1423 1423
 			);
1424 1424
 			$row = 0;
1425 1425
 			$col = 0;
@@ -1429,7 +1429,7 @@  discard block
 block discarded – undo
1429 1429
 			}
1430 1430
 			$row %= 6;
1431 1431
 			$col %= 6;
1432
-			$chk = array_keys($checktable, array($row,$col));
1432
+			$chk = array_keys($checktable, array($row, $col));
1433 1433
 			$code .= $chk[0];
1434 1434
 			++$len;
1435 1435
 		}
@@ -1511,7 +1511,7 @@  discard block
 block discarded – undo
1511 1511
 		$k = 0;
1512 1512
 		$w = 0;
1513 1513
 		$seq = '';
1514
-		$code = 'A'.strtoupper($code).'A';
1514
+		$code = 'A' . strtoupper($code) . 'A';
1515 1515
 		$len = strlen($code);
1516 1516
 		for ($i = 0; $i < $len; ++$i) {
1517 1517
 			if (!isset($chr[$code{$i}])) {
@@ -1603,7 +1603,7 @@  discard block
 block discarded – undo
1603 1603
 			$code .= $check;
1604 1604
 			++$len;
1605 1605
 		}
1606
-		$code = 'S'.$code.'S';
1606
+		$code = 'S' . $code . 'S';
1607 1607
 		$len += 3;
1608 1608
 		for ($i = 0; $i < $len; ++$i) {
1609 1609
 			if (!isset($chr[$code{$i}])) {
@@ -1679,7 +1679,7 @@  discard block
 block discarded – undo
1679 1679
 					break;
1680 1680
 				}
1681 1681
 			}
1682
-		} while($code != 0);
1682
+		} while ($code != 0);
1683 1683
 		$seq = strrev($seq);
1684 1684
 		$k = 0;
1685 1685
 		$bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 2, 'bcode' => array());
@@ -1722,10 +1722,10 @@  discard block
 block discarded – undo
1722 1722
 	 * @access protected
1723 1723
 	 */
1724 1724
 	protected function barcode_imb($code) {
1725
-		$asc_chr = array(4,0,2,6,3,5,1,9,8,7,1,2,0,6,4,8,2,9,5,3,0,1,3,7,4,6,8,9,2,0,5,1,9,4,3,8,6,7,1,2,4,3,9,5,7,8,3,0,2,1,4,0,9,1,7,0,2,4,6,3,7,1,9,5,8);
1726
-		$dsc_chr = array(7,1,9,5,8,0,2,4,6,3,5,8,9,7,3,0,6,1,7,4,6,8,9,2,5,1,7,5,4,3,8,7,6,0,2,5,4,9,3,0,1,6,8,2,0,4,5,9,6,7,5,2,6,3,8,5,1,9,8,7,4,0,2,6,3);
1727
-		$asc_pos = array(3,0,8,11,1,12,8,11,10,6,4,12,2,7,9,6,7,9,2,8,4,0,12,7,10,9,0,7,10,5,7,9,6,8,2,12,1,4,2,0,1,5,4,6,12,1,0,9,4,7,5,10,2,6,9,11,2,12,6,7,5,11,0,3,2);
1728
-		$dsc_pos = array(2,10,12,5,9,1,5,4,3,9,11,5,10,1,6,3,4,1,10,0,2,11,8,6,1,12,3,8,6,4,4,11,0,6,1,9,11,5,3,7,3,10,7,11,8,2,10,3,5,8,0,3,12,11,8,4,5,1,3,0,7,12,9,8,10);
1725
+		$asc_chr = array(4, 0, 2, 6, 3, 5, 1, 9, 8, 7, 1, 2, 0, 6, 4, 8, 2, 9, 5, 3, 0, 1, 3, 7, 4, 6, 8, 9, 2, 0, 5, 1, 9, 4, 3, 8, 6, 7, 1, 2, 4, 3, 9, 5, 7, 8, 3, 0, 2, 1, 4, 0, 9, 1, 7, 0, 2, 4, 6, 3, 7, 1, 9, 5, 8);
1726
+		$dsc_chr = array(7, 1, 9, 5, 8, 0, 2, 4, 6, 3, 5, 8, 9, 7, 3, 0, 6, 1, 7, 4, 6, 8, 9, 2, 5, 1, 7, 5, 4, 3, 8, 7, 6, 0, 2, 5, 4, 9, 3, 0, 1, 6, 8, 2, 0, 4, 5, 9, 6, 7, 5, 2, 6, 3, 8, 5, 1, 9, 8, 7, 4, 0, 2, 6, 3);
1727
+		$asc_pos = array(3, 0, 8, 11, 1, 12, 8, 11, 10, 6, 4, 12, 2, 7, 9, 6, 7, 9, 2, 8, 4, 0, 12, 7, 10, 9, 0, 7, 10, 5, 7, 9, 6, 8, 2, 12, 1, 4, 2, 0, 1, 5, 4, 6, 12, 1, 0, 9, 4, 7, 5, 10, 2, 6, 9, 11, 2, 12, 6, 7, 5, 11, 0, 3, 2);
1728
+		$dsc_pos = array(2, 10, 12, 5, 9, 1, 5, 4, 3, 9, 11, 5, 10, 1, 6, 3, 4, 1, 10, 0, 2, 11, 8, 6, 1, 12, 3, 8, 6, 4, 4, 11, 0, 6, 1, 9, 11, 5, 3, 7, 3, 10, 7, 11, 8, 2, 10, 3, 5, 8, 0, 3, 12, 11, 8, 4, 5, 1, 3, 0, 7, 12, 9, 8, 10);
1729 1729
 		$code_arr = explode('-', $code);
1730 1730
 		$tracking_number = $code_arr[0];
1731 1731
 		if (isset($code_arr[1])) {
@@ -1773,7 +1773,7 @@  discard block
 block discarded – undo
1773 1773
 		$fcs = $this->imb_crc11fcs($binary_code_arr);
1774 1774
 		// exclude first 2 bits from first byte
1775 1775
 		$first_byte = sprintf('%2s', dechex((hexdec($binary_code_arr[0]) << 2) >> 2));
1776
-		$binary_code_102bit = $first_byte.substr($binary_code, 2);
1776
+		$binary_code_102bit = $first_byte . substr($binary_code, 2);
1777 1777
 		// convert binary data to codewords
1778 1778
 		$codewords = array();
1779 1779
 		$data = $this->hex_to_dec($binary_code_102bit);
@@ -1793,7 +1793,7 @@  discard block
 block discarded – undo
1793 1793
 		// convert codewords to characters
1794 1794
 		$characters = array();
1795 1795
 		$bitmask = 512;
1796
-		foreach($codewords as $k => $val) {
1796
+		foreach ($codewords as $k => $val) {
1797 1797
 			if ($val <= 1286) {
1798 1798
 				$chrcode = $table5of13[$val];
1799 1799
 			} else {
@@ -1848,11 +1848,11 @@  discard block
 block discarded – undo
1848 1848
 	public function dec_to_hex($number) {
1849 1849
 		$i = 0;
1850 1850
 		$hex = array();
1851
-		if($number == 0) {
1851
+		if ($number == 0) {
1852 1852
 			return '00';
1853 1853
 		}
1854
-		while($number > 0) {
1855
-			if($number == 0) {
1854
+		while ($number > 0) {
1855
+			if ($number == 0) {
1856 1856
 				array_push($hex, '0');
1857 1857
 			} else {
1858 1858
 				array_push($hex, strtoupper(dechex(bcmod($number, '16'))));
@@ -1873,7 +1873,7 @@  discard block
 block discarded – undo
1873 1873
 		$dec = 0;
1874 1874
 		$bitval = 1;
1875 1875
 		$len = strlen($hex);
1876
-		for($pos = ($len - 1); $pos >= 0; --$pos) {
1876
+		for ($pos = ($len - 1); $pos >= 0; --$pos) {
1877 1877
 			$dec = bcadd($dec, bcmul(hexdec($hex{$pos}), $bitval));
1878 1878
 			$bitval = bcmul($bitval, 16);
1879 1879
 		}
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 //============================================================+
3 5
 // File name   : barcodes.php
4 6
 // Begin       : 2008-06-09
Please login to merge, or discard this patch.
includes/librairies/HTML2PDF/_tcpdf_5.0.002/qrcode.php 3 patches
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -173,29 +173,29 @@  discard block
 block discarded – undo
173 173
 	/**
174 174
 	 * Maximum matrix size for maximum version (version 40 is 177*177 matrix).
175 175
 	 */
176
-    define('QRSPEC_WIDTH_MAX', 177);
176
+	define('QRSPEC_WIDTH_MAX', 177);
177 177
 
178 178
 	// -----------------------------------------------------
179 179
 
180 180
 	/**
181 181
 	 * Matrix index to get width from $capacity array.
182 182
 	 */
183
-    define('QRCAP_WIDTH',    0);
183
+	define('QRCAP_WIDTH',    0);
184 184
 
185
-    /**
185
+	/**
186 186
 	 * Matrix index to get number of words from $capacity array.
187 187
 	 */
188
-    define('QRCAP_WORDS',    1);
188
+	define('QRCAP_WORDS',    1);
189 189
 
190
-    /**
190
+	/**
191 191
 	 * Matrix index to get remainder from $capacity array.
192 192
 	 */
193
-    define('QRCAP_REMINDER', 2);
193
+	define('QRCAP_REMINDER', 2);
194 194
 
195
-    /**
195
+	/**
196 196
 	 * Matrix index to get error correction level from $capacity array.
197 197
 	 */
198
-    define('QRCAP_EC',       3);
198
+	define('QRCAP_EC',       3);
199 199
 
200 200
 	// -----------------------------------------------------
201 201
 
@@ -204,33 +204,33 @@  discard block
 block discarded – undo
204 204
 	/**
205 205
 	 * Number of header bits for structured mode
206 206
 	 */
207
-    define('STRUCTURE_HEADER_BITS',  20);
207
+	define('STRUCTURE_HEADER_BITS',  20);
208 208
 
209
-    /**
209
+	/**
210 210
 	 * Max number of symbols for structured mode
211 211
 	 */
212
-    define('MAX_STRUCTURED_SYMBOLS', 16);
212
+	define('MAX_STRUCTURED_SYMBOLS', 16);
213 213
 
214 214
 	// -----------------------------------------------------
215 215
 
216
-    // Masks
216
+	// Masks
217 217
 
218
-    /**
218
+	/**
219 219
 	 * Down point base value for case 1 mask pattern (concatenation of same color in a line or a column)
220 220
 	 */
221
-    define('N1',  3);
221
+	define('N1',  3);
222 222
 
223
-    /**
223
+	/**
224 224
 	 * Down point base value for case 2 mask pattern (module block of same color)
225 225
 	 */
226 226
 	define('N2',  3);
227 227
 
228
-    /**
228
+	/**
229 229
 	 * Down point base value for case 3 mask pattern (1:1:3:1:1(dark:bright:dark:bright:dark)pattern in a line or a column)
230 230
 	 */
231 231
 	define('N3', 40);
232 232
 
233
-    /**
233
+	/**
234 234
 	 * Down point base value for case 4 mask pattern (ration of dark modules in whole)
235 235
 	 */
236 236
 	define('N4', 10);
@@ -264,12 +264,12 @@  discard block
 block discarded – undo
264 264
 
265 265
 	// for compaibility with PHP4
266 266
 	if (!function_exists('str_split')) {
267
-    	/**
268
-    	 * Convert a string to an array (needed for PHP4 compatibility)
269
-    	 * @param string $string The input string.
270
-    	 * @param int $split_length Maximum length of the chunk.
271
-    	 * @return  If the optional split_length  parameter is specified, the returned array will be broken down into chunks with each being split_length  in length, otherwise each chunk will be one character in length. FALSE is returned if split_length is less than 1. If the split_length length exceeds the length of string , the entire string is returned as the first (and only) array element.
272
-    	 */
267
+		/**
268
+		 * Convert a string to an array (needed for PHP4 compatibility)
269
+		 * @param string $string The input string.
270
+		 * @param int $split_length Maximum length of the chunk.
271
+		 * @return  If the optional split_length  parameter is specified, the returned array will be broken down into chunks with each being split_length  in length, otherwise each chunk will be one character in length. FALSE is returned if split_length is less than 1. If the split_length length exceeds the length of string , the entire string is returned as the first (and only) array element.
272
+		 */
273 273
 		function str_split($string, $split_length=1) {
274 274
 			if ((strlen($string) > $split_length) OR (!$split_length)) {
275 275
 				do {
@@ -2622,7 +2622,7 @@  discard block
 block discarded – undo
2622 2622
 		}
2623 2623
 
2624 2624
 		/**
2625
-		* Return block number 1
2625
+		 * Return block number 1
2626 2626
 		 * @param array $spec
2627 2627
 		 * @return int value
2628 2628
 		 */
Please login to merge, or discard this patch.
Spacing   +236 added lines, -236 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 //============================================================+
3 3
 // File name   : qrcode.php
4 4
 // Begin       : 2010-03-22
@@ -180,12 +180,12 @@  discard block
 block discarded – undo
180 180
 	/**
181 181
 	 * Matrix index to get width from $capacity array.
182 182
 	 */
183
-    define('QRCAP_WIDTH',    0);
183
+    define('QRCAP_WIDTH', 0);
184 184
 
185 185
     /**
186 186
 	 * Matrix index to get number of words from $capacity array.
187 187
 	 */
188
-    define('QRCAP_WORDS',    1);
188
+    define('QRCAP_WORDS', 1);
189 189
 
190 190
     /**
191 191
 	 * Matrix index to get remainder from $capacity array.
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
     /**
196 196
 	 * Matrix index to get error correction level from $capacity array.
197 197
 	 */
198
-    define('QRCAP_EC',       3);
198
+    define('QRCAP_EC', 3);
199 199
 
200 200
 	// -----------------------------------------------------
201 201
 
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 	/**
205 205
 	 * Number of header bits for structured mode
206 206
 	 */
207
-    define('STRUCTURE_HEADER_BITS',  20);
207
+    define('STRUCTURE_HEADER_BITS', 20);
208 208
 
209 209
     /**
210 210
 	 * Max number of symbols for structured mode
@@ -218,12 +218,12 @@  discard block
 block discarded – undo
218 218
     /**
219 219
 	 * Down point base value for case 1 mask pattern (concatenation of same color in a line or a column)
220 220
 	 */
221
-    define('N1',  3);
221
+    define('N1', 3);
222 222
 
223 223
     /**
224 224
 	 * Down point base value for case 2 mask pattern (module block of same color)
225 225
 	 */
226
-	define('N2',  3);
226
+	define('N2', 3);
227 227
 
228 228
     /**
229 229
 	 * Down point base value for case 3 mask pattern (1:1:3:1:1(dark:bright:dark:bright:dark)pattern in a line or a column)
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
     	 * @param int $split_length Maximum length of the chunk.
271 271
     	 * @return  If the optional split_length  parameter is specified, the returned array will be broken down into chunks with each being split_length  in length, otherwise each chunk will be one character in length. FALSE is returned if split_length is less than 1. If the split_length length exceeds the length of string , the entire string is returned as the first (and only) array element.
272 272
     	 */
273
-		function str_split($string, $split_length=1) {
273
+		function str_split($string, $split_length = 1) {
274 274
 			if ((strlen($string) > $split_length) OR (!$split_length)) {
275 275
 				do {
276 276
 					$c = strlen($string);
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
 			-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, //
482 482
 			-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, //
483 483
 			36, -1, -1, -1, 37, 38, -1, -1, -1, -1, 39, 40, -1, 41, 42, 43, //
484
-			 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 44, -1, -1, -1, -1, -1, //
484
+			 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 44, -1, -1, -1, -1, -1, //
485 485
 			-1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, //
486 486
 			25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, //
487 487
 			-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, //
@@ -494,47 +494,47 @@  discard block
 block discarded – undo
494 494
 		 * @access protected
495 495
 		 */
496 496
 		protected $capacity = array(
497
-			array(  0,    0, 0, array(   0,    0,    0,    0)), //
498
-			array( 21,   26, 0, array(   7,   10,   13,   17)), //  1
499
-			array( 25,   44, 7, array(  10,   16,   22,   28)), //
500
-			array( 29,   70, 7, array(  15,   26,   36,   44)), //
501
-			array( 33,  100, 7, array(  20,   36,   52,   64)), //
502
-			array( 37,  134, 7, array(  26,   48,   72,   88)), //  5
503
-			array( 41,  172, 7, array(  36,   64,   96,  112)), //
504
-			array( 45,  196, 0, array(  40,   72,  108,  130)), //
505
-			array( 49,  242, 0, array(  48,   88,  132,  156)), //
506
-			array( 53,  292, 0, array(  60,  110,  160,  192)), //
507
-			array( 57,  346, 0, array(  72,  130,  192,  224)), // 10
508
-			array( 61,  404, 0, array(  80,  150,  224,  264)), //
509
-			array( 65,  466, 0, array(  96,  176,  260,  308)), //
510
-			array( 69,  532, 0, array( 104,  198,  288,  352)), //
511
-			array( 73,  581, 3, array( 120,  216,  320,  384)), //
512
-			array( 77,  655, 3, array( 132,  240,  360,  432)), // 15
513
-			array( 81,  733, 3, array( 144,  280,  408,  480)), //
514
-			array( 85,  815, 3, array( 168,  308,  448,  532)), //
515
-			array( 89,  901, 3, array( 180,  338,  504,  588)), //
516
-			array( 93,  991, 3, array( 196,  364,  546,  650)), //
517
-			array( 97, 1085, 3, array( 224,  416,  600,  700)), // 20
518
-			array(101, 1156, 4, array( 224,  442,  644,  750)), //
519
-			array(105, 1258, 4, array( 252,  476,  690,  816)), //
520
-			array(109, 1364, 4, array( 270,  504,  750,  900)), //
521
-			array(113, 1474, 4, array( 300,  560,  810,  960)), //
522
-			array(117, 1588, 4, array( 312,  588,  870, 1050)), // 25
523
-			array(121, 1706, 4, array( 336,  644,  952, 1110)), //
524
-			array(125, 1828, 4, array( 360,  700, 1020, 1200)), //
525
-			array(129, 1921, 3, array( 390,  728, 1050, 1260)), //
526
-			array(133, 2051, 3, array( 420,  784, 1140, 1350)), //
527
-			array(137, 2185, 3, array( 450,  812, 1200, 1440)), // 30
528
-			array(141, 2323, 3, array( 480,  868, 1290, 1530)), //
529
-			array(145, 2465, 3, array( 510,  924, 1350, 1620)), //
530
-			array(149, 2611, 3, array( 540,  980, 1440, 1710)), //
531
-			array(153, 2761, 3, array( 570, 1036, 1530, 1800)), //
532
-			array(157, 2876, 0, array( 570, 1064, 1590, 1890)), // 35
533
-			array(161, 3034, 0, array( 600, 1120, 1680, 1980)), //
534
-			array(165, 3196, 0, array( 630, 1204, 1770, 2100)), //
535
-			array(169, 3362, 0, array( 660, 1260, 1860, 2220)), //
536
-			array(173, 3532, 0, array( 720, 1316, 1950, 2310)), //
537
-			array(177, 3706, 0, array( 750, 1372, 2040, 2430))  // 40
497
+			array(0, 0, 0, array(0, 0, 0, 0)), //
498
+			array(21, 26, 0, array(7, 10, 13, 17)), //  1
499
+			array(25, 44, 7, array(10, 16, 22, 28)), //
500
+			array(29, 70, 7, array(15, 26, 36, 44)), //
501
+			array(33, 100, 7, array(20, 36, 52, 64)), //
502
+			array(37, 134, 7, array(26, 48, 72, 88)), //  5
503
+			array(41, 172, 7, array(36, 64, 96, 112)), //
504
+			array(45, 196, 0, array(40, 72, 108, 130)), //
505
+			array(49, 242, 0, array(48, 88, 132, 156)), //
506
+			array(53, 292, 0, array(60, 110, 160, 192)), //
507
+			array(57, 346, 0, array(72, 130, 192, 224)), // 10
508
+			array(61, 404, 0, array(80, 150, 224, 264)), //
509
+			array(65, 466, 0, array(96, 176, 260, 308)), //
510
+			array(69, 532, 0, array(104, 198, 288, 352)), //
511
+			array(73, 581, 3, array(120, 216, 320, 384)), //
512
+			array(77, 655, 3, array(132, 240, 360, 432)), // 15
513
+			array(81, 733, 3, array(144, 280, 408, 480)), //
514
+			array(85, 815, 3, array(168, 308, 448, 532)), //
515
+			array(89, 901, 3, array(180, 338, 504, 588)), //
516
+			array(93, 991, 3, array(196, 364, 546, 650)), //
517
+			array(97, 1085, 3, array(224, 416, 600, 700)), // 20
518
+			array(101, 1156, 4, array(224, 442, 644, 750)), //
519
+			array(105, 1258, 4, array(252, 476, 690, 816)), //
520
+			array(109, 1364, 4, array(270, 504, 750, 900)), //
521
+			array(113, 1474, 4, array(300, 560, 810, 960)), //
522
+			array(117, 1588, 4, array(312, 588, 870, 1050)), // 25
523
+			array(121, 1706, 4, array(336, 644, 952, 1110)), //
524
+			array(125, 1828, 4, array(360, 700, 1020, 1200)), //
525
+			array(129, 1921, 3, array(390, 728, 1050, 1260)), //
526
+			array(133, 2051, 3, array(420, 784, 1140, 1350)), //
527
+			array(137, 2185, 3, array(450, 812, 1200, 1440)), // 30
528
+			array(141, 2323, 3, array(480, 868, 1290, 1530)), //
529
+			array(145, 2465, 3, array(510, 924, 1350, 1620)), //
530
+			array(149, 2611, 3, array(540, 980, 1440, 1710)), //
531
+			array(153, 2761, 3, array(570, 1036, 1530, 1800)), //
532
+			array(157, 2876, 0, array(570, 1064, 1590, 1890)), // 35
533
+			array(161, 3034, 0, array(600, 1120, 1680, 1980)), //
534
+			array(165, 3196, 0, array(630, 1204, 1770, 2100)), //
535
+			array(169, 3362, 0, array(660, 1260, 1860, 2220)), //
536
+			array(173, 3532, 0, array(720, 1316, 1950, 2310)), //
537
+			array(177, 3706, 0, array(750, 1372, 2040, 2430))  // 40
538 538
 		);
539 539
 
540 540
 		/**
@@ -543,9 +543,9 @@  discard block
 block discarded – undo
543 543
 		 */
544 544
 		protected $lengthTableBits = array(
545 545
 			array(10, 12, 14),
546
-			array( 9, 11, 13),
547
-			array( 8, 16, 16),
548
-			array( 8, 10, 12)
546
+			array(9, 11, 13),
547
+			array(8, 16, 16),
548
+			array(8, 10, 12)
549 549
 		);
550 550
 
551 551
 		/**
@@ -554,47 +554,47 @@  discard block
 block discarded – undo
554 554
 		 * @access protected
555 555
 		 */
556 556
 		protected $eccTable = array(
557
-			array(array( 0,  0), array( 0,  0), array( 0,  0), array( 0,  0)), //
558
-			array(array( 1,  0), array( 1,  0), array( 1,  0), array( 1,  0)), //  1
559
-			array(array( 1,  0), array( 1,  0), array( 1,  0), array( 1,  0)), //
560
-			array(array( 1,  0), array( 1,  0), array( 2,  0), array( 2,  0)), //
561
-			array(array( 1,  0), array( 2,  0), array( 2,  0), array( 4,  0)), //
562
-			array(array( 1,  0), array( 2,  0), array( 2,  2), array( 2,  2)), //  5
563
-			array(array( 2,  0), array( 4,  0), array( 4,  0), array( 4,  0)), //
564
-			array(array( 2,  0), array( 4,  0), array( 2,  4), array( 4,  1)), //
565
-			array(array( 2,  0), array( 2,  2), array( 4,  2), array( 4,  2)), //
566
-			array(array( 2,  0), array( 3,  2), array( 4,  4), array( 4,  4)), //
567
-			array(array( 2,  2), array( 4,  1), array( 6,  2), array( 6,  2)), // 10
568
-			array(array( 4,  0), array( 1,  4), array( 4,  4), array( 3,  8)), //
569
-			array(array( 2,  2), array( 6,  2), array( 4,  6), array( 7,  4)), //
570
-			array(array( 4,  0), array( 8,  1), array( 8,  4), array(12,  4)), //
571
-			array(array( 3,  1), array( 4,  5), array(11,  5), array(11,  5)), //
572
-			array(array( 5,  1), array( 5,  5), array( 5,  7), array(11,  7)), // 15
573
-			array(array( 5,  1), array( 7,  3), array(15,  2), array( 3, 13)), //
574
-			array(array( 1,  5), array(10,  1), array( 1, 15), array( 2, 17)), //
575
-			array(array( 5,  1), array( 9,  4), array(17,  1), array( 2, 19)), //
576
-			array(array( 3,  4), array( 3, 11), array(17,  4), array( 9, 16)), //
577
-			array(array( 3,  5), array( 3, 13), array(15,  5), array(15, 10)), // 20
578
-			array(array( 4,  4), array(17,  0), array(17,  6), array(19,  6)), //
579
-			array(array( 2,  7), array(17,  0), array( 7, 16), array(34,  0)), //
580
-			array(array( 4,  5), array( 4, 14), array(11, 14), array(16, 14)), //
581
-			array(array( 6,  4), array( 6, 14), array(11, 16), array(30,  2)), //
582
-			array(array( 8,  4), array( 8, 13), array( 7, 22), array(22, 13)), // 25
583
-			array(array(10,  2), array(19,  4), array(28,  6), array(33,  4)), //
584
-			array(array( 8,  4), array(22,  3), array( 8, 26), array(12, 28)), //
585
-			array(array( 3, 10), array( 3, 23), array( 4, 31), array(11, 31)), //
586
-			array(array( 7,  7), array(21,  7), array( 1, 37), array(19, 26)), //
587
-			array(array( 5, 10), array(19, 10), array(15, 25), array(23, 25)), // 30
588
-			array(array(13,  3), array( 2, 29), array(42,  1), array(23, 28)), //
589
-			array(array(17,  0), array(10, 23), array(10, 35), array(19, 35)), //
590
-			array(array(17,  1), array(14, 21), array(29, 19), array(11, 46)), //
591
-			array(array(13,  6), array(14, 23), array(44,  7), array(59,  1)), //
592
-			array(array(12,  7), array(12, 26), array(39, 14), array(22, 41)), // 35
593
-			array(array( 6, 14), array( 6, 34), array(46, 10), array( 2, 64)), //
594
-			array(array(17,  4), array(29, 14), array(49, 10), array(24, 46)), //
595
-			array(array( 4, 18), array(13, 32), array(48, 14), array(42, 32)), //
596
-			array(array(20,  4), array(40,  7), array(43, 22), array(10, 67)), //
597
-			array(array(19,  6), array(18, 31), array(34, 34), array(20, 61))  // 40
557
+			array(array(0, 0), array(0, 0), array(0, 0), array(0, 0)), //
558
+			array(array(1, 0), array(1, 0), array(1, 0), array(1, 0)), //  1
559
+			array(array(1, 0), array(1, 0), array(1, 0), array(1, 0)), //
560
+			array(array(1, 0), array(1, 0), array(2, 0), array(2, 0)), //
561
+			array(array(1, 0), array(2, 0), array(2, 0), array(4, 0)), //
562
+			array(array(1, 0), array(2, 0), array(2, 2), array(2, 2)), //  5
563
+			array(array(2, 0), array(4, 0), array(4, 0), array(4, 0)), //
564
+			array(array(2, 0), array(4, 0), array(2, 4), array(4, 1)), //
565
+			array(array(2, 0), array(2, 2), array(4, 2), array(4, 2)), //
566
+			array(array(2, 0), array(3, 2), array(4, 4), array(4, 4)), //
567
+			array(array(2, 2), array(4, 1), array(6, 2), array(6, 2)), // 10
568
+			array(array(4, 0), array(1, 4), array(4, 4), array(3, 8)), //
569
+			array(array(2, 2), array(6, 2), array(4, 6), array(7, 4)), //
570
+			array(array(4, 0), array(8, 1), array(8, 4), array(12, 4)), //
571
+			array(array(3, 1), array(4, 5), array(11, 5), array(11, 5)), //
572
+			array(array(5, 1), array(5, 5), array(5, 7), array(11, 7)), // 15
573
+			array(array(5, 1), array(7, 3), array(15, 2), array(3, 13)), //
574
+			array(array(1, 5), array(10, 1), array(1, 15), array(2, 17)), //
575
+			array(array(5, 1), array(9, 4), array(17, 1), array(2, 19)), //
576
+			array(array(3, 4), array(3, 11), array(17, 4), array(9, 16)), //
577
+			array(array(3, 5), array(3, 13), array(15, 5), array(15, 10)), // 20
578
+			array(array(4, 4), array(17, 0), array(17, 6), array(19, 6)), //
579
+			array(array(2, 7), array(17, 0), array(7, 16), array(34, 0)), //
580
+			array(array(4, 5), array(4, 14), array(11, 14), array(16, 14)), //
581
+			array(array(6, 4), array(6, 14), array(11, 16), array(30, 2)), //
582
+			array(array(8, 4), array(8, 13), array(7, 22), array(22, 13)), // 25
583
+			array(array(10, 2), array(19, 4), array(28, 6), array(33, 4)), //
584
+			array(array(8, 4), array(22, 3), array(8, 26), array(12, 28)), //
585
+			array(array(3, 10), array(3, 23), array(4, 31), array(11, 31)), //
586
+			array(array(7, 7), array(21, 7), array(1, 37), array(19, 26)), //
587
+			array(array(5, 10), array(19, 10), array(15, 25), array(23, 25)), // 30
588
+			array(array(13, 3), array(2, 29), array(42, 1), array(23, 28)), //
589
+			array(array(17, 0), array(10, 23), array(10, 35), array(19, 35)), //
590
+			array(array(17, 1), array(14, 21), array(29, 19), array(11, 46)), //
591
+			array(array(13, 6), array(14, 23), array(44, 7), array(59, 1)), //
592
+			array(array(12, 7), array(12, 26), array(39, 14), array(22, 41)), // 35
593
+			array(array(6, 14), array(6, 34), array(46, 10), array(2, 64)), //
594
+			array(array(17, 4), array(29, 14), array(49, 10), array(24, 46)), //
595
+			array(array(4, 18), array(13, 32), array(48, 14), array(42, 32)), //
596
+			array(array(20, 4), array(40, 7), array(43, 22), array(10, 67)), //
597
+			array(array(19, 6), array(18, 31), array(34, 34), array(20, 61))  // 40
598 598
 		);
599 599
 
600 600
 		/**
@@ -604,9 +604,9 @@  discard block
 block discarded – undo
604 604
 		 * @access protected
605 605
 		 */
606 606
 		protected $alignmentPattern = array(
607
-			array( 0,  0),
608
-			array( 0,  0), array(18,  0), array(22,  0), array(26,  0), array(30,  0), //  1- 5
609
-			array(34,  0), array(22, 38), array(24, 42), array(26, 46), array(28, 50), //  6-10
607
+			array(0, 0),
608
+			array(0, 0), array(18, 0), array(22, 0), array(26, 0), array(30, 0), //  1- 5
609
+			array(34, 0), array(22, 38), array(24, 42), array(26, 46), array(28, 50), //  6-10
610 610
 			array(30, 54), array(32, 58), array(34, 62), array(26, 46), array(26, 48), // 11-15
611 611
 			array(26, 50), array(30, 54), array(30, 56), array(30, 58), array(34, 62), // 16-20
612 612
 			array(28, 50), array(26, 50), array(30, 54), array(28, 54), array(32, 58), // 21-25
@@ -679,7 +679,7 @@  discard block
 block discarded – undo
679 679
 			foreach ($qrTab as $line) {
680 680
 				$arrAdd = array();
681 681
 				foreach (str_split($line) as $char) {
682
-					$arrAdd[] = ($char=='1')?1:0;
682
+					$arrAdd[] = ($char == '1') ? 1 : 0;
683 683
 				}
684 684
 				$barcode_array['bcode'][] = $arrAdd;
685 685
 			}
@@ -704,8 +704,8 @@  discard block
 block discarded – undo
704 704
 			$len = count($frame);
705 705
 			// the frame is square (width = height)
706 706
 			foreach ($frame as &$frameLine) {
707
-				for ($i=0; $i<$len; $i++) {
708
-					$frameLine[$i] = (ord($frameLine[$i])&1)?'1':'0';
707
+				for ($i = 0; $i < $len; $i++) {
708
+					$frameLine[$i] = (ord($frameLine[$i]) & 1) ? '1' : '0';
709 709
 				}
710 710
 			}
711 711
 			return $frame;
@@ -755,10 +755,10 @@  discard block
 block discarded – undo
755 755
 			$this->dir = -1;
756 756
 			$this->bit = -1;
757 757
 			// inteleaved data and ecc codes
758
-			for ($i=0; $i < ($this->dataLength + $this->eccLength); $i++) {
758
+			for ($i = 0; $i < ($this->dataLength + $this->eccLength); $i++) {
759 759
 				$code = $this->getCode();
760 760
 				$bit = 0x80;
761
-				for ($j=0; $j<8; $j++) {
761
+				for ($j = 0; $j < 8; $j++) {
762 762
 					$addr = $this->getNextPosition();
763 763
 					$this->setFrameAt($addr, 0x02 | (($bit & $code) != 0));
764 764
 					$bit = $bit >> 1;
@@ -766,7 +766,7 @@  discard block
 block discarded – undo
766 766
 			}
767 767
 			// remainder bits
768 768
 			$j = $this->getRemainder($this->version);
769
-			for ($i=0; $i<$j; $i++) {
769
+			for ($i = 0; $i < $j; $i++) {
770 770
 				$addr = $this->getNextPosition();
771 771
 				$this->setFrameAt($addr, 0x02);
772 772
 			}
@@ -856,7 +856,7 @@  discard block
 block discarded – undo
856 856
 				}
857 857
 				$this->x = $x;
858 858
 				$this->y = $y;
859
-			} while(ord($this->frame[$y][$x]) & 0x80);
859
+			} while (ord($this->frame[$y][$x]) & 0x80);
860 860
 			return array('x'=>$x, 'y'=>$y);
861 861
 		}
862 862
 
@@ -877,7 +877,7 @@  discard block
 block discarded – undo
877 877
 			$dataPos = 0;
878 878
 			$eccPos = 0;
879 879
 			$endfor = $this->rsBlockNum1($spec);
880
-			for ($i=0; $i < $endfor; ++$i) {
880
+			for ($i = 0; $i < $endfor; ++$i) {
881 881
 				$ecc = array_slice($this->ecccode, $eccPos);
882 882
 				$this->rsblocks[$blockNo] = array();
883 883
 				$this->rsblocks[$blockNo]['dataLength'] = $dl;
@@ -885,7 +885,7 @@  discard block
 block discarded – undo
885 885
 				$this->rsblocks[$blockNo]['eccLength'] = $el;
886 886
 				$ecc = $this->encode_rs_char($rs, $this->rsblocks[$blockNo]['data'], $ecc);
887 887
 				$this->rsblocks[$blockNo]['ecc'] = $ecc;
888
-				$this->ecccode = array_merge(array_slice($this->ecccode,0, $eccPos), $ecc);
888
+				$this->ecccode = array_merge(array_slice($this->ecccode, 0, $eccPos), $ecc);
889 889
 				$dataPos += $dl;
890 890
 				$eccPos += $el;
891 891
 				$blockNo++;
@@ -900,7 +900,7 @@  discard block
 block discarded – undo
900 900
 				return -1;
901 901
 			}
902 902
 			$endfor = $this->rsBlockNum2($spec);
903
-			for ($i=0; $i < $endfor; ++$i) {
903
+			for ($i = 0; $i < $endfor; ++$i) {
904 904
 				$ecc = array_slice($this->ecccode, $eccPos);
905 905
 				$this->rsblocks[$blockNo] = array();
906 906
 				$this->rsblocks[$blockNo]['dataLength'] = $dl;
@@ -953,8 +953,8 @@  discard block
 block discarded – undo
953 953
 		 */
954 954
 		 protected function writeFormatInformation($width, &$frame, $mask, $level) {
955 955
 			$blacks = 0;
956
-			$format =  $this->getFormatInfo($mask, $level);
957
-			for ($i=0; $i<8; ++$i) {
956
+			$format = $this->getFormatInfo($mask, $level);
957
+			for ($i = 0; $i < 8; ++$i) {
958 958
 				if ($format & 1) {
959 959
 					$blacks += 2;
960 960
 					$v = 0x85;
@@ -969,7 +969,7 @@  discard block
 block discarded – undo
969 969
 				}
970 970
 				$format = $format >> 1;
971 971
 			}
972
-			for ($i=0; $i<7; ++$i) {
972
+			for ($i = 0; $i < 7; ++$i) {
973 973
 			if ($format & 1) {
974 974
 				$blacks += 2;
975 975
 				$v = 0x85;
@@ -1076,13 +1076,13 @@  discard block
 block discarded – undo
1076 1076
 		 */
1077 1077
 		protected function generateMaskNo($maskNo, $width, $frame) {
1078 1078
 			$bitMask = array_fill(0, $width, array_fill(0, $width, 0));
1079
-			for ($y=0; $y<$width; ++$y) {
1080
-				for ($x=0; $x<$width; ++$x) {
1079
+			for ($y = 0; $y < $width; ++$y) {
1080
+				for ($x = 0; $x < $width; ++$x) {
1081 1081
 					if (ord($frame[$y][$x]) & 0x80) {
1082 1082
 						$bitMask[$y][$x] = 0;
1083 1083
 					} else {
1084
-						$maskFunc = call_user_func(array($this, 'mask'.$maskNo), $x, $y);
1085
-						$bitMask[$y][$x] = ($maskFunc == 0)?1:0;
1084
+						$maskFunc = call_user_func(array($this, 'mask' . $maskNo), $x, $y);
1085
+						$bitMask[$y][$x] = ($maskFunc == 0) ? 1 : 0;
1086 1086
 					}
1087 1087
 				}
1088 1088
 			}
@@ -1098,7 +1098,7 @@  discard block
 block discarded – undo
1098 1098
 		 * @param boolean $maskGenOnly
1099 1099
 		 * @return int b
1100 1100
 		 */
1101
-		 protected function makeMaskNo($maskNo, $width, $s, &$d, $maskGenOnly=false) {
1101
+		 protected function makeMaskNo($maskNo, $width, $s, &$d, $maskGenOnly = false) {
1102 1102
 			$b = 0;
1103 1103
 			$bitMask = array();
1104 1104
 			$bitMask = $this->generateMaskNo($maskNo, $width, $s, $d);
@@ -1106,8 +1106,8 @@  discard block
 block discarded – undo
1106 1106
 				return;
1107 1107
 			}
1108 1108
 			$d = $s;
1109
-			for ($y=0; $y<$width; ++$y) {
1110
-				for ($x=0; $x<$width; ++$x) {
1109
+			for ($y = 0; $y < $width; ++$y) {
1110
+				for ($x = 0; $x < $width; ++$x) {
1111 1111
 					if ($bitMask[$y][$x] == 1) {
1112 1112
 						$d[$y][$x] = chr(ord($s[$y][$x]) ^ (int)$bitMask[$y][$x]);
1113 1113
 					}
@@ -1139,20 +1139,20 @@  discard block
 block discarded – undo
1139 1139
 		 */
1140 1140
 		 protected function calcN1N3($length) {
1141 1141
 			$demerit = 0;
1142
-			for ($i=0; $i<$length; ++$i) {
1142
+			for ($i = 0; $i < $length; ++$i) {
1143 1143
 				if ($this->runLength[$i] >= 5) {
1144 1144
 					$demerit += (N1 + ($this->runLength[$i] - 5));
1145 1145
 				}
1146 1146
 				if ($i & 1) {
1147
-					if (($i >= 3) AND ($i < ($length-2)) AND ($this->runLength[$i] % 3 == 0)) {
1147
+					if (($i >= 3) AND ($i < ($length - 2)) AND ($this->runLength[$i] % 3 == 0)) {
1148 1148
 						$fact = (int)($this->runLength[$i] / 3);
1149
-						if (($this->runLength[$i-2] == $fact)
1150
-							AND ($this->runLength[$i-1] == $fact)
1151
-							AND ($this->runLength[$i+1] == $fact)
1152
-							AND ($this->runLength[$i+2] == $fact)) {
1153
-							if (($this->runLength[$i-3] < 0) OR ($this->runLength[$i-3] >= (4 * $fact))) {
1149
+						if (($this->runLength[$i - 2] == $fact)
1150
+							AND ($this->runLength[$i - 1] == $fact)
1151
+							AND ($this->runLength[$i + 1] == $fact)
1152
+							AND ($this->runLength[$i + 2] == $fact)) {
1153
+							if (($this->runLength[$i - 3] < 0) OR ($this->runLength[$i - 3] >= (4 * $fact))) {
1154 1154
 								$demerit += N3;
1155
-							} elseif ((($i+3) >= $length) OR ($this->runLength[$i+3] >= (4 * $fact))) {
1155
+							} elseif ((($i + 3) >= $length) OR ($this->runLength[$i + 3] >= (4 * $fact))) {
1156 1156
 								$demerit += N3;
1157 1157
 							}
1158 1158
 						}
@@ -1171,17 +1171,17 @@  discard block
 block discarded – undo
1171 1171
 		 protected function evaluateSymbol($width, $frame) {
1172 1172
 			$head = 0;
1173 1173
 			$demerit = 0;
1174
-			for ($y=0; $y<$width; ++$y) {
1174
+			for ($y = 0; $y < $width; ++$y) {
1175 1175
 				$head = 0;
1176 1176
 				$this->runLength[0] = 1;
1177 1177
 				$frameY = $frame[$y];
1178 1178
 				if ($y > 0) {
1179
-					$frameYM = $frame[$y-1];
1179
+					$frameYM = $frame[$y - 1];
1180 1180
 				}
1181
-				for ($x=0; $x<$width; ++$x) {
1181
+				for ($x = 0; $x < $width; ++$x) {
1182 1182
 					if (($x > 0) AND ($y > 0)) {
1183
-						$b22 = ord($frameY[$x]) & ord($frameY[$x-1]) & ord($frameYM[$x]) & ord($frameYM[$x-1]);
1184
-						$w22 = ord($frameY[$x]) | ord($frameY[$x-1]) | ord($frameYM[$x]) | ord($frameYM[$x-1]);
1183
+						$b22 = ord($frameY[$x]) & ord($frameY[$x - 1]) & ord($frameYM[$x]) & ord($frameYM[$x - 1]);
1184
+						$w22 = ord($frameY[$x]) | ord($frameY[$x - 1]) | ord($frameYM[$x]) | ord($frameYM[$x - 1]);
1185 1185
 						if (($b22 | ($w22 ^ 1)) & 1) {
1186 1186
 							$demerit += N2;
1187 1187
 						}
@@ -1191,7 +1191,7 @@  discard block
 block discarded – undo
1191 1191
 						$head = 1;
1192 1192
 						$this->runLength[$head] = 1;
1193 1193
 					} elseif ($x > 0) {
1194
-						if ((ord($frameY[$x]) ^ ord($frameY[$x-1])) & 1) {
1194
+						if ((ord($frameY[$x]) ^ ord($frameY[$x - 1])) & 1) {
1195 1195
 							$head++;
1196 1196
 							$this->runLength[$head] = 1;
1197 1197
 						} else {
@@ -1199,18 +1199,18 @@  discard block
 block discarded – undo
1199 1199
 						}
1200 1200
 					}
1201 1201
 				}
1202
-				$demerit += $this->calcN1N3($head+1);
1202
+				$demerit += $this->calcN1N3($head + 1);
1203 1203
 			}
1204
-			for ($x=0; $x<$width; ++$x) {
1204
+			for ($x = 0; $x < $width; ++$x) {
1205 1205
 				$head = 0;
1206 1206
 				$this->runLength[0] = 1;
1207
-				for ($y=0; $y<$width; ++$y) {
1207
+				for ($y = 0; $y < $width; ++$y) {
1208 1208
 					if (($y == 0) AND (ord($frame[$y][$x]) & 1)) {
1209 1209
 						$this->runLength[0] = -1;
1210 1210
 						$head = 1;
1211 1211
 						$this->runLength[$head] = 1;
1212 1212
 					} elseif ($y > 0) {
1213
-						if ((ord($frame[$y][$x]) ^ ord($frame[$y-1][$x])) & 1) {
1213
+						if ((ord($frame[$y][$x]) ^ ord($frame[$y - 1][$x])) & 1) {
1214 1214
 							$head++;
1215 1215
 							$this->runLength[$head] = 1;
1216 1216
 						} else {
@@ -1218,7 +1218,7 @@  discard block
 block discarded – undo
1218 1218
 						}
1219 1219
 					}
1220 1220
 				}
1221
-				$demerit += $this->calcN1N3($head+1);
1221
+				$demerit += $this->calcN1N3($head + 1);
1222 1222
 			}
1223 1223
 			return $demerit;
1224 1224
 		}
@@ -1237,8 +1237,8 @@  discard block
 block discarded – undo
1237 1237
 			$checked_masks = array(0, 1, 2, 3, 4, 5, 6, 7);
1238 1238
 			if (QR_FIND_FROM_RANDOM !== false) {
1239 1239
 				$howManuOut = 8 - (QR_FIND_FROM_RANDOM % 9);
1240
-				for ($i = 0; $i <  $howManuOut; ++$i) {
1241
-					$remPos = rand (0, count($checked_masks)-1);
1240
+				for ($i = 0; $i < $howManuOut; ++$i) {
1241
+					$remPos = rand(0, count($checked_masks) - 1);
1242 1242
 					unset($checked_masks[$remPos]);
1243 1243
 					$checked_masks = array_values($checked_masks);
1244 1244
 				}
@@ -1276,7 +1276,7 @@  discard block
 block discarded – undo
1276 1276
 			if ($pos >= strlen($str)) {
1277 1277
 				return false;
1278 1278
 			}
1279
-			return ((ord($str[$pos]) >= ord('0'))&&(ord($str[$pos]) <= ord('9')));
1279
+			return ((ord($str[$pos]) >= ord('0')) && (ord($str[$pos]) <= ord('9')));
1280 1280
 		}
1281 1281
 
1282 1282
 		/**
@@ -1307,8 +1307,8 @@  discard block
 block discarded – undo
1307 1307
 			} elseif ($this->isalnumat($this->dataStr, $pos)) {
1308 1308
 				return QR_MODE_AN;
1309 1309
 			} elseif ($this->hint == QR_MODE_KJ) {
1310
-				if ($pos+1 < strlen($this->dataStr)) {
1311
-					$d = $this->dataStr[$pos+1];
1310
+				if ($pos + 1 < strlen($this->dataStr)) {
1311
+					$d = $this->dataStr[$pos + 1];
1312 1312
 					$word = (ord($c) << 8) | ord($d);
1313 1313
 					if (($word >= 0x8140 && $word <= 0x9ffc) OR ($word >= 0xe040 && $word <= 0xebbf)) {
1314 1314
 						return QR_MODE_KJ;
@@ -1325,7 +1325,7 @@  discard block
 block discarded – undo
1325 1325
 		 protected function eatNum() {
1326 1326
 			$ln = $this->lengthIndicator(QR_MODE_NM, $this->version);
1327 1327
 			$p = 0;
1328
-			while($this->isdigitat($this->dataStr, $p)) {
1328
+			while ($this->isdigitat($this->dataStr, $p)) {
1329 1329
 				$p++;
1330 1330
 			}
1331 1331
 			$run = $p;
@@ -1341,7 +1341,7 @@  discard block
 block discarded – undo
1341 1341
 			if ($mode == QR_MODE_AN) {
1342 1342
 				$dif = $this->estimateBitsModeNum($run) + 4 + $ln
1343 1343
 				+ $this->estimateBitsModeAn(1)        // + 4 + la
1344
-				- $this->estimateBitsModeAn($run + 1);// - 4 - la
1344
+				- $this->estimateBitsModeAn($run + 1); // - 4 - la
1345 1345
 				if ($dif > 0) {
1346 1346
 					return $this->eatAn();
1347 1347
 				}
@@ -1355,13 +1355,13 @@  discard block
 block discarded – undo
1355 1355
 		 * @return int run
1356 1356
 		 */
1357 1357
 		 protected function eatAn() {
1358
-			$la = $this->lengthIndicator(QR_MODE_AN,  $this->version);
1358
+			$la = $this->lengthIndicator(QR_MODE_AN, $this->version);
1359 1359
 			$ln = $this->lengthIndicator(QR_MODE_NM, $this->version);
1360 1360
 			$p = 0;
1361
-			while($this->isalnumat($this->dataStr, $p)) {
1361
+			while ($this->isalnumat($this->dataStr, $p)) {
1362 1362
 				if ($this->isdigitat($this->dataStr, $p)) {
1363 1363
 					$q = $p;
1364
-					while($this->isdigitat($this->dataStr, $q)) {
1364
+					while ($this->isdigitat($this->dataStr, $q)) {
1365 1365
 						$q++;
1366 1366
 					}
1367 1367
 					$dif = $this->estimateBitsModeAn($p) // + 4 + la
@@ -1395,7 +1395,7 @@  discard block
 block discarded – undo
1395 1395
 		 */
1396 1396
 		 protected function eatKanji() {
1397 1397
 			$p = 0;
1398
-			while($this->identifyMode($p) == QR_MODE_KJ) {
1398
+			while ($this->identifyMode($p) == QR_MODE_KJ) {
1399 1399
 				$p += 2;
1400 1400
 			}
1401 1401
 			$this->items = $this->appendNewInputItem($this->items, QR_MODE_KJ, $p, str_split($this->dataStr));
@@ -1411,14 +1411,14 @@  discard block
 block discarded – undo
1411 1411
 			$ln = $this->lengthIndicator(QR_MODE_NM, $this->version);
1412 1412
 			$p = 1;
1413 1413
 			$dataStrLen = strlen($this->dataStr);
1414
-			while($p < $dataStrLen) {
1414
+			while ($p < $dataStrLen) {
1415 1415
 				$mode = $this->identifyMode($p);
1416 1416
 				if ($mode == QR_MODE_KJ) {
1417 1417
 					break;
1418 1418
 				}
1419 1419
 				if ($mode == QR_MODE_NM) {
1420 1420
 					$q = $p;
1421
-					while($this->isdigitat($this->dataStr, $q)) {
1421
+					while ($this->isdigitat($this->dataStr, $q)) {
1422 1422
 						$q++;
1423 1423
 					}
1424 1424
 					$dif = $this->estimateBitsMode8($p) // + 4 + l8
@@ -1431,7 +1431,7 @@  discard block
 block discarded – undo
1431 1431
 					}
1432 1432
 				} elseif ($mode == QR_MODE_AN) {
1433 1433
 					$q = $p;
1434
-					while($this->isalnumat($this->dataStr, $q)) {
1434
+					while ($this->isalnumat($this->dataStr, $q)) {
1435 1435
 						$q++;
1436 1436
 					}
1437 1437
 					$dif = $this->estimateBitsMode8($p)  // + 4 + l8
@@ -1524,7 +1524,7 @@  discard block
 block discarded – undo
1524 1524
 		 * @param array $bstream
1525 1525
 		 * @return array input item
1526 1526
 		 */
1527
-		 protected function newInputItem($mode, $size, $data, $bstream=null) {
1527
+		 protected function newInputItem($mode, $size, $data, $bstream = null) {
1528 1528
 			$setData = array_slice($data, 0, $size);
1529 1529
 			if (count($setData) < $size) {
1530 1530
 				$setData = array_merge($setData, array_fill(0, ($size - count($setData)), 0));
@@ -1552,18 +1552,18 @@  discard block
 block discarded – undo
1552 1552
 			$val = 0x1;
1553 1553
 			$inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, $val);
1554 1554
 			$inputitem['bstream'] = $this->appendNum($inputitem['bstream'], $this->lengthIndicator(QR_MODE_NM, $version), $inputitem['size']);
1555
-			for ($i=0; $i < $words; ++$i) {
1556
-				$val  = (ord($inputitem['data'][$i*3  ]) - ord('0')) * 100;
1557
-				$val += (ord($inputitem['data'][$i*3+1]) - ord('0')) * 10;
1558
-				$val += (ord($inputitem['data'][$i*3+2]) - ord('0'));
1555
+			for ($i = 0; $i < $words; ++$i) {
1556
+				$val  = (ord($inputitem['data'][$i * 3]) - ord('0')) * 100;
1557
+				$val += (ord($inputitem['data'][$i * 3 + 1]) - ord('0')) * 10;
1558
+				$val += (ord($inputitem['data'][$i * 3 + 2]) - ord('0'));
1559 1559
 				$inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 10, $val);
1560 1560
 			}
1561 1561
 			if ($inputitem['size'] - $words * 3 == 1) {
1562
-				$val = ord($inputitem['data'][$words*3]) - ord('0');
1562
+				$val = ord($inputitem['data'][$words * 3]) - ord('0');
1563 1563
 				$inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, $val);
1564 1564
 			} elseif (($inputitem['size'] - ($words * 3)) == 2) {
1565
-				$val  = (ord($inputitem['data'][$words*3  ]) - ord('0')) * 10;
1566
-				$val += (ord($inputitem['data'][$words*3+1]) - ord('0'));
1565
+				$val  = (ord($inputitem['data'][$words * 3]) - ord('0')) * 10;
1566
+				$val += (ord($inputitem['data'][$words * 3 + 1]) - ord('0'));
1567 1567
 				$inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 7, $val);
1568 1568
 			}
1569 1569
 			return $inputitem;
@@ -1580,9 +1580,9 @@  discard block
 block discarded – undo
1580 1580
 			$inputitem['bstream'] = array();
1581 1581
 			$inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x02);
1582 1582
 			$inputitem['bstream'] = $this->appendNum($inputitem['bstream'], $this->lengthIndicator(QR_MODE_AN, $version), $inputitem['size']); //DEBUG
1583
-			for ($i=0; $i < $words; ++$i) {
1584
-				$val  = (int)$this->lookAnTable(ord($inputitem['data'][$i*2  ])) * 45;
1585
-				$val += (int)$this->lookAnTable(ord($inputitem['data'][$i*2+1]));
1583
+			for ($i = 0; $i < $words; ++$i) {
1584
+				$val  = (int)$this->lookAnTable(ord($inputitem['data'][$i * 2])) * 45;
1585
+				$val += (int)$this->lookAnTable(ord($inputitem['data'][$i * 2 + 1]));
1586 1586
 				$inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 11, $val);
1587 1587
 			}
1588 1588
 			if ($inputitem['size'] & 1) {
@@ -1602,7 +1602,7 @@  discard block
 block discarded – undo
1602 1602
 			$inputitem['bstream'] = array();
1603 1603
 			$inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x4);
1604 1604
 			$inputitem['bstream'] = $this->appendNum($inputitem['bstream'], $this->lengthIndicator(QR_MODE_8B, $version), $inputitem['size']);
1605
-			for ($i=0; $i < $inputitem['size']; ++$i) {
1605
+			for ($i = 0; $i < $inputitem['size']; ++$i) {
1606 1606
 				$inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 8, ord($inputitem['data'][$i]));
1607 1607
 			}
1608 1608
 			return $inputitem;
@@ -1618,8 +1618,8 @@  discard block
 block discarded – undo
1618 1618
 			$inputitem['bstream'] = array();
1619 1619
 			$inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x8);
1620 1620
 			$inputitem['bstream'] = $this->appendNum($inputitem['bstream'], $this->lengthIndicator(QR_MODE_KJ, $version), (int)($inputitem['size'] / 2));
1621
-			for ($i=0; $i<$inputitem['size']; $i+=2) {
1622
-				$val = (ord($inputitem['data'][$i]) << 8) | ord($inputitem['data'][$i+1]);
1621
+			for ($i = 0; $i < $inputitem['size']; $i += 2) {
1622
+				$val = (ord($inputitem['data'][$i]) << 8) | ord($inputitem['data'][$i + 1]);
1623 1623
 				if ($val <= 0x9ffc) {
1624 1624
 					$val -= 0x8140;
1625 1625
 				} else {
@@ -1664,7 +1664,7 @@  discard block
 block discarded – undo
1664 1664
 				$inputitem['bstream'] = $this->appendBitstream($inputitem['bstream'], $st1['bstream']);
1665 1665
 				$inputitem['bstream'] = $this->appendBitstream($inputitem['bstream'], $st2['bstream']);
1666 1666
 			} else {
1667
-				switch($inputitem['mode']) {
1667
+				switch ($inputitem['mode']) {
1668 1668
 					case QR_MODE_NM: {
1669 1669
 						$inputitem = $this->encodeModeNum($inputitem, $version);
1670 1670
 						break;
@@ -1742,7 +1742,7 @@  discard block
 block discarded – undo
1742 1742
 			$parity = 0;
1743 1743
 			foreach ($items as $item) {
1744 1744
 				if ($item['mode'] != QR_MODE_ST) {
1745
-					for ($i=$item['size']-1; $i>=0; --$i) {
1745
+					for ($i = $item['size'] - 1; $i >= 0; --$i) {
1746 1746
 						$parity ^= $item['data'][$i];
1747 1747
 					}
1748 1748
 				}
@@ -1757,8 +1757,8 @@  discard block
 block discarded – undo
1757 1757
 		 * @return boolean true or false
1758 1758
 		 */
1759 1759
 		 protected function checkModeNum($size, $data) {
1760
-			for ($i=0; $i<$size; ++$i) {
1761
-				if ((ord($data[$i]) < ord('0')) OR (ord($data[$i]) > ord('9'))){
1760
+			for ($i = 0; $i < $size; ++$i) {
1761
+				if ((ord($data[$i]) < ord('0')) OR (ord($data[$i]) > ord('9'))) {
1762 1762
 					return false;
1763 1763
 				}
1764 1764
 			}
@@ -1773,7 +1773,7 @@  discard block
 block discarded – undo
1773 1773
 		 protected function estimateBitsModeNum($size) {
1774 1774
 			$w = (int)$size / 3;
1775 1775
 			$bits = $w * 10;
1776
-			switch($size - $w * 3) {
1776
+			switch ($size - $w * 3) {
1777 1777
 				case 1: {
1778 1778
 					$bits += 4;
1779 1779
 					break;
@@ -1795,7 +1795,7 @@  discard block
 block discarded – undo
1795 1795
 		 * @return value
1796 1796
 		 */
1797 1797
 		protected function lookAnTable($c) {
1798
-			return (($c > 127)?-1:$this->anTable[$c]);
1798
+			return (($c > 127) ?-1 : $this->anTable[$c]);
1799 1799
 		}
1800 1800
 
1801 1801
 		/**
@@ -1805,7 +1805,7 @@  discard block
 block discarded – undo
1805 1805
 		 * @return boolean true or false
1806 1806
 		 */
1807 1807
 		 protected function checkModeAn($size, $data) {
1808
-			for ($i=0; $i<$size; ++$i) {
1808
+			for ($i = 0; $i < $size; ++$i) {
1809 1809
 				if ($this->lookAnTable(ord($data[$i])) == -1) {
1810 1810
 					return false;
1811 1811
 				}
@@ -1855,8 +1855,8 @@  discard block
 block discarded – undo
1855 1855
 			if ($size & 1) {
1856 1856
 				return false;
1857 1857
 			}
1858
-			for ($i=0; $i<$size; $i+=2) {
1859
-				$val = (ord($data[$i]) << 8) | ord($data[$i+1]);
1858
+			for ($i = 0; $i < $size; $i += 2) {
1859
+				$val = (ord($data[$i]) << 8) | ord($data[$i + 1]);
1860 1860
 				if (($val < 0x8140) OR (($val > 0x9ffc) AND ($val < 0xe040)) OR ($val > 0xebbf)) {
1861 1861
 					return false;
1862 1862
 				}
@@ -1875,7 +1875,7 @@  discard block
 block discarded – undo
1875 1875
 			if ($size <= 0) {
1876 1876
 				return false;
1877 1877
 			}
1878
-			switch($mode) {
1878
+			switch ($mode) {
1879 1879
 				case QR_MODE_NM: {
1880 1880
 					return $this->checkModeNum($size, $data);
1881 1881
 				}
@@ -1910,7 +1910,7 @@  discard block
 block discarded – undo
1910 1910
 				$version = 1;
1911 1911
 			}
1912 1912
 			foreach ($items as $item) {
1913
-				switch($item['mode']) {
1913
+				switch ($item['mode']) {
1914 1914
 					case QR_MODE_NM: {
1915 1915
 						$bits = $this->estimateBitsModeNum($item['size']);
1916 1916
 						break;
@@ -1970,7 +1970,7 @@  discard block
 block discarded – undo
1970 1970
 		 */
1971 1971
 		 protected function lengthOfCode($mode, $version, $bits) {
1972 1972
 			$payload = $bits - 4 - $this->lengthIndicator($mode, $version);
1973
-			switch($mode) {
1973
+			switch ($mode) {
1974 1974
 				case QR_MODE_NM: {
1975 1975
 					$chunks = (int)($payload / 10);
1976 1976
 					$remain = $payload - $chunks * 10;
@@ -2084,8 +2084,8 @@  discard block
 block discarded – undo
2084 2084
 			$padlen = $maxwords - $words;
2085 2085
 			if ($padlen > 0) {
2086 2086
 				$padbuf = array();
2087
-				for ($i=0; $i<$padlen; ++$i) {
2088
-					$padbuf[$i] = ($i&1)?0x11:0xec;
2087
+				for ($i = 0; $i < $padlen; ++$i) {
2088
+					$padbuf[$i] = ($i & 1) ? 0x11 : 0xec;
2089 2089
 				}
2090 2090
 				$padding = $this->appendBytes($padding, $padlen, $padbuf);
2091 2091
 			}
@@ -2148,7 +2148,7 @@  discard block
 block discarded – undo
2148 2148
 		 protected function newFromNum($bits, $num) {
2149 2149
 			$bstream = $this->allocate($bits);
2150 2150
 			$mask = 1 << ($bits - 1);
2151
-			for ($i=0; $i<$bits; ++$i) {
2151
+			for ($i = 0; $i < $bits; ++$i) {
2152 2152
 				if ($num & $mask) {
2153 2153
 					$bstream[$i] = 1;
2154 2154
 				} else {
@@ -2167,10 +2167,10 @@  discard block
 block discarded – undo
2167 2167
 		 */
2168 2168
 		 protected function newFromBytes($size, $data) {
2169 2169
 			$bstream = $this->allocate($size * 8);
2170
-			$p=0;
2171
-			for ($i=0; $i<$size; ++$i) {
2170
+			$p = 0;
2171
+			for ($i = 0; $i < $size; ++$i) {
2172 2172
 				$mask = 0x80;
2173
-				for ($j=0; $j<8; ++$j) {
2173
+				for ($j = 0; $j < 8; ++$j) {
2174 2174
 					if ($data[$i] & $mask) {
2175 2175
 						$bstream[$p] = 1;
2176 2176
 					} else {
@@ -2242,9 +2242,9 @@  discard block
 block discarded – undo
2242 2242
 			$data = array_fill(0, (int)(($size + 7) / 8), 0);
2243 2243
 			$bytes = (int)($size / 8);
2244 2244
 			$p = 0;
2245
-			for ($i=0; $i<$bytes; $i++) {
2245
+			for ($i = 0; $i < $bytes; $i++) {
2246 2246
 				$v = 0;
2247
-				for ($j=0; $j<8; $j++) {
2247
+				for ($j = 0; $j < 8; $j++) {
2248 2248
 					$v = $v << 1;
2249 2249
 					$v |= $bstream[$p];
2250 2250
 					$p++;
@@ -2253,7 +2253,7 @@  discard block
 block discarded – undo
2253 2253
 			}
2254 2254
 			if ($size & 7) {
2255 2255
 				$v = 0;
2256
-				for ($j=0; $j<($size & 7); $j++) {
2256
+				for ($j = 0; $j < ($size & 7); $j++) {
2257 2257
 					$v = $v << 1;
2258 2258
 					$v |= $bstream[$p];
2259 2259
 					$p++;
@@ -2276,8 +2276,8 @@  discard block
 block discarded – undo
2276 2276
 		 * @param int $replLen length of the repl string
2277 2277
 		 * @return array srctab
2278 2278
 		 */
2279
-		 protected function qrstrset($srctab, $x, $y, $repl, $replLen=false) {
2280
-			$srctab[$y] = substr_replace($srctab[$y], ($replLen !== false)?substr($repl,0,$replLen):$repl, $x, ($replLen !== false)?$replLen:strlen($repl));
2279
+		 protected function qrstrset($srctab, $x, $y, $repl, $replLen = false) {
2280
+			$srctab[$y] = substr_replace($srctab[$y], ($replLen !== false) ? substr($repl, 0, $replLen) : $repl, $x, ($replLen !== false) ? $replLen : strlen($repl));
2281 2281
 			return $srctab;
2282 2282
 		}
2283 2283
 
@@ -2297,7 +2297,7 @@  discard block
 block discarded – undo
2297 2297
 		 * @param int $level error correction level
2298 2298
 		 * @return int ECC size (bytes)
2299 2299
 		 */
2300
-		protected function getECCLength($version, $level){
2300
+		protected function getECCLength($version, $level) {
2301 2301
 			return $this->capacity[$version][QRCAP_EC][$level];
2302 2302
 		}
2303 2303
 
@@ -2326,8 +2326,8 @@  discard block
 block discarded – undo
2326 2326
 		 * @return int version number
2327 2327
 		 */
2328 2328
 		protected function getMinimumVersion($size, $level) {
2329
-			for ($i=1; $i <= QRSPEC_VERSION_MAX; ++$i) {
2330
-				$words  = $this->capacity[$i][QRCAP_WORDS] - $this->capacity[$i][QRCAP_EC][$level];
2329
+			for ($i = 1; $i <= QRSPEC_VERSION_MAX; ++$i) {
2330
+				$words = $this->capacity[$i][QRCAP_WORDS] - $this->capacity[$i][QRCAP_EC][$level];
2331 2331
 				if ($words >= $size) {
2332 2332
 					return $i;
2333 2333
 				}
@@ -2404,7 +2404,7 @@  discard block
 block discarded – undo
2404 2404
 			} else {
2405 2405
 				$spec[0] = $b1;
2406 2406
 				$spec[1] = (int)($data / ($b1 + $b2));
2407
-				$spec[2] = (int)($ecc  / ($b1 + $b2));
2407
+				$spec[2] = (int)($ecc / ($b1 + $b2));
2408 2408
 				$spec[3] = $b2;
2409 2409
 				$spec[4] = $spec[1] + 1;
2410 2410
 			}
@@ -2429,8 +2429,8 @@  discard block
 block discarded – undo
2429 2429
 				);
2430 2430
 			$yStart = $oy - 2;
2431 2431
 			$xStart = $ox - 2;
2432
-			for ($y=0; $y < 5; $y++) {
2433
-				$frame = $this->qrstrset($frame, $xStart, $yStart+$y, $finder[$y]);
2432
+			for ($y = 0; $y < 5; $y++) {
2433
+				$frame = $this->qrstrset($frame, $xStart, $yStart + $y, $finder[$y]);
2434 2434
 			}
2435 2435
 			return $frame;
2436 2436
 		}
@@ -2460,15 +2460,15 @@  discard block
 block discarded – undo
2460 2460
 			}
2461 2461
 			$cx = $this->alignmentPattern[$version][0];
2462 2462
 			$wo = $w - 1;
2463
-			for ($x=1; $x < $wo; ++$x) {
2463
+			for ($x = 1; $x < $wo; ++$x) {
2464 2464
 				$frame = $this->putAlignmentMarker($frame, 6, $cx);
2465
-				$frame = $this->putAlignmentMarker($frame, $cx,  6);
2465
+				$frame = $this->putAlignmentMarker($frame, $cx, 6);
2466 2466
 				$cx += $d;
2467 2467
 			}
2468 2468
 			$cy = $this->alignmentPattern[$version][0];
2469
-			for ($y=0; $y < $wo; ++$y) {
2469
+			for ($y = 0; $y < $wo; ++$y) {
2470 2470
 				$cx = $this->alignmentPattern[$version][0];
2471
-				for ($x=0; $x < $wo; ++$x) {
2471
+				for ($x = 0; $x < $wo; ++$x) {
2472 2472
 					$frame = $this->putAlignmentMarker($frame, $cx, $cy);
2473 2473
 					$cx += $d;
2474 2474
 				}
@@ -2523,7 +2523,7 @@  discard block
 block discarded – undo
2523 2523
 			"\xc1\xc0\xc0\xc0\xc0\xc0\xc1",
2524 2524
 			"\xc1\xc1\xc1\xc1\xc1\xc1\xc1"
2525 2525
 			);
2526
-			for ($y=0; $y < 7; $y++) {
2526
+			for ($y = 0; $y < 7; $y++) {
2527 2527
 				$frame = $this->qrstrset($frame, $ox, ($oy + $y), $finder[$y]);
2528 2528
 			}
2529 2529
 			return $frame;
@@ -2536,7 +2536,7 @@  discard block
 block discarded – undo
2536 2536
 		 */
2537 2537
 		protected function createFrame($version) {
2538 2538
 			$width = $this->capacity[$version][QRCAP_WIDTH];
2539
-			$frameLine = str_repeat ("\0", $width);
2539
+			$frameLine = str_repeat("\0", $width);
2540 2540
 			$frame = array_fill(0, $width, $frameLine);
2541 2541
 			// Finder pattern
2542 2542
 			$frame = $this->putFinderPattern($frame, 0, 0);
@@ -2544,7 +2544,7 @@  discard block
 block discarded – undo
2544 2544
 			$frame = $this->putFinderPattern($frame, 0, $width - 7);
2545 2545
 			// Separator
2546 2546
 			$yOffset = $width - 7;
2547
-			for ($y=0; $y < 7; ++$y) {
2547
+			for ($y = 0; $y < 7; ++$y) {
2548 2548
 				$frame[$y][7] = "\xc0";
2549 2549
 				$frame[$y][$width - 8] = "\xc0";
2550 2550
 				$frame[$yOffset][7] = "\xc0";
@@ -2552,22 +2552,22 @@  discard block
 block discarded – undo
2552 2552
 			}
2553 2553
 			$setPattern = str_repeat("\xc0", 8);
2554 2554
 			$frame = $this->qrstrset($frame, 0, 7, $setPattern);
2555
-			$frame = $this->qrstrset($frame, $width-8, 7, $setPattern);
2555
+			$frame = $this->qrstrset($frame, $width - 8, 7, $setPattern);
2556 2556
 			$frame = $this->qrstrset($frame, 0, $width - 8, $setPattern);
2557 2557
 			// Format info
2558 2558
 			$setPattern = str_repeat("\x84", 9);
2559 2559
 			$frame = $this->qrstrset($frame, 0, 8, $setPattern);
2560 2560
 			$frame = $this->qrstrset($frame, $width - 8, 8, $setPattern, 8);
2561 2561
 			$yOffset = $width - 8;
2562
-			for ($y=0; $y < 8; ++$y,++$yOffset) {
2562
+			for ($y = 0; $y < 8; ++$y, ++$yOffset) {
2563 2563
 				$frame[$y][8] = "\x84";
2564 2564
 				$frame[$yOffset][8] = "\x84";
2565 2565
 			}
2566 2566
 			// Timing pattern
2567 2567
 			$wo = $width - 15;
2568
-			for ($i=1; $i < $wo; ++$i) {
2569
-				$frame[6][7+$i] = chr(0x90 | ($i & 1));
2570
-				$frame[7+$i][6] = chr(0x90 | ($i & 1));
2568
+			for ($i = 1; $i < $wo; ++$i) {
2569
+				$frame[6][7 + $i] = chr(0x90 | ($i & 1));
2570
+				$frame[7 + $i][6] = chr(0x90 | ($i & 1));
2571 2571
 			}
2572 2572
 			// Alignment pattern
2573 2573
 			$frame = $this->putAlignmentPattern($version, $frame, $width);
@@ -2575,16 +2575,16 @@  discard block
 block discarded – undo
2575 2575
 			if ($version >= 7) {
2576 2576
 				$vinf = $this->getVersionPattern($version);
2577 2577
 				$v = $vinf;
2578
-				for ($x=0; $x<6; ++$x) {
2579
-					for ($y=0; $y<3; ++$y) {
2580
-						$frame[($width - 11)+$y][$x] = chr(0x88 | ($v & 1));
2578
+				for ($x = 0; $x < 6; ++$x) {
2579
+					for ($y = 0; $y < 3; ++$y) {
2580
+						$frame[($width - 11) + $y][$x] = chr(0x88 | ($v & 1));
2581 2581
 						$v = $v >> 1;
2582 2582
 					}
2583 2583
 				}
2584 2584
 				$v = $vinf;
2585
-				for ($y=0; $y<6; ++$y) {
2586
-					for ($x=0; $x<3; ++$x) {
2587
-						$frame[$y][$x+($width - 11)] = chr(0x88 | ($v & 1));
2585
+				for ($y = 0; $y < 6; ++$y) {
2586
+					for ($x = 0; $x < 3; ++$x) {
2587
+						$frame[$y][$x + ($width - 11)] = chr(0x88 | ($v & 1));
2588 2588
 						$v = $v >> 1;
2589 2589
 					}
2590 2590
 				}
@@ -2755,16 +2755,16 @@  discard block
 block discarded – undo
2755 2755
 			if (($symsize < 0) OR ($symsize > 8)) {
2756 2756
 				return $rs;
2757 2757
 			}
2758
-			if (($fcr < 0) OR ($fcr >= (1<<$symsize))) {
2758
+			if (($fcr < 0) OR ($fcr >= (1 << $symsize))) {
2759 2759
 				return $rs;
2760 2760
 			}
2761
-			if (($prim <= 0) OR ($prim >= (1<<$symsize))) {
2761
+			if (($prim <= 0) OR ($prim >= (1 << $symsize))) {
2762 2762
 				return $rs;
2763 2763
 			}
2764
-			if (($nroots < 0) OR ($nroots >= (1<<$symsize))) {
2764
+			if (($nroots < 0) OR ($nroots >= (1 << $symsize))) {
2765 2765
 				return $rs;
2766 2766
 			}
2767
-			if (($pad < 0) OR ($pad >= ((1<<$symsize) -1 - $nroots))) {
2767
+			if (($pad < 0) OR ($pad >= ((1 << $symsize) - 1 - $nroots))) {
2768 2768
 				return $rs;
2769 2769
 			}
2770 2770
 			$rs = array();
@@ -2774,13 +2774,13 @@  discard block
 block discarded – undo
2774 2774
 			$rs['alpha_to'] = array_fill(0, ($rs['nn'] + 1), 0);
2775 2775
 			$rs['index_of'] = array_fill(0, ($rs['nn'] + 1), 0);
2776 2776
 			// PHP style macro replacement ;)
2777
-			$NN =& $rs['nn'];
2778
-			$A0 =& $NN;
2777
+			$NN = & $rs['nn'];
2778
+			$A0 = & $NN;
2779 2779
 			// Generate Galois field lookup tables
2780 2780
 			$rs['index_of'][0] = $A0; // log(zero) = -inf
2781 2781
 			$rs['alpha_to'][$A0] = 0; // alpha**-inf = 0
2782 2782
 			$sr = 1;
2783
-			for ($i=0; $i<$rs['nn']; ++$i) {
2783
+			for ($i = 0; $i < $rs['nn']; ++$i) {
2784 2784
 				$rs['index_of'][$sr] = $i;
2785 2785
 				$rs['alpha_to'][$i] = $sr;
2786 2786
 				$sr <<= 1;
@@ -2800,21 +2800,21 @@  discard block
 block discarded – undo
2800 2800
 			$rs['nroots'] = $nroots;
2801 2801
 			$rs['gfpoly'] = $gfpoly;
2802 2802
 			// Find prim-th root of 1, used in decoding
2803
-			for ($iprim=1; ($iprim % $prim) != 0; $iprim += $rs['nn']) {
2803
+			for ($iprim = 1; ($iprim % $prim) != 0; $iprim += $rs['nn']) {
2804 2804
 				; // intentional empty-body loop!
2805 2805
 			}
2806 2806
 			$rs['iprim'] = (int)($iprim / $prim);
2807 2807
 			$rs['genpoly'][0] = 1;
2808 2808
 
2809 2809
 
2810
-			for ($i = 0,$root=$fcr*$prim; $i < $nroots; $i++, $root += $prim) {
2811
-				$rs['genpoly'][$i+1] = 1;
2810
+			for ($i = 0, $root = $fcr * $prim; $i < $nroots; $i++, $root += $prim) {
2811
+				$rs['genpoly'][$i + 1] = 1;
2812 2812
 				// Multiply rs->genpoly[] by  @**(root + x)
2813 2813
 				for ($j = $i; $j > 0; --$j) {
2814 2814
 					if ($rs['genpoly'][$j] != 0) {
2815
-						$rs['genpoly'][$j] = $rs['genpoly'][$j-1] ^ $rs['alpha_to'][$this->modnn($rs, $rs['index_of'][$rs['genpoly'][$j]] + $root)];
2815
+						$rs['genpoly'][$j] = $rs['genpoly'][$j - 1] ^ $rs['alpha_to'][$this->modnn($rs, $rs['index_of'][$rs['genpoly'][$j]] + $root)];
2816 2816
 					} else {
2817
-						$rs['genpoly'][$j] = $rs['genpoly'][$j-1];
2817
+						$rs['genpoly'][$j] = $rs['genpoly'][$j - 1];
2818 2818
 					}
2819 2819
 				}
2820 2820
 				// rs->genpoly[0] can never be zero
@@ -2835,26 +2835,26 @@  discard block
 block discarded – undo
2835 2835
 		 * @return parity array
2836 2836
 		 */
2837 2837
 		 protected function encode_rs_char($rs, $data, $parity) {
2838
-			$MM       =& $rs['mm']; // bits per symbol
2839
-			$NN       =& $rs['nn']; // the total number of symbols in a RS block
2840
-			$ALPHA_TO =& $rs['alpha_to']; // the address of an array of NN elements to convert Galois field elements in index (log) form to polynomial form
2841
-			$INDEX_OF =& $rs['index_of']; // the address of an array of NN elements to convert Galois field elements in polynomial form to index (log) form
2842
-			$GENPOLY  =& $rs['genpoly']; // an array of NROOTS+1 elements containing the generator polynomial in index form
2843
-			$NROOTS   =& $rs['nroots']; // the number of roots in the RS code generator polynomial, which is the same as the number of parity symbols in a block
2844
-			$FCR      =& $rs['fcr']; // first consecutive root, index form
2845
-			$PRIM     =& $rs['prim']; // primitive element, index form
2846
-			$IPRIM    =& $rs['iprim']; // prim-th root of 1, index form
2847
-			$PAD      =& $rs['pad']; // the number of pad symbols in a block
2848
-			$A0       =& $NN;
2838
+			$MM       = & $rs['mm']; // bits per symbol
2839
+			$NN       = & $rs['nn']; // the total number of symbols in a RS block
2840
+			$ALPHA_TO = & $rs['alpha_to']; // the address of an array of NN elements to convert Galois field elements in index (log) form to polynomial form
2841
+			$INDEX_OF = & $rs['index_of']; // the address of an array of NN elements to convert Galois field elements in polynomial form to index (log) form
2842
+			$GENPOLY  = & $rs['genpoly']; // an array of NROOTS+1 elements containing the generator polynomial in index form
2843
+			$NROOTS   = & $rs['nroots']; // the number of roots in the RS code generator polynomial, which is the same as the number of parity symbols in a block
2844
+			$FCR      = & $rs['fcr']; // first consecutive root, index form
2845
+			$PRIM     = & $rs['prim']; // primitive element, index form
2846
+			$IPRIM    = & $rs['iprim']; // prim-th root of 1, index form
2847
+			$PAD      = & $rs['pad']; // the number of pad symbols in a block
2848
+			$A0       = & $NN;
2849 2849
 			$parity = array_fill(0, $NROOTS, 0);
2850
-			for ($i=0; $i < ($NN - $NROOTS - $PAD); $i++) {
2850
+			for ($i = 0; $i < ($NN - $NROOTS - $PAD); $i++) {
2851 2851
 				$feedback = $INDEX_OF[$data[$i] ^ $parity[0]];
2852 2852
 				if ($feedback != $A0) {
2853 2853
 					// feedback term is non-zero
2854 2854
 					// This line is unnecessary when GENPOLY[NROOTS] is unity, as it must
2855 2855
 					// always be for the polynomials constructed by init_rs()
2856 2856
 					$feedback = $this->modnn($rs, $NN - $GENPOLY[$NROOTS] + $feedback);
2857
-					for ($j=1; $j < $NROOTS; ++$j) {
2857
+					for ($j = 1; $j < $NROOTS; ++$j) {
2858 2858
 					$parity[$j] ^= $ALPHA_TO[$this->modnn($rs, $feedback + $GENPOLY[($NROOTS - $j)])];
2859 2859
 					}
2860 2860
 				}
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 //============================================================+
3 5
 // File name   : qrcode.php
4 6
 // Begin       : 2010-03-22
Please login to merge, or discard this patch.
includes/librairies/HTML2PDF/_class/myPdf.class.php 3 patches
Indentation   +1398 added lines, -1398 removed lines patch added patch discarded remove patch
@@ -14,1402 +14,1402 @@
 block discarded – undo
14 14
 
15 15
 class HTML2PDF_myPdf extends TCPDF
16 16
 {
17
-    protected $_footerParam = array();
18
-    protected $_transf      = array();
19
-    protected $_myLastPageGroup = null;
20
-    protected $_myLastPageGroupNb = 0;
21
-
22
-    // used to make a radius with bezier : (4/3 * (sqrt(2) - 1))
23
-    const MY_ARC = 0.5522847498;
24
-
25
-    // nb of segment to build a arc with bezier curv
26
-    const ARC_NB_SEGMENT = 8;
27
-
28
-    /**
29
-     * class constructor
30
-     *
31
-     * @param string  $orientation page orientation, same as TCPDF
32
-     * @param string  $unit        User measure unit, same as TCPDF
33
-     * @param mixed   $format      The format used for pages, same as TCPDF
34
-     * @param boolean $unicode     TRUE means that the input text is unicode (default = true)
35
-     * @param String  $encoding    charset encoding; default is UTF-8
36
-     * @param boolean $diskcache   if TRUE reduce the RAM memory usage by caching temporary data on filesystem (slower).
37
-     * @access public
38
-     */
39
-    public function __construct(
40
-        $orientation='P',
41
-        $unit='mm',
42
-        $format='A4',
43
-        $unicode=true,
44
-        $encoding='UTF-8',
45
-        $diskcache=false)
46
-    {
47
-        // call the parent constructor
48
-        parent::__construct($orientation, $unit, $format, $unicode, $encoding, $diskcache);
49
-
50
-        // init the specific parameters used by HTML2PDF
51
-        $this->SetCreator(PDF_CREATOR);
52
-        $this->SetAutoPageBreak(false, 0);
53
-        $this->linestyleCap = '2 J';
54
-        $this->setPrintHeader(false);
55
-        $this->jpeg_quality = 90;
56
-
57
-        // prepare the automatic footer
58
-        $this->SetMyFooter();
59
-
60
-        $this->cMargin = 0;
61
-    }
62
-
63
-    /**
64
-     * Set the parameters for the automatic footer
65
-     *
66
-     * @param boolean $page display the page number
67
-     * @param boolean $date display the date
68
-     * @param boolean $hour display the hour
69
-     * @param boolean $form display a warning abour forms
70
-     * @access public
71
-     */
72
-    public function SetMyFooter($page = false, $date = false, $hour = false, $form = false)
73
-    {
74
-        $page    = ($page ? true : false);
75
-        $date    = ($date ? true : false);
76
-        $hour    = ($hour ? true : false);
77
-        $form    = ($form ? true : false);
78
-
79
-        $this->_footerParam = array('page' => $page, 'date' => $date, 'hour' => $hour, 'form' => $form);
80
-    }
81
-
82
-    /**
83
-     * This function is call automatically by TCPDF at the end of a page
84
-     * It takes no parameters
85
-     *
86
-     * @access public
87
-     */
88
-    public function Footer()
89
-    {
90
-        // prepare the text from the tranlated text
91
-        $txt = '';
92
-        if ($this->_footerParam['form']) {
93
-            $txt = (HTML2PDF_locale::get('pdf05'));
94
-        }
95
-        if ($this->_footerParam['date'] && $this->_footerParam['hour']) {
96
-            $txt.= ($txt ? ' - ' : '').(HTML2PDF_locale::get('pdf03'));
97
-        }
98
-        if ($this->_footerParam['date'] && !$this->_footerParam['hour']) {
99
-            $txt.= ($txt ? ' - ' : '').(HTML2PDF_locale::get('pdf01'));
100
-        }
101
-        if (!$this->_footerParam['date'] && $this->_footerParam['hour']) {
102
-            $txt.= ($txt ? ' - ' : '').(HTML2PDF_locale::get('pdf02'));
103
-        }
104
-        if ($this->_footerParam['page']) {
105
-            $txt.= ($txt ? ' - ' : '').(HTML2PDF_locale::get('pdf04'));
106
-        }
107
-
108
-        if (strlen($txt)>0) {
109
-            // replace some values
110
-            $toReplace = array(
111
-                '[[date_d]]'  => date('d'),
112
-                '[[date_m]]'  => date('m'),
113
-                '[[date_y]]'  => date('Y'),
114
-                '[[date_h]]'  => date('H'),
115
-                '[[date_i]]'  => date('i'),
116
-                '[[date_s]]'  => date('s'),
117
-                '[[page_cu]]' => $this->getMyNumPage(),
118
-                '[[page_nb]]' => $this->getMyAliasNbPages(),
119
-            );
120
-            $txt = str_replace(array_keys($toReplace), array_values($toReplace), $txt);
121
-
122
-            // draw the footer
123
-            parent::SetY(-11);
124
-            $this->SetFont('helvetica', 'I', 8);
125
-            $this->Cell(0, 10, $txt, 0, 0, 'R');
126
-        }
127
-    }
128
-
129
-     /**
130
-     * after cloning a object, we does not want to clone all the front informations
131
-     * because it take a lot a time and a lot of memory => we use reference
132
-     *
133
-     * @param &HTML2PDF_myPdf object
134
-     * @access public
135
-     */
136
-    public function cloneFontFrom(&$pdf)
137
-    {
138
-        $this->fonts            = &$pdf->getFonts();
139
-        $this->FontFiles        = &$pdf->getFontFiles();
140
-        $this->diffs            = &$pdf->getDiffs();
141
-        $this->fontlist         = &$pdf->getFontList();
142
-        $this->numfonts         = &$pdf->getNumFonts();
143
-        $this->fontkeys         = &$pdf->getFontKeys();
144
-        $this->font_obj_ids     = &$pdf->getFontObjIds();
145
-        $this->annotation_fonts = &$pdf->getAnnotFonts();
146
-    }
147
-
148
-    /**
149
-     * multiple public accessor for some private attributs
150
-     * used only by cloneFontFrom
151
-     *
152
-     * @return &array
153
-     * @access public
154
-     */
155
-    public function &getFonts()
156
-    {
157
-        return $this->fonts;
158
-    }
159
-    public function &getFontFiles()
160
-    {
161
-        return $this->FontFiles;
162
-    }
163
-    public function &getDiffs()
164
-    {
165
-        return $this->diffs;
166
-    }
167
-    public function &getFontList()
168
-    {
169
-        return $this->fontlist;
170
-    }
171
-    public function &getNumFonts()
172
-    {
173
-        return $this->numfonts;
174
-    }
175
-    public function &getFontKeys()
176
-    {
177
-        return $this->fontkeys;
178
-    }
179
-    public function &getFontObjIds()
180
-    {
181
-        return $this->font_obj_ids;
182
-    }
183
-    public function &getAnnotFonts()
184
-    {
185
-        return $this->annotation_fonts;
186
-    }
187
-
188
-    /**
189
-     * Verify that a Font is already loaded
190
-     *
191
-     * @param string Font Key
192
-     * @return boolean
193
-     * @access public
194
-     */
195
-    public function isLoadedFont($fontKey)
196
-    {
197
-        if (isset($this->fonts[$fontKey])) {
198
-            return true;
199
-        }
200
-
201
-        if (isset($this->CoreFonts[$fontKey])) {
202
-            return true;
203
-        }
204
-
205
-        return false;
206
-    }
207
-
208
-    /**
209
-     * Get the Word Spacing
210
-     *
211
-     * @access public
212
-     * @return float word spacing
213
-     */
214
-    public function getWordSpacing()
215
-    {
216
-        return $this->ws;
217
-    }
218
-
219
-    /**
220
-     * set the Word Spacing
221
-     *
222
-     * @param float word spacing
223
-     * @access public
224
-     */
225
-    public function setWordSpacing($ws=0.)
226
-    {
227
-        $this->ws = $ws;
228
-        $this->_out(sprintf('%.3F Tw', $ws*$this->k));
229
-    }
230
-
231
-    /**
232
-     * start to use a rectangular Cliping Path with radius corners
233
-     *
234
-     * @param float $x (top left corner)
235
-     * @param float $y (top left corner)
236
-     * @param float $w (x+w  = botom rigth corner)
237
-     * @param float $h (y+h = botom rigth corner)
238
-     * @param array $cornerTL radius of the Top Left corner
239
-     * @param array $cornerTR radius of the Top Right corner
240
-     * @param array $cornerBL radius of the Bottom Left corner
241
-     * @param array $cornerBR radius of the Bottom Right corner
242
-     * @access public
243
-     */
244
-    public function clippingPathStart(
245
-        $x = null,
246
-        $y = null,
247
-        $w = null,
248
-        $h = null,
249
-        $cornerTL=null,
250
-        $cornerTR=null,
251
-        $cornerBL=null,
252
-        $cornerBR=null)
253
-    {
254
-        // init the path
255
-        $path = '';
256
-
257
-        // if we have the position and the size of the rectangle, we can proceed
258
-        if ($x!==null && $y!==null && $w!==null && $h!==null) {
259
-            // the positions of the rectangle's corners
260
-            $x1 = $x*$this->k;
261
-            $y1 = ($this->h-$y)*$this->k;
262
-
263
-            $x2 = ($x+$w)*$this->k;
264
-            $y2 = ($this->h-$y)*$this->k;
265
-
266
-            $x3 = ($x+$w)*$this->k;
267
-            $y3 = ($this->h-$y-$h)*$this->k;
268
-
269
-            $x4 = $x*$this->k;
270
-            $y4 = ($this->h-$y-$h)*$this->k;
271
-
272
-            // if we have at least one radius corner, then we proceed to a specific path, else it is just a rectangle
273
-            if ($cornerTL || $cornerTR || $cornerBL || $cornerBR) {
274
-                // prepare the radius values
275
-                if ($cornerTL) {
276
-                    $cornerTL[0] = $cornerTL[0]*$this->k;
277
-                    $cornerTL[1] =-$cornerTL[1]*$this->k;
278
-                }
279
-                if ($cornerTR) {
280
-                    $cornerTR[0] = $cornerTR[0]*$this->k;
281
-                    $cornerTR[1] =-$cornerTR[1]*$this->k;
282
-                }
283
-                if ($cornerBL) {
284
-                    $cornerBL[0] = $cornerBL[0]*$this->k;
285
-                    $cornerBL[1] =-$cornerBL[1]*$this->k;
286
-                }
287
-                if ($cornerBR) {
288
-                    $cornerBR[0] = $cornerBR[0]*$this->k;
289
-                    $cornerBR[1] =-$cornerBR[1]*$this->k;
290
-                }
291
-
292
-                // if TL radius then specific start else (X1,Y1)
293
-                if ($cornerTL) {
294
-                    $path.= sprintf('%.2F %.2F m ', $x1+$cornerTL[0], $y1);
295
-                } else {
296
-                    $path.= sprintf('%.2F %.2F m ', $x1, $y1);
297
-                }
298
-
299
-                // if TR radius then line + arc, else line to (X2,Y2)
300
-                if ($cornerTR) {
301
-                    $xt1 = ($x2-$cornerTR[0])+$cornerTR[0]*self::MY_ARC;
302
-                    $yt1 = ($y2+$cornerTR[1])-$cornerTR[1];
303
-                    $xt2 = ($x2-$cornerTR[0])+$cornerTR[0];
304
-                    $yt2 = ($y2+$cornerTR[1])-$cornerTR[1]*self::MY_ARC;
305
-
306
-                    $path.= sprintf('%.2F %.2F l ', $x2-$cornerTR[0], $y2);
307
-                    $path.= sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c ', $xt1, $yt1, $xt2, $yt2, $x2, $y2+$cornerTR[1]);
308
-                } else {
309
-                    $path.= sprintf('%.2F %.2F l ', $x2, $y2);
310
-                }
311
-
312
-                // if BR radius then line + arc, else line to (X3, Y3)
313
-                if ($cornerBR) {
314
-                    $xt1 = ($x3-$cornerBR[0])+$cornerBR[0];
315
-                    $yt1 = ($y3-$cornerBR[1])+$cornerBR[1]*self::MY_ARC;
316
-                    $xt2 = ($x3-$cornerBR[0])+$cornerBR[0]*self::MY_ARC;
317
-                    $yt2 = ($y3-$cornerBR[1])+$cornerBR[1];
318
-
319
-                    $path.= sprintf('%.2F %.2F l ', $x3, $y3-$cornerBR[1]);
320
-                    $path.= sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c ', $xt1, $yt1, $xt2, $yt2, $x3-$cornerBR[0], $y3);
321
-                } else {
322
-                    $path.= sprintf('%.2F %.2F l ', $x3, $y3);
323
-                }
324
-
325
-                // if BL radius then line + arc, else line to (X4, Y4)
326
-                if ($cornerBL) {
327
-                    $xt1 = ($x4+$cornerBL[0])-$cornerBL[0]*self::MY_ARC;
328
-                    $yt1 = ($y4-$cornerBL[1])+$cornerBL[1];
329
-                    $xt2 = ($x4+$cornerBL[0])-$cornerBL[0];
330
-                    $yt2 = ($y4-$cornerBL[1])+$cornerBL[1]*self::MY_ARC;
331
-
332
-                    $path.= sprintf('%.2F %.2F l ', $x4+$cornerBL[0], $y4);
333
-                    $path.= sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c ', $xt1, $yt1, $xt2, $yt2, $x4, $y4-$cornerBL[1]);
334
-                } else {
335
-                    $path.= sprintf('%.2F %.2F l ', $x4, $y4);
336
-                }
337
-
338
-                // if RL radius then line + arc
339
-                if ($cornerTL) {
340
-                    $xt1 = ($x1+$cornerTL[0])-$cornerTL[0];
341
-                    $yt1 = ($y1+$cornerTL[1])-$cornerTL[1]*self::MY_ARC;
342
-                    $xt2 = ($x1+$cornerTL[0])-$cornerTL[0]*self::MY_ARC;
343
-                    $yt2 = ($y1+$cornerTL[1])-$cornerTL[1];
344
-
345
-                    $path.= sprintf('%.2F %.2F l ', $x1, $y1+$cornerTL[1]);
346
-                    $path.= sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c ', $xt1, $yt1, $xt2, $yt2, $x1+$cornerTL[0], $y1);
347
-                }
348
-            } else {
349
-                $path.= sprintf('%.2F %.2F m ', $x1, $y1);
350
-                $path.= sprintf('%.2F %.2F l ', $x2, $y2);
351
-                $path.= sprintf('%.2F %.2F l ', $x3, $y3);
352
-                $path.= sprintf('%.2F %.2F l ', $x4, $y4);
353
-            }
354
-
355
-            // close the path
356
-            $path.= ' h W n';
357
-        }
358
-
359
-        // using the path as a clipping path
360
-        $this->_out('q '.$path.' ');
361
-    }
362
-
363
-    /**
364
-     * stop to use the Cliping Path
365
-     *
366
-     * @access public
367
-     */
368
-    public function clippingPathStop()
369
-    {
370
-        $this->_out(' Q');
371
-    }
372
-
373
-    /**
374
-     * draw a filled corner of a border with a external and a internal radius
375
-     *         /--------+ ext2
376
-     *        /         |
377
-     *       /  /-------+ int2
378
-     *      /  /
379
-     *      | /
380
-     *      | |
381
-     *      | |
382
-     * ext1 +-+ int1        + cen
383
-     *
384
-     * @param float $ext1X
385
-     * @param float $ext1Y
386
-     * @param float $ext2X
387
-     * @param float $ext2Y
388
-     * @param float $int1X
389
-     * @param float $int1Y
390
-     * @param float $int2X
391
-     * @param float $int2Y
392
-     * @param float $cenX
393
-     * @param float $cenY
394
-     * @access public
395
-     */
396
-    public function drawCurve($ext1X, $ext1Y, $ext2X, $ext2Y, $int1X, $int1Y, $int2X, $int2Y, $cenX, $cenY)
397
-    {
398
-        // prepare the coordinates
399
-        $ext1X = $ext1X*$this->k;
400
-        $ext2X = $ext2X*$this->k;
401
-        $int1X = $int1X*$this->k;
402
-        $int2X = $int2X*$this->k;
403
-        $cenX  = $cenX*$this->k;
404
-
405
-        $ext1Y = ($this->h-$ext1Y)*$this->k;
406
-        $ext2Y = ($this->h-$ext2Y)*$this->k;
407
-        $int1Y = ($this->h-$int1Y)*$this->k;
408
-        $int2Y = ($this->h-$int2Y)*$this->k;
409
-        $cenY  = ($this->h-$cenY) *$this->k;
410
-
411
-        // init the curve
412
-        $path = '';
413
-
414
-        if ($ext1X-$cenX!=0) {
415
-            $xt1 = $cenX+($ext1X-$cenX);
416
-            $yt1 = $cenY+($ext2Y-$cenY)*self::MY_ARC;
417
-            $xt2 = $cenX+($ext1X-$cenX)*self::MY_ARC;
418
-            $yt2 = $cenY+($ext2Y-$cenY);
419
-        } else {
420
-            $xt1 = $cenX+($ext2X-$cenX)*self::MY_ARC;
421
-            $yt1 = $cenY+($ext1Y-$cenY);
422
-            $xt2 = $cenX+($ext2X-$cenX);
423
-            $yt2 = $cenY+($ext1Y-$cenY)*self::MY_ARC;
424
-        }
425
-        $path.= sprintf('%.2F %.2F m ', $ext1X, $ext1Y);
426
-        $path.= sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c ', $xt1, $yt1, $xt2, $yt2, $ext2X, $ext2Y);
427
-
428
-        if ($int1X-$cenX!=0) {
429
-            $xt1 = $cenX+($int1X-$cenX)*self::MY_ARC;
430
-            $yt1 = $cenY+($int2Y-$cenY);
431
-            $xt2 = $cenX+($int1X-$cenX);
432
-            $yt2 = $cenY+($int2Y-$cenY)*self::MY_ARC;
433
-        } else {
434
-            $xt1 = $cenX+($int2X-$cenX);
435
-            $yt1 = $cenY+($int1Y-$cenY)*self::MY_ARC;
436
-            $xt2 = $cenX+($int2X-$cenX)*self::MY_ARC;
437
-            $yt2 = $cenY+($int1Y-$cenY);
438
-        }
439
-        $path.= sprintf('%.2F %.2F l ', $int2X, $int2Y);
440
-        $path.= sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c ', $xt1, $yt1, $xt2, $yt2, $int1X, $int1Y);
441
-
442
-        // draw the curve
443
-        $this->_out($path . 'f');
444
-    }
445
-
446
-    /**
447
-     * draw a filled corner of a border with only a external radius
448
-     *         /--+ ext2
449
-     *        /   |
450
-     *       /    |
451
-     *      /     |
452
-     *      |     |
453
-     *      |     |
454
-     *      |     |
455
-     * ext1 +-----+ int      + cen
456
-     *
457
-     * @param float $ext1X
458
-     * @param float $ext1Y
459
-     * @param float $ext2X
460
-     * @param float $ext2Y
461
-     * @param float $intX
462
-     * @param float $intY
463
-     * @param float $cenX
464
-     * @param float $cenY
465
-     * @access public
466
-     */
467
-    public function drawCorner($ext1X, $ext1Y, $ext2X, $ext2Y, $intX, $intY, $cenX, $cenY)
468
-    {
469
-        // prepare the coordinates
470
-        $ext1X = $ext1X*$this->k;
471
-        $ext2X = $ext2X*$this->k;
472
-        $intX  = $intX*$this->k;
473
-        $cenX  = $cenX*$this->k;
474
-
475
-        $ext1Y = ($this->h-$ext1Y)*$this->k;
476
-        $ext2Y = ($this->h-$ext2Y)*$this->k;
477
-        $intY  = ($this->h-$intY)*$this->k;
478
-        $cenY  = ($this->h-$cenY)*$this->k;
479
-
480
-        // init the curve
481
-        $path = '';
482
-
483
-        if ($ext1X-$cenX!=0) {
484
-            $xt1 = $cenX+($ext1X-$cenX);
485
-            $yt1 = $cenY+($ext2Y-$cenY)*self::MY_ARC;
486
-            $xt2 = $cenX+($ext1X-$cenX)*self::MY_ARC;
487
-            $yt2 = $cenY+($ext2Y-$cenY);
488
-        } else {
489
-            $xt1 = $cenX+($ext2X-$cenX)*self::MY_ARC;
490
-            $yt1 = $cenY+($ext1Y-$cenY);
491
-            $xt2 = $cenX+($ext2X-$cenX);
492
-            $yt2 = $cenY+($ext1Y-$cenY)*self::MY_ARC;
493
-        }
494
-        $path.= sprintf('%.2F %.2F m ', $ext1X, $ext1Y);
495
-        $path.= sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c ', $xt1, $yt1, $xt2, $yt2, $ext2X, $ext2Y);
496
-        $path.= sprintf('%.2F %.2F l ', $intX, $intY);
497
-        $path.= sprintf('%.2F %.2F l ', $ext1X, $ext1Y);
498
-
499
-        // draw the curve
500
-        $this->_out($path . 'f');
501
-    }
502
-
503
-    /**
504
-     * Start a transformation
505
-     *
506
-     * @access public
507
-     */
508
-    public function startTransform()
509
-    {
510
-        $this->_out('q');
511
-    }
512
-
513
-    /**
514
-     * Stop a transformation
515
-     *
516
-     * @access public
517
-     */
518
-    public function stopTransform()
519
-    {
520
-        $this->_out('Q');
521
-    }
522
-
523
-    /**
524
-     * add a Translate transformation
525
-     *
526
-     * @param float $Tx
527
-     * @param float $Ty
528
-     * @access public
529
-     */
530
-    public function setTranslate($xT, $yT)
531
-    {
532
-        // Matrix for Translate
533
-        $tm[0]=1;
534
-        $tm[1]=0;
535
-        $tm[2]=0;
536
-        $tm[3]=1;
537
-        $tm[4]=$xT*$this->k;
538
-        $tm[5]=-$yT*$this->k;
539
-
540
-        // apply the Transform Matric
541
-        $this->_out(sprintf('%.3F %.3F %.3F %.3F %.3F %.3F cm', $tm[0], $tm[1], $tm[2], $tm[3], $tm[4], $tm[5]));
542
-    }
543
-
544
-    /**
545
-     * add a Rotate transformation
546
-     *
547
-     * @param float $angle
548
-     * @param float $Cx
549
-     * @param float $Cy
550
-     * @access public
551
-     */
552
-    public function setRotation($angle, $xC=null, $yC=null)
553
-    {
554
-        // if no center, rotate around the current posiition
555
-        if($xC === null) $xC=$this->x;
556
-        if($yC === null) $yC=$this->y;
557
-
558
-        // prepare the coordinate
559
-        $yC=($this->h-$yC)*$this->k;
560
-        $xC*=$this->k;
561
-
562
-        // Matrix for Rotate
563
-        $tm[0]=cos(deg2rad($angle));
564
-        $tm[1]=sin(deg2rad($angle));
565
-        $tm[2]=-$tm[1];
566
-        $tm[3]=$tm[0];
567
-        $tm[4]=$xC+$tm[1]*$yC-$tm[0]*$xC;
568
-        $tm[5]=$yC-$tm[0]*$yC-$tm[1]*$xC;
569
-
570
-        // apply the Transform Matric
571
-        $this->_out(sprintf('%.3F %.3F %.3F %.3F %.3F %.3F cm', $tm[0], $tm[1], $tm[2], $tm[3], $tm[4], $tm[5]));
572
-    }
573
-
574
-    /**
575
-     * we redifine the original SetX method, because we don't want the automatic treatment.
576
-     * It is HTML2PDF that make the treatment
577
-     *
578
-     * @param float   $x
579
-     * @param boolean $rtloff NOT USED
580
-     * @access public
581
-     */
582
-    public function SetX($x, $rtloff=false)
583
-    {
584
-        $this->x=$x;
585
-    }
586
-
587
-    /**
588
-     * we redifine the original SetY method, because we don't want the automatic treatment.
589
-     * It is HTML2PDF that make the treatment
590
-     *
591
-     * @param float   $y
592
-     * @param boolean $resetx Reset the X position
593
-     * @param boolean $rtloff NOT USED
594
-     * @access public
595
-     */
596
-    public function SetY($y, $resetx=true, $rtloff=false)
597
-    {
598
-        if ($resetx)
599
-            $this->x=$this->lMargin;
600
-
601
-        $this->y=$y;
602
-    }
603
-
604
-    /**
605
-     * we redifine the original SetXY method, because we don't want the automatic treatment.
606
-     * It is HTML2PDF that make the treatment
607
-     *
608
-     * @param integer $x
609
-     * @param integer $y
610
-     * @param boolean $rtloff NOT USED
611
-     * @access public
612
-     */
613
-    public function SetXY($x, $y, $rtloff=false)
614
-    {
615
-        $this->x=$x;
616
-        $this->y=$y;
617
-    }
618
-
619
-    /**
620
-     * multiple public accessor because HTML2PDF need to use TCPDF without being a extend of it
621
-     *
622
-     * @param  mixed
623
-     * @return mixed
624
-     * @access public
625
-     */
626
-    public function getK()
627
-    {
628
-        return $this->k;
629
-    }
630
-    public function getW()
631
-    {
632
-        return $this->w;
633
-    }
634
-    public function getH()
635
-    {
636
-        return $this->h;
637
-    }
638
-    public function getlMargin()
639
-    {
640
-        return $this->lMargin;
641
-    }
642
-    public function getrMargin()
643
-    {
644
-        return $this->rMargin;
645
-    }
646
-    public function gettMargin()
647
-    {
648
-        return $this->tMargin;
649
-    }
650
-    public function getbMargin()
651
-    {
652
-        return $this->bMargin;
653
-    }
654
-    public function setbMargin($v)
655
-    {
656
-        $this->bMargin=$v;
657
-    }
658
-
659
-    /**
660
-     * SVG - Convert a SVG Style in PDF Style
661
-     *
662
-     * @param  array  $styles SVG Style
663
-     * @return string PDF style
664
-     * @access public
665
-     */
666
-    public function svgSetStyle($styles)
667
-    {
668
-        // init the PDF style
669
-        $style = '';
670
-
671
-        // Style : fill
672
-        if ($styles['fill']) {
673
-            $this->setFillColorArray($styles['fill']);
674
-            $style.= 'F';
675
-        }
676
-
677
-        // Style : stroke
678
-        if ($styles['stroke'] && $styles['stroke-width']) {
679
-            $this->SetDrawColorArray($styles['stroke']);
680
-            $this->SetLineWidth($styles['stroke-width']);
681
-            $style.= 'D';
682
-        }
683
-
684
-        // Style : opacity
685
-        if ($styles['fill-opacity']) {
686
-            $this->SetAlpha($styles['fill-opacity']);
687
-        }
688
-
689
-        return $style;
690
-    }
691
-
692
-    /**
693
-     * SVG - make a Rectangle
694
-     *
695
-     * @param float $x
696
-     * @param float $y
697
-     * @param float $w
698
-     * @param float $h
699
-     * @param string $style PDF Style
700
-     * @access public
701
-     */
702
-    public function svgRect($x, $y, $w, $h, $style)
703
-    {
704
-        // prepare the 4 corners
705
-        $x1=$x;
706
-        $x2=$x+$w;
707
-        $x3=$x+$w;
708
-        $x4=$x;
709
-
710
-        $y1=$y;
711
-        $y2=$y;
712
-        $y3=$y+$h;
713
-        $y4=$y+$h;
714
-
715
-        // get the Closing operator from the PDF Style
716
-        if($style=='F') $op='f';
717
-        elseif($style=='FD' || $style=='DF') $op='B';
718
-        else $op='S';
719
-
720
-        // drawing
721
-        $this->_Point($x1, $y1, true);
722
-        $this->_Line($x2, $y2, true);
723
-        $this->_Line($x3, $y3, true);
724
-        $this->_Line($x4, $y4, true);
725
-        $this->_Line($x1, $y1, true);
726
-        $this->_out($op);
727
-    }
728
-
729
-    /**
730
-     * SVG - make a Line
731
-     *
732
-     * @param float $x1
733
-     * @param float $y1
734
-     * @param float $x2
735
-     * @param float $y2
736
-     * @access public
737
-     */
738
-    public function svgLine($x1, $y1, $x2, $y2)
739
-    {
740
-        // get the Closing operator
741
-        $op='S';
742
-
743
-        // drawing
744
-        $this->_Point($x1, $y1, true);
745
-        $this->_Line($x2, $y2, true);
746
-        $this->_out($op);
747
-    }
748
-
749
-    /**
750
-     * SVG - make a Ellipse
751
-     *
752
-     * @param float  $x0 x Center
753
-     * @param float  $y0 y Center
754
-     * @param float  $rx x radius
755
-     * @param float  $ry y radius
756
-     * @param string $style PDF Style
757
-     * @access public
758
-     */
759
-    public function svgEllipse($x0, $y0, $rx, $ry, $style)
760
-    {
761
-        // get the Closing operator from the PDF Style
762
-        if($style=='F') $op='f';
763
-        elseif($style=='FD' || $style=='DF') $op='B';
764
-        else $op='S';
765
-
766
-        // drawing
767
-        $this->_Arc($x0, $y0, $rx, $ry, 0, 2*M_PI, true, true, true);
768
-        $this->_out($op);
769
-    }
770
-
771
-    /**
772
-     * SVG - make a Advanced Polygone
773
-     *
774
-     * @param array  $actions list of actions
775
-     * @param string $style PDF Style
776
-     * @access public
777
-     */
778
-    public function svgPolygone($actions, $style)
779
-    {
780
-        // get the Closing operator from the PDF Style
781
-        if($style=='F') $op='f';
782
-        elseif($style=='FD' || $style=='DF') $op='B';
783
-        else $op='S';
784
-
785
-        // To save the First action and the last point
786
-        $first = array('', 0, 0);
787
-        $last = array(0, 0, 0, 0);
788
-
789
-        foreach ($actions as $action) {
790
-            switch($action[0])
791
-            {
792
-                // Start the Path
793
-                case 'M':
794
-                case 'm':
795
-                    $first = $action;
796
-                    $x = $action[1]; $y = $action[2]; $xc = $x; $yc = $y;
797
-                    $this->_Point($x, $y, true);
798
-                    break;
799
-
800
-                // Close the Path
801
-                case 'Z':
802
-                case 'z':
803
-                    $x = $first[1]; $y = $first[2]; $xc = $x; $yc = $y;
804
-                    $this->_Line($x, $y, true);
805
-                    break;
806
-
807
-                // Make a Line (new point)
808
-                case 'L':
809
-                    $x = $action[1]; $y = $action[2]; $xc = $x; $yc = $y;
810
-                    $this->_Line($x, $y, true);
811
-                    break;
812
-
813
-                // Make a Line (vector from last point)
814
-                case 'l':
815
-                    $x = $last[0]+$action[1]; $y = $last[1]+$action[2]; $xc = $x; $yc = $y;
816
-                    $this->_Line($x, $y, true);
817
-                    break;
818
-
819
-                // Make a Horizontal Line (new point)
820
-                case 'H':
821
-                    $x = $action[1]; $y = $last[1]; $xc = $x; $yc = $y;
822
-                    $this->_Line($x, $y, true);
823
-                    break;
824
-
825
-                // Make a Horisontal Line (vector from last point)
826
-                case 'h':
827
-                    $x = $last[0]+$action[1]; $y = $last[1]; $xc = $x; $yc = $y;
828
-                    $this->_Line($x, $y, true);
829
-                    break;
830
-
831
-                // Make a Vertical Line (new point)
832
-                case 'V':
833
-                    $x = $last[0]; $y = $action[1]; $xc = $x; $yc = $y;
834
-                    $this->_Line($x, $y, true);
835
-                    break;
836
-
837
-                // Make a Vertical Line (vector from last point)
838
-                case 'v':
839
-                    $x = $last[0]; $y = $last[1]+$action[1]; $xc = $x; $yc = $y;
840
-                    $this->_Line($x, $y, true);
841
-                    break;
842
-
843
-                // Make a Arc (new point)
844
-                case 'A':
845
-                    $rx = $action[1];   // rx
846
-                    $ry = $action[2];   // ry
847
-                    $a = $action[3];    // deviation angle of the axis X
848
-                    $l = $action[4];    // large-arc-flag
849
-                    $s = $action[5];    // sweep-flag
850
-                    $x1 = $last[0];     // begin x
851
-                    $y1 = $last[1];     // begin y
852
-                    $x2 = $action[6];   // final x
853
-                    $y2 = $action[7];   // final y
854
-
855
-                    $this->_Arc2($x1, $y1, $x2, $y2, $rx, $ry, $a, $l, $s, true);
856
-                    $x = $x2; $y = $y2; $xc = $x; $yc = $y;
857
-                    break;
858
-
859
-                // Make a Arc (vector from last point)
860
-                case 'a':
861
-                    $rx = $action[1];   // rx
862
-                    $ry = $action[2];   // ry
863
-                    $a = $action[3];    // deviation angle of the axis X
864
-                    $l = $action[4];    // large-arc-flag
865
-                    $s = $action[5];    // sweep-flag
866
-                    $x1 = $last[0];     // begin x
867
-                    $y1 = $last[1];     // begin y
868
-                    $x2 = $last[0]+$action[6]; // final x
869
-                    $y2 = $last[1]+$action[7]; // final y
870
-
871
-                    $this->_Arc2($x1, $y1, $x2, $y2, $rx, $ry, $a, $l, $s, true);
872
-                    $x = $x2; $y = $y2; $xc = $x; $yc = $y;
873
-                    break;
874
-
875
-                // Make a Bezier Curve (new point)
876
-                case 'C':
877
-                    $x1 = $action[1];
878
-                    $y1 = $action[2];
879
-                    $x2 = $action[3];
880
-                    $y2 = $action[4];
881
-                    $xf = $action[5];
882
-                    $yf = $action[6];
883
-                    $this->_Curve($x1, $y1, $x2, $y2, $xf, $yf, true);
884
-                    $x = $xf; $y = $yf; $xc = $x2; $yc = $y2;
885
-                    break;
886
-
887
-                // Make a Bezier Curve (vector from last point)
888
-                case 'c':
889
-                    $x1 = $last[0]+$action[1];
890
-                    $y1 = $last[1]+$action[2];
891
-                    $x2 = $last[0]+$action[3];
892
-                    $y2 = $last[1]+$action[4];
893
-                    $xf = $last[0]+$action[5];
894
-                    $yf = $last[1]+$action[6];
895
-                    $this->_Curve($x1, $y1, $x2, $y2, $xf, $yf, true);
896
-                    $x = $xf; $y = $yf; $xc = $x2; $yc = $y2;
897
-                    break;
898
-
899
-                // Unknown Path
900
-                default:
901
-                    throw new HTML2PDF_exception(0, 'SVG Path Error : ['.$action[0].'] unkown');
902
-            }
903
-
904
-            // save the last point
905
-            $last = array($x, $y, $xc, $yc);
906
-        }
907
-
908
-        // finish the path
909
-        $this->_out($op);
910
-    }
911
-
912
-    /**
913
-     * SVG - go to a point
914
-     *
915
-     * @param float   $x
916
-     * @param float   $y
917
-     * @param boolean $trans apply transformation
918
-     * @access protected
919
-     */
920
-    protected function _Point($x, $y, $trans = false)
921
-    {
922
-        if ($trans) $this->ptTransform($x, $y);
923
-
924
-        $this->_out(sprintf('%.2F %.2F m', $x, $y));
925
-    }
926
-
927
-    /**
928
-     * SVG - make a line from the last point to (x,y)
929
-     *
930
-     * @param float   $x
931
-     * @param float   $y
932
-     * @param boolean $trans apply transformation
933
-     * @access protected
934
-     */
935
-    protected function _Line($x, $y, $trans = false)
936
-    {
937
-        if ($trans) $this->ptTransform($x, $y);
938
-
939
-        $this->_out(sprintf('%.2F %.2F l', $x, $y));
940
-    }
941
-
942
-    /**
943
-     * SVG - make a bezier curve from the last point to (xf,yf), with the 2 direction points (x1,y1) and (x2,y2)
944
-     *
945
-     * @param float $x1
946
-     * @param float $y1
947
-     * @param float $x2
948
-     * @param float $y2
949
-     * @param float $xf
950
-     * @param float $yf
951
-     * @param boolean $trans apply transformation
952
-     * @access protected
953
-     */
954
-    protected function _Curve($x1, $y1, $x2, $y2, $xf, $yf, $trans = false)
955
-    {
956
-        if ($trans) {
957
-            $this->ptTransform($x1, $y1);
958
-            $this->ptTransform($x2, $y2);
959
-            $this->ptTransform($xf, $yf);
960
-        }
961
-        $this->_out(sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c', $x1, $y1, $x2, $y2, $xf, $yf));
962
-    }
963
-
964
-    /**
965
-     * SVG - make a arc with Center, Radius, from angleBegin to angleEnd
966
-     *
967
-     * @param float $xc
968
-     * @param float $yc
969
-     * @param float $rx
970
-     * @param float $ry
971
-     * @param float $angleBegin in radians
972
-     * @param float $angleEng in radians
973
-     * @param boolean $direction
974
-     * @param boolean $drawFirst, true => add the first point
975
-     * @param boolean $trans apply transformation
976
-     * @access protected
977
-     */
978
-    protected function _Arc(
979
-        $xc,
980
-        $yc,
981
-        $rx,
982
-        $ry,
983
-        $angleBegin,
984
-        $angleEnd,
985
-        $direction = true,
986
-        $drawFirst = true,
987
-        $trans=false)
988
-    {
989
-        // if we want the no trigo direction : add 2PI to the begin angle, to invert the direction
990
-        if (!$direction) $angleBegin+= M_PI*2.;
991
-
992
-        // cut in segment to convert in berize curv
993
-        $dt = ($angleEnd - $angleBegin)/self::ARC_NB_SEGMENT;
994
-        $dtm = $dt/3;
995
-
996
-        // center of the arc
997
-        $x0 = $xc; $y0 = $yc;
998
-
999
-        // calculing the first point
1000
-        $t1 = $angleBegin;
1001
-        $a0 = $x0 + ($rx * cos($t1));
1002
-        $b0 = $y0 + ($ry * sin($t1));
1003
-        $c0 = -$rx * sin($t1);
1004
-        $d0 = $ry * cos($t1);
1005
-
1006
-        // if drawFirst => draw the first point
1007
-        if ($drawFirst) $this->_Point($a0, $b0, $trans);
1008
-
1009
-        // foreach segment
1010
-        for ($i = 1; $i <= self::ARC_NB_SEGMENT; $i++) {
1011
-            // calculing the next point
1012
-            $t1 = ($i * $dt)+$angleBegin;
1013
-            $a1 = $x0 + ($rx * cos($t1));
1014
-            $b1 = $y0 + ($ry * sin($t1));
1015
-            $c1 = -$rx * sin($t1);
1016
-            $d1 = $ry * cos($t1);
1017
-
1018
-            // make the bezier curv
1019
-            $this->_Curve(
1020
-                $a0 + ($c0 * $dtm), $b0 + ($d0 * $dtm),
1021
-                $a1 - ($c1 * $dtm), $b1 - ($d1 * $dtm),
1022
-                $a1, $b1,
1023
-                $trans
1024
-            );
1025
-
1026
-            // save the point
1027
-            $a0 = $a1;
1028
-            $b0 = $b1;
1029
-            $c0 = $c1;
1030
-            $d0 = $d1;
1031
-        }
1032
-    }
1033
-
1034
-    /**
1035
-     * SVG - make a arc from Pt1 to Pt2, with Radius
1036
-     *
1037
-     * @param float $x1
1038
-     * @param float $y1
1039
-     * @param float $x2
1040
-     * @param float $y2
1041
-     * @param float $rx
1042
-     * @param float $ry
1043
-     * @param float $angle deviation angle of the axis X
1044
-     * @param boolean $l large-arc-flag
1045
-     * @param boolean $s sweep-flag
1046
-     * @param boolean $trans apply transformation
1047
-     * @access protected
1048
-     */
1049
-    protected function _Arc2($x1, $y1, $x2, $y2, $rx, $ry, $angle=0., $l=0, $s=0, $trans = false)
1050
-    {
1051
-        // array to stock the parameters
1052
-        $v = array();
1053
-
1054
-        // the original values
1055
-        $v['x1'] = $x1;
1056
-        $v['y1'] = $y1;
1057
-        $v['x2'] = $x2;
1058
-        $v['y2'] = $y2;
1059
-        $v['rx'] = $rx;
1060
-        $v['ry'] = $ry;
1061
-
1062
-        // rotate with the deviation angle of the axis X
1063
-        $v['xr1'] = $v['x1']*cos($angle) - $v['y1']*sin($angle);
1064
-        $v['yr1'] = $v['x1']*sin($angle) + $v['y1']*cos($angle);
1065
-        $v['xr2'] = $v['x2']*cos($angle) - $v['y2']*sin($angle);
1066
-        $v['yr2'] = $v['x2']*sin($angle) + $v['y2']*cos($angle);
1067
-
1068
-        // the normalized vector
1069
-        $v['Xr1'] = $v['xr1']/$v['rx'];
1070
-        $v['Yr1'] = $v['yr1']/$v['ry'];
1071
-        $v['Xr2'] = $v['xr2']/$v['rx'];
1072
-        $v['Yr2'] = $v['yr2']/$v['ry'];
1073
-        $v['dXr'] = $v['Xr2']-$v['Xr1'];
1074
-        $v['dYr'] = $v['Yr2']-$v['Yr1'];
1075
-        $v['D'] = $v['dXr']*$v['dXr'] + $v['dYr']*$v['dYr'];
1076
-
1077
-        // if |vector| is Null, or if |vector| > 2 : impossible to make a arc => Line
1078
-        if ($v['D']==0 || $v['D']>4) {
1079
-            $this->_Line($x2, $y2, $trans);
1080
-            return false;
1081
-        }
1082
-
1083
-        // convert paramters for make a arc with Center, Radius, from angleBegin to angleEnd
1084
-        $v['s1'] = array();
1085
-        $v['s1']['t'] = sqrt((4.-$v['D'])/$v['D']);
1086
-        $v['s1']['Xr'] = ($v['Xr1']+$v['Xr2'])/2. + $v['s1']['t']*($v['Yr2']-$v['Yr1'])/2.;
1087
-        $v['s1']['Yr'] = ($v['Yr1']+$v['Yr2'])/2. + $v['s1']['t']*($v['Xr1']-$v['Xr2'])/2.;
1088
-        $v['s1']['xr'] = $v['s1']['Xr']*$v['rx'];
1089
-        $v['s1']['yr'] = $v['s1']['Yr']*$v['ry'];
1090
-        $v['s1']['x'] = $v['s1']['xr']*cos($angle)+$v['s1']['yr']*sin($angle);
1091
-        $v['s1']['y'] =-$v['s1']['xr']*sin($angle)+$v['s1']['yr']*cos($angle);
1092
-        $v['s1']['a1'] = atan2($v['y1']-$v['s1']['y'], $v['x1']-$v['s1']['x']);
1093
-        $v['s1']['a2'] = atan2($v['y2']-$v['s1']['y'], $v['x2']-$v['s1']['x']);
1094
-        if ($v['s1']['a1']>$v['s1']['a2']) $v['s1']['a1']-=2*M_PI;
1095
-
1096
-        $v['s2'] = array();
1097
-        $v['s2']['t'] = -$v['s1']['t'];
1098
-        $v['s2']['Xr'] = ($v['Xr1']+$v['Xr2'])/2. + $v['s2']['t']*($v['Yr2']-$v['Yr1'])/2.;
1099
-        $v['s2']['Yr'] = ($v['Yr1']+$v['Yr2'])/2. + $v['s2']['t']*($v['Xr1']-$v['Xr2'])/2.;
1100
-        $v['s2']['xr'] = $v['s2']['Xr']*$v['rx'];
1101
-        $v['s2']['yr'] = $v['s2']['Yr']*$v['ry'];
1102
-        $v['s2']['x'] = $v['s2']['xr']*cos($angle)+$v['s2']['yr']*sin($angle);
1103
-        $v['s2']['y'] =-$v['s2']['xr']*sin($angle)+$v['s2']['yr']*cos($angle);
1104
-        $v['s2']['a1'] = atan2($v['y1']-$v['s2']['y'], $v['x1']-$v['s2']['x']);
1105
-        $v['s2']['a2'] = atan2($v['y2']-$v['s2']['y'], $v['x2']-$v['s2']['x']);
1106
-        if ($v['s2']['a1']>$v['s2']['a2']) $v['s2']['a1']-=2*M_PI;
1107
-
1108
-        if (!$l) {
1109
-            if ($s) {
1110
-                $xc = $v['s2']['x'];
1111
-                $yc = $v['s2']['y'];
1112
-                $a1 = $v['s2']['a1'];
1113
-                $a2 = $v['s2']['a2'];
1114
-                $this->_Arc($xc, $yc, $rx, $ry, $a1, $a2, true, false, $trans);
1115
-            } else {
1116
-                $xc = $v['s1']['x'];
1117
-                $yc = $v['s1']['y'];
1118
-                $a1 = $v['s1']['a1'];
1119
-                $a2 = $v['s1']['a2'];
1120
-                $this->_Arc($xc, $yc, $rx, $ry, $a1, $a2, false, false, $trans);
1121
-            }
1122
-        } else {
1123
-            if ($s) {
1124
-                $xc = $v['s1']['x'];
1125
-                $yc = $v['s1']['y'];
1126
-                $a1 = $v['s1']['a1'];
1127
-                $a2 = $v['s1']['a2'];
1128
-                $this->_Arc($xc, $yc, $rx, $ry, $a1, $a2, true, false, $trans);
1129
-            } else {
1130
-                $xc = $v['s2']['x'];
1131
-                $yc = $v['s2']['y'];
1132
-                $a1 = $v['s2']['a1'];
1133
-                $a2 = $v['s2']['a2'];
1134
-                $this->_Arc($xc, $yc, $rx, $ry, $a1, $a2, false, false, $trans);
1135
-            }
1136
-        }
1137
-    }
1138
-
1139
-    /**
1140
-     * SVG - transform the point (reference)
1141
-     *
1142
-     * @param float &$x
1143
-     * @param float &$y
1144
-     * @param boolean $trans true => convert into PDF unit
1145
-     * @return boolean
1146
-     * @access public
1147
-     */
1148
-    public function ptTransform(&$x,  &$y, $trans=true)
1149
-    {
1150
-        // load the last Transfomation Matrix
1151
-        $nb = count($this->_transf);
1152
-        if ($nb)    $m = $this->_transf[$nb-1];
1153
-        else        $m = array(1,0,0,1,0,0);
1154
-
1155
-        // apply the Transformation Matrix
1156
-        list($x,$y) = array(($x*$m[0]+$y*$m[2]+$m[4]),($x*$m[1]+$y*$m[3]+$m[5]));
1157
-
1158
-        // if true => convert into PDF unit
1159
-        if ($trans) {
1160
-            $x = $x*$this->k;
1161
-            $y = ($this->h-$y)*$this->k;
1162
-        }
1163
-
1164
-        return true;
1165
-    }
1166
-
1167
-    /**
1168
-     * SVG - add a transformation Matric
1169
-     *
1170
-     * @param array $n matrix
1171
-     * @access public
1172
-     */
1173
-    public function doTransform($n = null)
1174
-    {
1175
-        // get the last Transformation Matrix
1176
-        $nb = count($this->_transf);
1177
-        if ($nb)    $m = $this->_transf[$nb-1];
1178
-        else        $m = array(1,0,0,1,0,0);
1179
-
1180
-        // if no transform, get the Identity Matrix
1181
-        if (!$n) $n = array(1,0,0,1,0,0);
1182
-
1183
-        // create the new Transformation Matrix
1184
-        $this->_transf[] = array(
1185
-            $m[0]*$n[0]+$m[2]*$n[1],
1186
-            $m[1]*$n[0]+$m[3]*$n[1],
1187
-            $m[0]*$n[2]+$m[2]*$n[3],
1188
-            $m[1]*$n[2]+$m[3]*$n[3],
1189
-            $m[0]*$n[4]+$m[2]*$n[5]+$m[4],
1190
-            $m[1]*$n[4]+$m[3]*$n[5]+$m[5]
1191
-        );
1192
-    }
1193
-
1194
-    /**
1195
-     * SVG - remove a transformation Matric
1196
-     *
1197
-     * @access public
1198
-     */
1199
-    public function undoTransform()
1200
-    {
1201
-        array_pop($this->_transf);
1202
-    }
1203
-
1204
-    /**
1205
-     * Convert a HTML2PDF barcode in a TCPDF barcode
1206
-     *
1207
-     * @param string $code code to print
1208
-     * @param string $type type of barcode (see tcpdf/barcodes.php for supported formats)
1209
-     * @param int $x x position in user units
1210
-     * @param int $y y position in user units
1211
-     * @param int $w width in user units
1212
-     * @param int $h height in user units
1213
-     * @param int $labelFontsize of the Test Label. If false : no Label
1214
-     * @param array $color color of the foreground
1215
-     * @access public
1216
-     */
1217
-    public function myBarcode($code, $type, $x, $y, $w, $h, $labelFontsize, $color)
1218
-    {
1219
-        // the style of the barcode
1220
-        $style = array(
1221
-            'position' => 'S',
1222
-            'text' => ($labelFontsize ? true : false),
1223
-            'fgcolor' => $color,
1224
-            'bgcolor' => false,
1225
-        );
1226
-
1227
-        // build the barcode
1228
-        $this->write1DBarcode($code, $type, $x, $y, $w, $h, '', $style, 'N');
1229
-
1230
-        // it Label => add the FontSize to the height
1231
-        if ($labelFontsize) $h+= ($labelFontsize);
1232
-
1233
-        // return the size of the barcode
1234
-        return array($w, $h);
1235
-    }
1236
-
1237
-    /**
1238
-     * create a automatic Index on a page
1239
-     *
1240
-     * @param html2pdf $obj           parent object
1241
-     * @param string   $titre         Title of the Index Page
1242
-     * @param integer  $sizeTitle     Font size for hthe Title
1243
-     * @param integer  $sizeBookmark  Font size for the bookmarks
1244
-     * @param boolean  $bookmarkTitle Bookmark the Title
1245
-     * @param boolean  $displayPage   Display the page number for each bookmark
1246
-     * @param integer  $page draw the automatic Index on a specific Page. if null => add a page at the end
1247
-     * @param string   $fontName      FontName to use
1248
-     * @access public
1249
-     */
1250
-    public function createIndex(
1251
-        &$obj,
1252
-        $titre = 'Index',
1253
-        $sizeTitle = 20,
1254
-        $sizeBookmark = 15,
1255
-        $bookmarkTitle = true,
1256
-        $displayPage = true,
1257
-        $page = null,
1258
-        $fontName = 'helvetica')
1259
-    {
1260
-        // bookmark the Title if wanted
1261
-        if ($bookmarkTitle) $this->Bookmark($titre, 0, -1);
1262
-
1263
-        // display the Title with the good Font size
1264
-        $this->SetFont($fontName, '', $sizeTitle);
1265
-        $this->Cell(0, 5, $titre, 0, 1, 'C');
1266
-
1267
-        // set the good Font size for the bookmarks
1268
-        $this->SetFont($fontName, '', $sizeBookmark);
1269
-        $this->Ln(10);
1270
-
1271
-        // get the number of bookmarks
1272
-        $size=sizeof($this->outlines);
1273
-
1274
-        // get the size of the "P. xx" cell
1275
-        $pageCellSize=$this->GetStringWidth('p. '.$this->outlines[$size-1]['p'])+2;
1276
-
1277
-        // Foreach bookmark
1278
-        for ($i=0;$i<$size;$i++) {
1279
-            // if we need a new page => add a new page
1280
-            if ($this->getY()+$this->FontSize>=($this->h - $this->bMargin)) {
1281
-                $obj->_INDEX_NewPage($page);
1282
-                $this->SetFont($fontName, '', $sizeBookmark);
1283
-            }
1284
-
1285
-            // Offset of the current level
1286
-            $level=$this->outlines[$i]['l'];
1287
-            if($level>0) $this->Cell($level*8);
1288
-
1289
-            // Caption (cut to fit on the width page)
1290
-            $str=$this->outlines[$i]['t'];
1291
-            $strsize=$this->GetStringWidth($str);
1292
-            $availableSize=$this->w-$this->lMargin-$this->rMargin-$pageCellSize-($level*8)-4;
1293
-            while ($strsize>=$availableSize) {
1294
-                $str=substr($str, 0, -1);
1295
-                $strsize=$this->GetStringWidth($str);
1296
-            }
1297
-
1298
-            // if we want to display the page nmber
1299
-            if ($displayPage) {
1300
-                // display the Bookmark Caption
1301
-                $this->Cell($strsize+2, $this->FontSize+2, $str);
1302
-
1303
-                //Filling dots
1304
-                $w=$this->w-$this->lMargin-$this->rMargin-$pageCellSize-($level*8)-($strsize+2);
1305
-                $nb=$w/$this->GetStringWidth('.');
1306
-                $dots=str_repeat('.', $nb);
1307
-                $this->Cell($w, $this->FontSize+2, $dots, 0, 0, 'R');
1308
-
1309
-                //Page number
1310
-                $this->Cell($pageCellSize, $this->FontSize+2, 'p. '.$this->outlines[$i]['p'], 0, 1, 'R');
1311
-            } else {
1312
-                // display the Bookmark Caption
1313
-                $this->Cell($strsize+2, $this->FontSize+2, $str, 0, 1);
1314
-            }
1315
-        }
1316
-    }
1317
-
1318
-    /**
1319
-     * Returns the string alias used for the total number of pages.
1320
-     *
1321
-     * @access public
1322
-     * @return string;
1323
-     * @see TCPDF::getAliasNbPages(), TCPDF::getPageGroupAlias()
1324
-     */
1325
-    public function getMyAliasNbPages()
1326
-    {
1327
-        if ($this->_myLastPageGroupNb==0) {
1328
-            return $this->getAliasNbPages();
1329
-        } else {
1330
-            $old = $this->currpagegroup;
1331
-            $this->currpagegroup = '{nb'.$this->_myLastPageGroupNb.'}';
1332
-            $new = $this->getPageGroupAlias();
1333
-            $this->currpagegroup = $old;
1334
-
1335
-            return $new;
1336
-        }
1337
-    }
1338
-
1339
-    /**
1340
-     * Returns the current page number.
1341
-     *
1342
-     * @access public
1343
-     * @param  integer $page
1344
-     * @return integer;
1345
-     */
1346
-    public function getMyNumPage($page=null)
1347
-    {
1348
-        if ($page===null) {
1349
-            $page = $this->page;
1350
-        }
1351
-
1352
-        if ($this->_myLastPageGroupNb==0) {
1353
-            return $page;
1354
-        } else {
1355
-            return $page-$this->_myLastPageGroup;
1356
-        }
1357
-    }
1358
-
1359
-    /**
1360
-     * Start a new group of pages
1361
-     *
1362
-     * @access public
1363
-     * @return integer;
1364
-     * @see tcpdf::startPageGroup
1365
-     */
1366
-    public function myStartPageGroup()
1367
-    {
1368
-        $this->_myLastPageGroup = $this->page-1;
1369
-        $this->_myLastPageGroupNb++;
1370
-    }
1371
-
1372
-    /**
1373
-     * get $_myLastPageGroup;
1374
-     *
1375
-     * @access public
1376
-     * @return integer $_myLastPageGroup;
1377
-     */
1378
-    public function getMyLastPageGroup()
1379
-    {
1380
-        return $this->_myLastPageGroup;
1381
-    }
1382
-
1383
-    /**
1384
-     * set $_myLastPageGroup;
1385
-     *
1386
-     * @access public
1387
-     * @param integer $myLastPageGroup;
1388
-     */
1389
-    public function setMyLastPageGroup($myLastPageGroup)
1390
-    {
1391
-        $this->_myLastPageGroup = $myLastPageGroup;
1392
-    }
1393
-
1394
-    /**
1395
-     * get $_myLastPageGroupNb;
1396
-     *
1397
-     * @access public
1398
-     * @return integer $_myLastPageGroupNb;
1399
-     */
1400
-    public function getMyLastPageGroupNb()
1401
-    {
1402
-        return $this->_myLastPageGroupNb;
1403
-    }
1404
-
1405
-    /**
1406
-     * set $_myLastPageGroupNb;
1407
-     *
1408
-     * @access public
1409
-     * @param integer $myLastPageGroupNb;
1410
-     */
1411
-    public function setMyLastPageGroupNb($myLastPageGroupNb)
1412
-    {
1413
-        $this->_myLastPageGroupNb = $myLastPageGroupNb;
1414
-    }
17
+	protected $_footerParam = array();
18
+	protected $_transf      = array();
19
+	protected $_myLastPageGroup = null;
20
+	protected $_myLastPageGroupNb = 0;
21
+
22
+	// used to make a radius with bezier : (4/3 * (sqrt(2) - 1))
23
+	const MY_ARC = 0.5522847498;
24
+
25
+	// nb of segment to build a arc with bezier curv
26
+	const ARC_NB_SEGMENT = 8;
27
+
28
+	/**
29
+	 * class constructor
30
+	 *
31
+	 * @param string  $orientation page orientation, same as TCPDF
32
+	 * @param string  $unit        User measure unit, same as TCPDF
33
+	 * @param mixed   $format      The format used for pages, same as TCPDF
34
+	 * @param boolean $unicode     TRUE means that the input text is unicode (default = true)
35
+	 * @param String  $encoding    charset encoding; default is UTF-8
36
+	 * @param boolean $diskcache   if TRUE reduce the RAM memory usage by caching temporary data on filesystem (slower).
37
+	 * @access public
38
+	 */
39
+	public function __construct(
40
+		$orientation='P',
41
+		$unit='mm',
42
+		$format='A4',
43
+		$unicode=true,
44
+		$encoding='UTF-8',
45
+		$diskcache=false)
46
+	{
47
+		// call the parent constructor
48
+		parent::__construct($orientation, $unit, $format, $unicode, $encoding, $diskcache);
49
+
50
+		// init the specific parameters used by HTML2PDF
51
+		$this->SetCreator(PDF_CREATOR);
52
+		$this->SetAutoPageBreak(false, 0);
53
+		$this->linestyleCap = '2 J';
54
+		$this->setPrintHeader(false);
55
+		$this->jpeg_quality = 90;
56
+
57
+		// prepare the automatic footer
58
+		$this->SetMyFooter();
59
+
60
+		$this->cMargin = 0;
61
+	}
62
+
63
+	/**
64
+	 * Set the parameters for the automatic footer
65
+	 *
66
+	 * @param boolean $page display the page number
67
+	 * @param boolean $date display the date
68
+	 * @param boolean $hour display the hour
69
+	 * @param boolean $form display a warning abour forms
70
+	 * @access public
71
+	 */
72
+	public function SetMyFooter($page = false, $date = false, $hour = false, $form = false)
73
+	{
74
+		$page    = ($page ? true : false);
75
+		$date    = ($date ? true : false);
76
+		$hour    = ($hour ? true : false);
77
+		$form    = ($form ? true : false);
78
+
79
+		$this->_footerParam = array('page' => $page, 'date' => $date, 'hour' => $hour, 'form' => $form);
80
+	}
81
+
82
+	/**
83
+	 * This function is call automatically by TCPDF at the end of a page
84
+	 * It takes no parameters
85
+	 *
86
+	 * @access public
87
+	 */
88
+	public function Footer()
89
+	{
90
+		// prepare the text from the tranlated text
91
+		$txt = '';
92
+		if ($this->_footerParam['form']) {
93
+			$txt = (HTML2PDF_locale::get('pdf05'));
94
+		}
95
+		if ($this->_footerParam['date'] && $this->_footerParam['hour']) {
96
+			$txt.= ($txt ? ' - ' : '').(HTML2PDF_locale::get('pdf03'));
97
+		}
98
+		if ($this->_footerParam['date'] && !$this->_footerParam['hour']) {
99
+			$txt.= ($txt ? ' - ' : '').(HTML2PDF_locale::get('pdf01'));
100
+		}
101
+		if (!$this->_footerParam['date'] && $this->_footerParam['hour']) {
102
+			$txt.= ($txt ? ' - ' : '').(HTML2PDF_locale::get('pdf02'));
103
+		}
104
+		if ($this->_footerParam['page']) {
105
+			$txt.= ($txt ? ' - ' : '').(HTML2PDF_locale::get('pdf04'));
106
+		}
107
+
108
+		if (strlen($txt)>0) {
109
+			// replace some values
110
+			$toReplace = array(
111
+				'[[date_d]]'  => date('d'),
112
+				'[[date_m]]'  => date('m'),
113
+				'[[date_y]]'  => date('Y'),
114
+				'[[date_h]]'  => date('H'),
115
+				'[[date_i]]'  => date('i'),
116
+				'[[date_s]]'  => date('s'),
117
+				'[[page_cu]]' => $this->getMyNumPage(),
118
+				'[[page_nb]]' => $this->getMyAliasNbPages(),
119
+			);
120
+			$txt = str_replace(array_keys($toReplace), array_values($toReplace), $txt);
121
+
122
+			// draw the footer
123
+			parent::SetY(-11);
124
+			$this->SetFont('helvetica', 'I', 8);
125
+			$this->Cell(0, 10, $txt, 0, 0, 'R');
126
+		}
127
+	}
128
+
129
+	 /**
130
+	  * after cloning a object, we does not want to clone all the front informations
131
+	  * because it take a lot a time and a lot of memory => we use reference
132
+	  *
133
+	  * @param &HTML2PDF_myPdf object
134
+	  * @access public
135
+	  */
136
+	public function cloneFontFrom(&$pdf)
137
+	{
138
+		$this->fonts            = &$pdf->getFonts();
139
+		$this->FontFiles        = &$pdf->getFontFiles();
140
+		$this->diffs            = &$pdf->getDiffs();
141
+		$this->fontlist         = &$pdf->getFontList();
142
+		$this->numfonts         = &$pdf->getNumFonts();
143
+		$this->fontkeys         = &$pdf->getFontKeys();
144
+		$this->font_obj_ids     = &$pdf->getFontObjIds();
145
+		$this->annotation_fonts = &$pdf->getAnnotFonts();
146
+	}
147
+
148
+	/**
149
+	 * multiple public accessor for some private attributs
150
+	 * used only by cloneFontFrom
151
+	 *
152
+	 * @return &array
153
+	 * @access public
154
+	 */
155
+	public function &getFonts()
156
+	{
157
+		return $this->fonts;
158
+	}
159
+	public function &getFontFiles()
160
+	{
161
+		return $this->FontFiles;
162
+	}
163
+	public function &getDiffs()
164
+	{
165
+		return $this->diffs;
166
+	}
167
+	public function &getFontList()
168
+	{
169
+		return $this->fontlist;
170
+	}
171
+	public function &getNumFonts()
172
+	{
173
+		return $this->numfonts;
174
+	}
175
+	public function &getFontKeys()
176
+	{
177
+		return $this->fontkeys;
178
+	}
179
+	public function &getFontObjIds()
180
+	{
181
+		return $this->font_obj_ids;
182
+	}
183
+	public function &getAnnotFonts()
184
+	{
185
+		return $this->annotation_fonts;
186
+	}
187
+
188
+	/**
189
+	 * Verify that a Font is already loaded
190
+	 *
191
+	 * @param string Font Key
192
+	 * @return boolean
193
+	 * @access public
194
+	 */
195
+	public function isLoadedFont($fontKey)
196
+	{
197
+		if (isset($this->fonts[$fontKey])) {
198
+			return true;
199
+		}
200
+
201
+		if (isset($this->CoreFonts[$fontKey])) {
202
+			return true;
203
+		}
204
+
205
+		return false;
206
+	}
207
+
208
+	/**
209
+	 * Get the Word Spacing
210
+	 *
211
+	 * @access public
212
+	 * @return float word spacing
213
+	 */
214
+	public function getWordSpacing()
215
+	{
216
+		return $this->ws;
217
+	}
218
+
219
+	/**
220
+	 * set the Word Spacing
221
+	 *
222
+	 * @param float word spacing
223
+	 * @access public
224
+	 */
225
+	public function setWordSpacing($ws=0.)
226
+	{
227
+		$this->ws = $ws;
228
+		$this->_out(sprintf('%.3F Tw', $ws*$this->k));
229
+	}
230
+
231
+	/**
232
+	 * start to use a rectangular Cliping Path with radius corners
233
+	 *
234
+	 * @param float $x (top left corner)
235
+	 * @param float $y (top left corner)
236
+	 * @param float $w (x+w  = botom rigth corner)
237
+	 * @param float $h (y+h = botom rigth corner)
238
+	 * @param array $cornerTL radius of the Top Left corner
239
+	 * @param array $cornerTR radius of the Top Right corner
240
+	 * @param array $cornerBL radius of the Bottom Left corner
241
+	 * @param array $cornerBR radius of the Bottom Right corner
242
+	 * @access public
243
+	 */
244
+	public function clippingPathStart(
245
+		$x = null,
246
+		$y = null,
247
+		$w = null,
248
+		$h = null,
249
+		$cornerTL=null,
250
+		$cornerTR=null,
251
+		$cornerBL=null,
252
+		$cornerBR=null)
253
+	{
254
+		// init the path
255
+		$path = '';
256
+
257
+		// if we have the position and the size of the rectangle, we can proceed
258
+		if ($x!==null && $y!==null && $w!==null && $h!==null) {
259
+			// the positions of the rectangle's corners
260
+			$x1 = $x*$this->k;
261
+			$y1 = ($this->h-$y)*$this->k;
262
+
263
+			$x2 = ($x+$w)*$this->k;
264
+			$y2 = ($this->h-$y)*$this->k;
265
+
266
+			$x3 = ($x+$w)*$this->k;
267
+			$y3 = ($this->h-$y-$h)*$this->k;
268
+
269
+			$x4 = $x*$this->k;
270
+			$y4 = ($this->h-$y-$h)*$this->k;
271
+
272
+			// if we have at least one radius corner, then we proceed to a specific path, else it is just a rectangle
273
+			if ($cornerTL || $cornerTR || $cornerBL || $cornerBR) {
274
+				// prepare the radius values
275
+				if ($cornerTL) {
276
+					$cornerTL[0] = $cornerTL[0]*$this->k;
277
+					$cornerTL[1] =-$cornerTL[1]*$this->k;
278
+				}
279
+				if ($cornerTR) {
280
+					$cornerTR[0] = $cornerTR[0]*$this->k;
281
+					$cornerTR[1] =-$cornerTR[1]*$this->k;
282
+				}
283
+				if ($cornerBL) {
284
+					$cornerBL[0] = $cornerBL[0]*$this->k;
285
+					$cornerBL[1] =-$cornerBL[1]*$this->k;
286
+				}
287
+				if ($cornerBR) {
288
+					$cornerBR[0] = $cornerBR[0]*$this->k;
289
+					$cornerBR[1] =-$cornerBR[1]*$this->k;
290
+				}
291
+
292
+				// if TL radius then specific start else (X1,Y1)
293
+				if ($cornerTL) {
294
+					$path.= sprintf('%.2F %.2F m ', $x1+$cornerTL[0], $y1);
295
+				} else {
296
+					$path.= sprintf('%.2F %.2F m ', $x1, $y1);
297
+				}
298
+
299
+				// if TR radius then line + arc, else line to (X2,Y2)
300
+				if ($cornerTR) {
301
+					$xt1 = ($x2-$cornerTR[0])+$cornerTR[0]*self::MY_ARC;
302
+					$yt1 = ($y2+$cornerTR[1])-$cornerTR[1];
303
+					$xt2 = ($x2-$cornerTR[0])+$cornerTR[0];
304
+					$yt2 = ($y2+$cornerTR[1])-$cornerTR[1]*self::MY_ARC;
305
+
306
+					$path.= sprintf('%.2F %.2F l ', $x2-$cornerTR[0], $y2);
307
+					$path.= sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c ', $xt1, $yt1, $xt2, $yt2, $x2, $y2+$cornerTR[1]);
308
+				} else {
309
+					$path.= sprintf('%.2F %.2F l ', $x2, $y2);
310
+				}
311
+
312
+				// if BR radius then line + arc, else line to (X3, Y3)
313
+				if ($cornerBR) {
314
+					$xt1 = ($x3-$cornerBR[0])+$cornerBR[0];
315
+					$yt1 = ($y3-$cornerBR[1])+$cornerBR[1]*self::MY_ARC;
316
+					$xt2 = ($x3-$cornerBR[0])+$cornerBR[0]*self::MY_ARC;
317
+					$yt2 = ($y3-$cornerBR[1])+$cornerBR[1];
318
+
319
+					$path.= sprintf('%.2F %.2F l ', $x3, $y3-$cornerBR[1]);
320
+					$path.= sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c ', $xt1, $yt1, $xt2, $yt2, $x3-$cornerBR[0], $y3);
321
+				} else {
322
+					$path.= sprintf('%.2F %.2F l ', $x3, $y3);
323
+				}
324
+
325
+				// if BL radius then line + arc, else line to (X4, Y4)
326
+				if ($cornerBL) {
327
+					$xt1 = ($x4+$cornerBL[0])-$cornerBL[0]*self::MY_ARC;
328
+					$yt1 = ($y4-$cornerBL[1])+$cornerBL[1];
329
+					$xt2 = ($x4+$cornerBL[0])-$cornerBL[0];
330
+					$yt2 = ($y4-$cornerBL[1])+$cornerBL[1]*self::MY_ARC;
331
+
332
+					$path.= sprintf('%.2F %.2F l ', $x4+$cornerBL[0], $y4);
333
+					$path.= sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c ', $xt1, $yt1, $xt2, $yt2, $x4, $y4-$cornerBL[1]);
334
+				} else {
335
+					$path.= sprintf('%.2F %.2F l ', $x4, $y4);
336
+				}
337
+
338
+				// if RL radius then line + arc
339
+				if ($cornerTL) {
340
+					$xt1 = ($x1+$cornerTL[0])-$cornerTL[0];
341
+					$yt1 = ($y1+$cornerTL[1])-$cornerTL[1]*self::MY_ARC;
342
+					$xt2 = ($x1+$cornerTL[0])-$cornerTL[0]*self::MY_ARC;
343
+					$yt2 = ($y1+$cornerTL[1])-$cornerTL[1];
344
+
345
+					$path.= sprintf('%.2F %.2F l ', $x1, $y1+$cornerTL[1]);
346
+					$path.= sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c ', $xt1, $yt1, $xt2, $yt2, $x1+$cornerTL[0], $y1);
347
+				}
348
+			} else {
349
+				$path.= sprintf('%.2F %.2F m ', $x1, $y1);
350
+				$path.= sprintf('%.2F %.2F l ', $x2, $y2);
351
+				$path.= sprintf('%.2F %.2F l ', $x3, $y3);
352
+				$path.= sprintf('%.2F %.2F l ', $x4, $y4);
353
+			}
354
+
355
+			// close the path
356
+			$path.= ' h W n';
357
+		}
358
+
359
+		// using the path as a clipping path
360
+		$this->_out('q '.$path.' ');
361
+	}
362
+
363
+	/**
364
+	 * stop to use the Cliping Path
365
+	 *
366
+	 * @access public
367
+	 */
368
+	public function clippingPathStop()
369
+	{
370
+		$this->_out(' Q');
371
+	}
372
+
373
+	/**
374
+	 * draw a filled corner of a border with a external and a internal radius
375
+	 *         /--------+ ext2
376
+	 *        /         |
377
+	 *       /  /-------+ int2
378
+	 *      /  /
379
+	 *      | /
380
+	 *      | |
381
+	 *      | |
382
+	 * ext1 +-+ int1        + cen
383
+	 *
384
+	 * @param float $ext1X
385
+	 * @param float $ext1Y
386
+	 * @param float $ext2X
387
+	 * @param float $ext2Y
388
+	 * @param float $int1X
389
+	 * @param float $int1Y
390
+	 * @param float $int2X
391
+	 * @param float $int2Y
392
+	 * @param float $cenX
393
+	 * @param float $cenY
394
+	 * @access public
395
+	 */
396
+	public function drawCurve($ext1X, $ext1Y, $ext2X, $ext2Y, $int1X, $int1Y, $int2X, $int2Y, $cenX, $cenY)
397
+	{
398
+		// prepare the coordinates
399
+		$ext1X = $ext1X*$this->k;
400
+		$ext2X = $ext2X*$this->k;
401
+		$int1X = $int1X*$this->k;
402
+		$int2X = $int2X*$this->k;
403
+		$cenX  = $cenX*$this->k;
404
+
405
+		$ext1Y = ($this->h-$ext1Y)*$this->k;
406
+		$ext2Y = ($this->h-$ext2Y)*$this->k;
407
+		$int1Y = ($this->h-$int1Y)*$this->k;
408
+		$int2Y = ($this->h-$int2Y)*$this->k;
409
+		$cenY  = ($this->h-$cenY) *$this->k;
410
+
411
+		// init the curve
412
+		$path = '';
413
+
414
+		if ($ext1X-$cenX!=0) {
415
+			$xt1 = $cenX+($ext1X-$cenX);
416
+			$yt1 = $cenY+($ext2Y-$cenY)*self::MY_ARC;
417
+			$xt2 = $cenX+($ext1X-$cenX)*self::MY_ARC;
418
+			$yt2 = $cenY+($ext2Y-$cenY);
419
+		} else {
420
+			$xt1 = $cenX+($ext2X-$cenX)*self::MY_ARC;
421
+			$yt1 = $cenY+($ext1Y-$cenY);
422
+			$xt2 = $cenX+($ext2X-$cenX);
423
+			$yt2 = $cenY+($ext1Y-$cenY)*self::MY_ARC;
424
+		}
425
+		$path.= sprintf('%.2F %.2F m ', $ext1X, $ext1Y);
426
+		$path.= sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c ', $xt1, $yt1, $xt2, $yt2, $ext2X, $ext2Y);
427
+
428
+		if ($int1X-$cenX!=0) {
429
+			$xt1 = $cenX+($int1X-$cenX)*self::MY_ARC;
430
+			$yt1 = $cenY+($int2Y-$cenY);
431
+			$xt2 = $cenX+($int1X-$cenX);
432
+			$yt2 = $cenY+($int2Y-$cenY)*self::MY_ARC;
433
+		} else {
434
+			$xt1 = $cenX+($int2X-$cenX);
435
+			$yt1 = $cenY+($int1Y-$cenY)*self::MY_ARC;
436
+			$xt2 = $cenX+($int2X-$cenX)*self::MY_ARC;
437
+			$yt2 = $cenY+($int1Y-$cenY);
438
+		}
439
+		$path.= sprintf('%.2F %.2F l ', $int2X, $int2Y);
440
+		$path.= sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c ', $xt1, $yt1, $xt2, $yt2, $int1X, $int1Y);
441
+
442
+		// draw the curve
443
+		$this->_out($path . 'f');
444
+	}
445
+
446
+	/**
447
+	 * draw a filled corner of a border with only a external radius
448
+	 *         /--+ ext2
449
+	 *        /   |
450
+	 *       /    |
451
+	 *      /     |
452
+	 *      |     |
453
+	 *      |     |
454
+	 *      |     |
455
+	 * ext1 +-----+ int      + cen
456
+	 *
457
+	 * @param float $ext1X
458
+	 * @param float $ext1Y
459
+	 * @param float $ext2X
460
+	 * @param float $ext2Y
461
+	 * @param float $intX
462
+	 * @param float $intY
463
+	 * @param float $cenX
464
+	 * @param float $cenY
465
+	 * @access public
466
+	 */
467
+	public function drawCorner($ext1X, $ext1Y, $ext2X, $ext2Y, $intX, $intY, $cenX, $cenY)
468
+	{
469
+		// prepare the coordinates
470
+		$ext1X = $ext1X*$this->k;
471
+		$ext2X = $ext2X*$this->k;
472
+		$intX  = $intX*$this->k;
473
+		$cenX  = $cenX*$this->k;
474
+
475
+		$ext1Y = ($this->h-$ext1Y)*$this->k;
476
+		$ext2Y = ($this->h-$ext2Y)*$this->k;
477
+		$intY  = ($this->h-$intY)*$this->k;
478
+		$cenY  = ($this->h-$cenY)*$this->k;
479
+
480
+		// init the curve
481
+		$path = '';
482
+
483
+		if ($ext1X-$cenX!=0) {
484
+			$xt1 = $cenX+($ext1X-$cenX);
485
+			$yt1 = $cenY+($ext2Y-$cenY)*self::MY_ARC;
486
+			$xt2 = $cenX+($ext1X-$cenX)*self::MY_ARC;
487
+			$yt2 = $cenY+($ext2Y-$cenY);
488
+		} else {
489
+			$xt1 = $cenX+($ext2X-$cenX)*self::MY_ARC;
490
+			$yt1 = $cenY+($ext1Y-$cenY);
491
+			$xt2 = $cenX+($ext2X-$cenX);
492
+			$yt2 = $cenY+($ext1Y-$cenY)*self::MY_ARC;
493
+		}
494
+		$path.= sprintf('%.2F %.2F m ', $ext1X, $ext1Y);
495
+		$path.= sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c ', $xt1, $yt1, $xt2, $yt2, $ext2X, $ext2Y);
496
+		$path.= sprintf('%.2F %.2F l ', $intX, $intY);
497
+		$path.= sprintf('%.2F %.2F l ', $ext1X, $ext1Y);
498
+
499
+		// draw the curve
500
+		$this->_out($path . 'f');
501
+	}
502
+
503
+	/**
504
+	 * Start a transformation
505
+	 *
506
+	 * @access public
507
+	 */
508
+	public function startTransform()
509
+	{
510
+		$this->_out('q');
511
+	}
512
+
513
+	/**
514
+	 * Stop a transformation
515
+	 *
516
+	 * @access public
517
+	 */
518
+	public function stopTransform()
519
+	{
520
+		$this->_out('Q');
521
+	}
522
+
523
+	/**
524
+	 * add a Translate transformation
525
+	 *
526
+	 * @param float $Tx
527
+	 * @param float $Ty
528
+	 * @access public
529
+	 */
530
+	public function setTranslate($xT, $yT)
531
+	{
532
+		// Matrix for Translate
533
+		$tm[0]=1;
534
+		$tm[1]=0;
535
+		$tm[2]=0;
536
+		$tm[3]=1;
537
+		$tm[4]=$xT*$this->k;
538
+		$tm[5]=-$yT*$this->k;
539
+
540
+		// apply the Transform Matric
541
+		$this->_out(sprintf('%.3F %.3F %.3F %.3F %.3F %.3F cm', $tm[0], $tm[1], $tm[2], $tm[3], $tm[4], $tm[5]));
542
+	}
543
+
544
+	/**
545
+	 * add a Rotate transformation
546
+	 *
547
+	 * @param float $angle
548
+	 * @param float $Cx
549
+	 * @param float $Cy
550
+	 * @access public
551
+	 */
552
+	public function setRotation($angle, $xC=null, $yC=null)
553
+	{
554
+		// if no center, rotate around the current posiition
555
+		if($xC === null) $xC=$this->x;
556
+		if($yC === null) $yC=$this->y;
557
+
558
+		// prepare the coordinate
559
+		$yC=($this->h-$yC)*$this->k;
560
+		$xC*=$this->k;
561
+
562
+		// Matrix for Rotate
563
+		$tm[0]=cos(deg2rad($angle));
564
+		$tm[1]=sin(deg2rad($angle));
565
+		$tm[2]=-$tm[1];
566
+		$tm[3]=$tm[0];
567
+		$tm[4]=$xC+$tm[1]*$yC-$tm[0]*$xC;
568
+		$tm[5]=$yC-$tm[0]*$yC-$tm[1]*$xC;
569
+
570
+		// apply the Transform Matric
571
+		$this->_out(sprintf('%.3F %.3F %.3F %.3F %.3F %.3F cm', $tm[0], $tm[1], $tm[2], $tm[3], $tm[4], $tm[5]));
572
+	}
573
+
574
+	/**
575
+	 * we redifine the original SetX method, because we don't want the automatic treatment.
576
+	 * It is HTML2PDF that make the treatment
577
+	 *
578
+	 * @param float   $x
579
+	 * @param boolean $rtloff NOT USED
580
+	 * @access public
581
+	 */
582
+	public function SetX($x, $rtloff=false)
583
+	{
584
+		$this->x=$x;
585
+	}
586
+
587
+	/**
588
+	 * we redifine the original SetY method, because we don't want the automatic treatment.
589
+	 * It is HTML2PDF that make the treatment
590
+	 *
591
+	 * @param float   $y
592
+	 * @param boolean $resetx Reset the X position
593
+	 * @param boolean $rtloff NOT USED
594
+	 * @access public
595
+	 */
596
+	public function SetY($y, $resetx=true, $rtloff=false)
597
+	{
598
+		if ($resetx)
599
+			$this->x=$this->lMargin;
600
+
601
+		$this->y=$y;
602
+	}
603
+
604
+	/**
605
+	 * we redifine the original SetXY method, because we don't want the automatic treatment.
606
+	 * It is HTML2PDF that make the treatment
607
+	 *
608
+	 * @param integer $x
609
+	 * @param integer $y
610
+	 * @param boolean $rtloff NOT USED
611
+	 * @access public
612
+	 */
613
+	public function SetXY($x, $y, $rtloff=false)
614
+	{
615
+		$this->x=$x;
616
+		$this->y=$y;
617
+	}
618
+
619
+	/**
620
+	 * multiple public accessor because HTML2PDF need to use TCPDF without being a extend of it
621
+	 *
622
+	 * @param  mixed
623
+	 * @return mixed
624
+	 * @access public
625
+	 */
626
+	public function getK()
627
+	{
628
+		return $this->k;
629
+	}
630
+	public function getW()
631
+	{
632
+		return $this->w;
633
+	}
634
+	public function getH()
635
+	{
636
+		return $this->h;
637
+	}
638
+	public function getlMargin()
639
+	{
640
+		return $this->lMargin;
641
+	}
642
+	public function getrMargin()
643
+	{
644
+		return $this->rMargin;
645
+	}
646
+	public function gettMargin()
647
+	{
648
+		return $this->tMargin;
649
+	}
650
+	public function getbMargin()
651
+	{
652
+		return $this->bMargin;
653
+	}
654
+	public function setbMargin($v)
655
+	{
656
+		$this->bMargin=$v;
657
+	}
658
+
659
+	/**
660
+	 * SVG - Convert a SVG Style in PDF Style
661
+	 *
662
+	 * @param  array  $styles SVG Style
663
+	 * @return string PDF style
664
+	 * @access public
665
+	 */
666
+	public function svgSetStyle($styles)
667
+	{
668
+		// init the PDF style
669
+		$style = '';
670
+
671
+		// Style : fill
672
+		if ($styles['fill']) {
673
+			$this->setFillColorArray($styles['fill']);
674
+			$style.= 'F';
675
+		}
676
+
677
+		// Style : stroke
678
+		if ($styles['stroke'] && $styles['stroke-width']) {
679
+			$this->SetDrawColorArray($styles['stroke']);
680
+			$this->SetLineWidth($styles['stroke-width']);
681
+			$style.= 'D';
682
+		}
683
+
684
+		// Style : opacity
685
+		if ($styles['fill-opacity']) {
686
+			$this->SetAlpha($styles['fill-opacity']);
687
+		}
688
+
689
+		return $style;
690
+	}
691
+
692
+	/**
693
+	 * SVG - make a Rectangle
694
+	 *
695
+	 * @param float $x
696
+	 * @param float $y
697
+	 * @param float $w
698
+	 * @param float $h
699
+	 * @param string $style PDF Style
700
+	 * @access public
701
+	 */
702
+	public function svgRect($x, $y, $w, $h, $style)
703
+	{
704
+		// prepare the 4 corners
705
+		$x1=$x;
706
+		$x2=$x+$w;
707
+		$x3=$x+$w;
708
+		$x4=$x;
709
+
710
+		$y1=$y;
711
+		$y2=$y;
712
+		$y3=$y+$h;
713
+		$y4=$y+$h;
714
+
715
+		// get the Closing operator from the PDF Style
716
+		if($style=='F') $op='f';
717
+		elseif($style=='FD' || $style=='DF') $op='B';
718
+		else $op='S';
719
+
720
+		// drawing
721
+		$this->_Point($x1, $y1, true);
722
+		$this->_Line($x2, $y2, true);
723
+		$this->_Line($x3, $y3, true);
724
+		$this->_Line($x4, $y4, true);
725
+		$this->_Line($x1, $y1, true);
726
+		$this->_out($op);
727
+	}
728
+
729
+	/**
730
+	 * SVG - make a Line
731
+	 *
732
+	 * @param float $x1
733
+	 * @param float $y1
734
+	 * @param float $x2
735
+	 * @param float $y2
736
+	 * @access public
737
+	 */
738
+	public function svgLine($x1, $y1, $x2, $y2)
739
+	{
740
+		// get the Closing operator
741
+		$op='S';
742
+
743
+		// drawing
744
+		$this->_Point($x1, $y1, true);
745
+		$this->_Line($x2, $y2, true);
746
+		$this->_out($op);
747
+	}
748
+
749
+	/**
750
+	 * SVG - make a Ellipse
751
+	 *
752
+	 * @param float  $x0 x Center
753
+	 * @param float  $y0 y Center
754
+	 * @param float  $rx x radius
755
+	 * @param float  $ry y radius
756
+	 * @param string $style PDF Style
757
+	 * @access public
758
+	 */
759
+	public function svgEllipse($x0, $y0, $rx, $ry, $style)
760
+	{
761
+		// get the Closing operator from the PDF Style
762
+		if($style=='F') $op='f';
763
+		elseif($style=='FD' || $style=='DF') $op='B';
764
+		else $op='S';
765
+
766
+		// drawing
767
+		$this->_Arc($x0, $y0, $rx, $ry, 0, 2*M_PI, true, true, true);
768
+		$this->_out($op);
769
+	}
770
+
771
+	/**
772
+	 * SVG - make a Advanced Polygone
773
+	 *
774
+	 * @param array  $actions list of actions
775
+	 * @param string $style PDF Style
776
+	 * @access public
777
+	 */
778
+	public function svgPolygone($actions, $style)
779
+	{
780
+		// get the Closing operator from the PDF Style
781
+		if($style=='F') $op='f';
782
+		elseif($style=='FD' || $style=='DF') $op='B';
783
+		else $op='S';
784
+
785
+		// To save the First action and the last point
786
+		$first = array('', 0, 0);
787
+		$last = array(0, 0, 0, 0);
788
+
789
+		foreach ($actions as $action) {
790
+			switch($action[0])
791
+			{
792
+				// Start the Path
793
+				case 'M':
794
+				case 'm':
795
+					$first = $action;
796
+					$x = $action[1]; $y = $action[2]; $xc = $x; $yc = $y;
797
+					$this->_Point($x, $y, true);
798
+					break;
799
+
800
+				// Close the Path
801
+				case 'Z':
802
+				case 'z':
803
+					$x = $first[1]; $y = $first[2]; $xc = $x; $yc = $y;
804
+					$this->_Line($x, $y, true);
805
+					break;
806
+
807
+				// Make a Line (new point)
808
+				case 'L':
809
+					$x = $action[1]; $y = $action[2]; $xc = $x; $yc = $y;
810
+					$this->_Line($x, $y, true);
811
+					break;
812
+
813
+				// Make a Line (vector from last point)
814
+				case 'l':
815
+					$x = $last[0]+$action[1]; $y = $last[1]+$action[2]; $xc = $x; $yc = $y;
816
+					$this->_Line($x, $y, true);
817
+					break;
818
+
819
+				// Make a Horizontal Line (new point)
820
+				case 'H':
821
+					$x = $action[1]; $y = $last[1]; $xc = $x; $yc = $y;
822
+					$this->_Line($x, $y, true);
823
+					break;
824
+
825
+				// Make a Horisontal Line (vector from last point)
826
+				case 'h':
827
+					$x = $last[0]+$action[1]; $y = $last[1]; $xc = $x; $yc = $y;
828
+					$this->_Line($x, $y, true);
829
+					break;
830
+
831
+				// Make a Vertical Line (new point)
832
+				case 'V':
833
+					$x = $last[0]; $y = $action[1]; $xc = $x; $yc = $y;
834
+					$this->_Line($x, $y, true);
835
+					break;
836
+
837
+				// Make a Vertical Line (vector from last point)
838
+				case 'v':
839
+					$x = $last[0]; $y = $last[1]+$action[1]; $xc = $x; $yc = $y;
840
+					$this->_Line($x, $y, true);
841
+					break;
842
+
843
+				// Make a Arc (new point)
844
+				case 'A':
845
+					$rx = $action[1];   // rx
846
+					$ry = $action[2];   // ry
847
+					$a = $action[3];    // deviation angle of the axis X
848
+					$l = $action[4];    // large-arc-flag
849
+					$s = $action[5];    // sweep-flag
850
+					$x1 = $last[0];     // begin x
851
+					$y1 = $last[1];     // begin y
852
+					$x2 = $action[6];   // final x
853
+					$y2 = $action[7];   // final y
854
+
855
+					$this->_Arc2($x1, $y1, $x2, $y2, $rx, $ry, $a, $l, $s, true);
856
+					$x = $x2; $y = $y2; $xc = $x; $yc = $y;
857
+					break;
858
+
859
+				// Make a Arc (vector from last point)
860
+				case 'a':
861
+					$rx = $action[1];   // rx
862
+					$ry = $action[2];   // ry
863
+					$a = $action[3];    // deviation angle of the axis X
864
+					$l = $action[4];    // large-arc-flag
865
+					$s = $action[5];    // sweep-flag
866
+					$x1 = $last[0];     // begin x
867
+					$y1 = $last[1];     // begin y
868
+					$x2 = $last[0]+$action[6]; // final x
869
+					$y2 = $last[1]+$action[7]; // final y
870
+
871
+					$this->_Arc2($x1, $y1, $x2, $y2, $rx, $ry, $a, $l, $s, true);
872
+					$x = $x2; $y = $y2; $xc = $x; $yc = $y;
873
+					break;
874
+
875
+				// Make a Bezier Curve (new point)
876
+				case 'C':
877
+					$x1 = $action[1];
878
+					$y1 = $action[2];
879
+					$x2 = $action[3];
880
+					$y2 = $action[4];
881
+					$xf = $action[5];
882
+					$yf = $action[6];
883
+					$this->_Curve($x1, $y1, $x2, $y2, $xf, $yf, true);
884
+					$x = $xf; $y = $yf; $xc = $x2; $yc = $y2;
885
+					break;
886
+
887
+				// Make a Bezier Curve (vector from last point)
888
+				case 'c':
889
+					$x1 = $last[0]+$action[1];
890
+					$y1 = $last[1]+$action[2];
891
+					$x2 = $last[0]+$action[3];
892
+					$y2 = $last[1]+$action[4];
893
+					$xf = $last[0]+$action[5];
894
+					$yf = $last[1]+$action[6];
895
+					$this->_Curve($x1, $y1, $x2, $y2, $xf, $yf, true);
896
+					$x = $xf; $y = $yf; $xc = $x2; $yc = $y2;
897
+					break;
898
+
899
+				// Unknown Path
900
+				default:
901
+					throw new HTML2PDF_exception(0, 'SVG Path Error : ['.$action[0].'] unkown');
902
+			}
903
+
904
+			// save the last point
905
+			$last = array($x, $y, $xc, $yc);
906
+		}
907
+
908
+		// finish the path
909
+		$this->_out($op);
910
+	}
911
+
912
+	/**
913
+	 * SVG - go to a point
914
+	 *
915
+	 * @param float   $x
916
+	 * @param float   $y
917
+	 * @param boolean $trans apply transformation
918
+	 * @access protected
919
+	 */
920
+	protected function _Point($x, $y, $trans = false)
921
+	{
922
+		if ($trans) $this->ptTransform($x, $y);
923
+
924
+		$this->_out(sprintf('%.2F %.2F m', $x, $y));
925
+	}
926
+
927
+	/**
928
+	 * SVG - make a line from the last point to (x,y)
929
+	 *
930
+	 * @param float   $x
931
+	 * @param float   $y
932
+	 * @param boolean $trans apply transformation
933
+	 * @access protected
934
+	 */
935
+	protected function _Line($x, $y, $trans = false)
936
+	{
937
+		if ($trans) $this->ptTransform($x, $y);
938
+
939
+		$this->_out(sprintf('%.2F %.2F l', $x, $y));
940
+	}
941
+
942
+	/**
943
+	 * SVG - make a bezier curve from the last point to (xf,yf), with the 2 direction points (x1,y1) and (x2,y2)
944
+	 *
945
+	 * @param float $x1
946
+	 * @param float $y1
947
+	 * @param float $x2
948
+	 * @param float $y2
949
+	 * @param float $xf
950
+	 * @param float $yf
951
+	 * @param boolean $trans apply transformation
952
+	 * @access protected
953
+	 */
954
+	protected function _Curve($x1, $y1, $x2, $y2, $xf, $yf, $trans = false)
955
+	{
956
+		if ($trans) {
957
+			$this->ptTransform($x1, $y1);
958
+			$this->ptTransform($x2, $y2);
959
+			$this->ptTransform($xf, $yf);
960
+		}
961
+		$this->_out(sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c', $x1, $y1, $x2, $y2, $xf, $yf));
962
+	}
963
+
964
+	/**
965
+	 * SVG - make a arc with Center, Radius, from angleBegin to angleEnd
966
+	 *
967
+	 * @param float $xc
968
+	 * @param float $yc
969
+	 * @param float $rx
970
+	 * @param float $ry
971
+	 * @param float $angleBegin in radians
972
+	 * @param float $angleEng in radians
973
+	 * @param boolean $direction
974
+	 * @param boolean $drawFirst, true => add the first point
975
+	 * @param boolean $trans apply transformation
976
+	 * @access protected
977
+	 */
978
+	protected function _Arc(
979
+		$xc,
980
+		$yc,
981
+		$rx,
982
+		$ry,
983
+		$angleBegin,
984
+		$angleEnd,
985
+		$direction = true,
986
+		$drawFirst = true,
987
+		$trans=false)
988
+	{
989
+		// if we want the no trigo direction : add 2PI to the begin angle, to invert the direction
990
+		if (!$direction) $angleBegin+= M_PI*2.;
991
+
992
+		// cut in segment to convert in berize curv
993
+		$dt = ($angleEnd - $angleBegin)/self::ARC_NB_SEGMENT;
994
+		$dtm = $dt/3;
995
+
996
+		// center of the arc
997
+		$x0 = $xc; $y0 = $yc;
998
+
999
+		// calculing the first point
1000
+		$t1 = $angleBegin;
1001
+		$a0 = $x0 + ($rx * cos($t1));
1002
+		$b0 = $y0 + ($ry * sin($t1));
1003
+		$c0 = -$rx * sin($t1);
1004
+		$d0 = $ry * cos($t1);
1005
+
1006
+		// if drawFirst => draw the first point
1007
+		if ($drawFirst) $this->_Point($a0, $b0, $trans);
1008
+
1009
+		// foreach segment
1010
+		for ($i = 1; $i <= self::ARC_NB_SEGMENT; $i++) {
1011
+			// calculing the next point
1012
+			$t1 = ($i * $dt)+$angleBegin;
1013
+			$a1 = $x0 + ($rx * cos($t1));
1014
+			$b1 = $y0 + ($ry * sin($t1));
1015
+			$c1 = -$rx * sin($t1);
1016
+			$d1 = $ry * cos($t1);
1017
+
1018
+			// make the bezier curv
1019
+			$this->_Curve(
1020
+				$a0 + ($c0 * $dtm), $b0 + ($d0 * $dtm),
1021
+				$a1 - ($c1 * $dtm), $b1 - ($d1 * $dtm),
1022
+				$a1, $b1,
1023
+				$trans
1024
+			);
1025
+
1026
+			// save the point
1027
+			$a0 = $a1;
1028
+			$b0 = $b1;
1029
+			$c0 = $c1;
1030
+			$d0 = $d1;
1031
+		}
1032
+	}
1033
+
1034
+	/**
1035
+	 * SVG - make a arc from Pt1 to Pt2, with Radius
1036
+	 *
1037
+	 * @param float $x1
1038
+	 * @param float $y1
1039
+	 * @param float $x2
1040
+	 * @param float $y2
1041
+	 * @param float $rx
1042
+	 * @param float $ry
1043
+	 * @param float $angle deviation angle of the axis X
1044
+	 * @param boolean $l large-arc-flag
1045
+	 * @param boolean $s sweep-flag
1046
+	 * @param boolean $trans apply transformation
1047
+	 * @access protected
1048
+	 */
1049
+	protected function _Arc2($x1, $y1, $x2, $y2, $rx, $ry, $angle=0., $l=0, $s=0, $trans = false)
1050
+	{
1051
+		// array to stock the parameters
1052
+		$v = array();
1053
+
1054
+		// the original values
1055
+		$v['x1'] = $x1;
1056
+		$v['y1'] = $y1;
1057
+		$v['x2'] = $x2;
1058
+		$v['y2'] = $y2;
1059
+		$v['rx'] = $rx;
1060
+		$v['ry'] = $ry;
1061
+
1062
+		// rotate with the deviation angle of the axis X
1063
+		$v['xr1'] = $v['x1']*cos($angle) - $v['y1']*sin($angle);
1064
+		$v['yr1'] = $v['x1']*sin($angle) + $v['y1']*cos($angle);
1065
+		$v['xr2'] = $v['x2']*cos($angle) - $v['y2']*sin($angle);
1066
+		$v['yr2'] = $v['x2']*sin($angle) + $v['y2']*cos($angle);
1067
+
1068
+		// the normalized vector
1069
+		$v['Xr1'] = $v['xr1']/$v['rx'];
1070
+		$v['Yr1'] = $v['yr1']/$v['ry'];
1071
+		$v['Xr2'] = $v['xr2']/$v['rx'];
1072
+		$v['Yr2'] = $v['yr2']/$v['ry'];
1073
+		$v['dXr'] = $v['Xr2']-$v['Xr1'];
1074
+		$v['dYr'] = $v['Yr2']-$v['Yr1'];
1075
+		$v['D'] = $v['dXr']*$v['dXr'] + $v['dYr']*$v['dYr'];
1076
+
1077
+		// if |vector| is Null, or if |vector| > 2 : impossible to make a arc => Line
1078
+		if ($v['D']==0 || $v['D']>4) {
1079
+			$this->_Line($x2, $y2, $trans);
1080
+			return false;
1081
+		}
1082
+
1083
+		// convert paramters for make a arc with Center, Radius, from angleBegin to angleEnd
1084
+		$v['s1'] = array();
1085
+		$v['s1']['t'] = sqrt((4.-$v['D'])/$v['D']);
1086
+		$v['s1']['Xr'] = ($v['Xr1']+$v['Xr2'])/2. + $v['s1']['t']*($v['Yr2']-$v['Yr1'])/2.;
1087
+		$v['s1']['Yr'] = ($v['Yr1']+$v['Yr2'])/2. + $v['s1']['t']*($v['Xr1']-$v['Xr2'])/2.;
1088
+		$v['s1']['xr'] = $v['s1']['Xr']*$v['rx'];
1089
+		$v['s1']['yr'] = $v['s1']['Yr']*$v['ry'];
1090
+		$v['s1']['x'] = $v['s1']['xr']*cos($angle)+$v['s1']['yr']*sin($angle);
1091
+		$v['s1']['y'] =-$v['s1']['xr']*sin($angle)+$v['s1']['yr']*cos($angle);
1092
+		$v['s1']['a1'] = atan2($v['y1']-$v['s1']['y'], $v['x1']-$v['s1']['x']);
1093
+		$v['s1']['a2'] = atan2($v['y2']-$v['s1']['y'], $v['x2']-$v['s1']['x']);
1094
+		if ($v['s1']['a1']>$v['s1']['a2']) $v['s1']['a1']-=2*M_PI;
1095
+
1096
+		$v['s2'] = array();
1097
+		$v['s2']['t'] = -$v['s1']['t'];
1098
+		$v['s2']['Xr'] = ($v['Xr1']+$v['Xr2'])/2. + $v['s2']['t']*($v['Yr2']-$v['Yr1'])/2.;
1099
+		$v['s2']['Yr'] = ($v['Yr1']+$v['Yr2'])/2. + $v['s2']['t']*($v['Xr1']-$v['Xr2'])/2.;
1100
+		$v['s2']['xr'] = $v['s2']['Xr']*$v['rx'];
1101
+		$v['s2']['yr'] = $v['s2']['Yr']*$v['ry'];
1102
+		$v['s2']['x'] = $v['s2']['xr']*cos($angle)+$v['s2']['yr']*sin($angle);
1103
+		$v['s2']['y'] =-$v['s2']['xr']*sin($angle)+$v['s2']['yr']*cos($angle);
1104
+		$v['s2']['a1'] = atan2($v['y1']-$v['s2']['y'], $v['x1']-$v['s2']['x']);
1105
+		$v['s2']['a2'] = atan2($v['y2']-$v['s2']['y'], $v['x2']-$v['s2']['x']);
1106
+		if ($v['s2']['a1']>$v['s2']['a2']) $v['s2']['a1']-=2*M_PI;
1107
+
1108
+		if (!$l) {
1109
+			if ($s) {
1110
+				$xc = $v['s2']['x'];
1111
+				$yc = $v['s2']['y'];
1112
+				$a1 = $v['s2']['a1'];
1113
+				$a2 = $v['s2']['a2'];
1114
+				$this->_Arc($xc, $yc, $rx, $ry, $a1, $a2, true, false, $trans);
1115
+			} else {
1116
+				$xc = $v['s1']['x'];
1117
+				$yc = $v['s1']['y'];
1118
+				$a1 = $v['s1']['a1'];
1119
+				$a2 = $v['s1']['a2'];
1120
+				$this->_Arc($xc, $yc, $rx, $ry, $a1, $a2, false, false, $trans);
1121
+			}
1122
+		} else {
1123
+			if ($s) {
1124
+				$xc = $v['s1']['x'];
1125
+				$yc = $v['s1']['y'];
1126
+				$a1 = $v['s1']['a1'];
1127
+				$a2 = $v['s1']['a2'];
1128
+				$this->_Arc($xc, $yc, $rx, $ry, $a1, $a2, true, false, $trans);
1129
+			} else {
1130
+				$xc = $v['s2']['x'];
1131
+				$yc = $v['s2']['y'];
1132
+				$a1 = $v['s2']['a1'];
1133
+				$a2 = $v['s2']['a2'];
1134
+				$this->_Arc($xc, $yc, $rx, $ry, $a1, $a2, false, false, $trans);
1135
+			}
1136
+		}
1137
+	}
1138
+
1139
+	/**
1140
+	 * SVG - transform the point (reference)
1141
+	 *
1142
+	 * @param float &$x
1143
+	 * @param float &$y
1144
+	 * @param boolean $trans true => convert into PDF unit
1145
+	 * @return boolean
1146
+	 * @access public
1147
+	 */
1148
+	public function ptTransform(&$x,  &$y, $trans=true)
1149
+	{
1150
+		// load the last Transfomation Matrix
1151
+		$nb = count($this->_transf);
1152
+		if ($nb)    $m = $this->_transf[$nb-1];
1153
+		else        $m = array(1,0,0,1,0,0);
1154
+
1155
+		// apply the Transformation Matrix
1156
+		list($x,$y) = array(($x*$m[0]+$y*$m[2]+$m[4]),($x*$m[1]+$y*$m[3]+$m[5]));
1157
+
1158
+		// if true => convert into PDF unit
1159
+		if ($trans) {
1160
+			$x = $x*$this->k;
1161
+			$y = ($this->h-$y)*$this->k;
1162
+		}
1163
+
1164
+		return true;
1165
+	}
1166
+
1167
+	/**
1168
+	 * SVG - add a transformation Matric
1169
+	 *
1170
+	 * @param array $n matrix
1171
+	 * @access public
1172
+	 */
1173
+	public function doTransform($n = null)
1174
+	{
1175
+		// get the last Transformation Matrix
1176
+		$nb = count($this->_transf);
1177
+		if ($nb)    $m = $this->_transf[$nb-1];
1178
+		else        $m = array(1,0,0,1,0,0);
1179
+
1180
+		// if no transform, get the Identity Matrix
1181
+		if (!$n) $n = array(1,0,0,1,0,0);
1182
+
1183
+		// create the new Transformation Matrix
1184
+		$this->_transf[] = array(
1185
+			$m[0]*$n[0]+$m[2]*$n[1],
1186
+			$m[1]*$n[0]+$m[3]*$n[1],
1187
+			$m[0]*$n[2]+$m[2]*$n[3],
1188
+			$m[1]*$n[2]+$m[3]*$n[3],
1189
+			$m[0]*$n[4]+$m[2]*$n[5]+$m[4],
1190
+			$m[1]*$n[4]+$m[3]*$n[5]+$m[5]
1191
+		);
1192
+	}
1193
+
1194
+	/**
1195
+	 * SVG - remove a transformation Matric
1196
+	 *
1197
+	 * @access public
1198
+	 */
1199
+	public function undoTransform()
1200
+	{
1201
+		array_pop($this->_transf);
1202
+	}
1203
+
1204
+	/**
1205
+	 * Convert a HTML2PDF barcode in a TCPDF barcode
1206
+	 *
1207
+	 * @param string $code code to print
1208
+	 * @param string $type type of barcode (see tcpdf/barcodes.php for supported formats)
1209
+	 * @param int $x x position in user units
1210
+	 * @param int $y y position in user units
1211
+	 * @param int $w width in user units
1212
+	 * @param int $h height in user units
1213
+	 * @param int $labelFontsize of the Test Label. If false : no Label
1214
+	 * @param array $color color of the foreground
1215
+	 * @access public
1216
+	 */
1217
+	public function myBarcode($code, $type, $x, $y, $w, $h, $labelFontsize, $color)
1218
+	{
1219
+		// the style of the barcode
1220
+		$style = array(
1221
+			'position' => 'S',
1222
+			'text' => ($labelFontsize ? true : false),
1223
+			'fgcolor' => $color,
1224
+			'bgcolor' => false,
1225
+		);
1226
+
1227
+		// build the barcode
1228
+		$this->write1DBarcode($code, $type, $x, $y, $w, $h, '', $style, 'N');
1229
+
1230
+		// it Label => add the FontSize to the height
1231
+		if ($labelFontsize) $h+= ($labelFontsize);
1232
+
1233
+		// return the size of the barcode
1234
+		return array($w, $h);
1235
+	}
1236
+
1237
+	/**
1238
+	 * create a automatic Index on a page
1239
+	 *
1240
+	 * @param html2pdf $obj           parent object
1241
+	 * @param string   $titre         Title of the Index Page
1242
+	 * @param integer  $sizeTitle     Font size for hthe Title
1243
+	 * @param integer  $sizeBookmark  Font size for the bookmarks
1244
+	 * @param boolean  $bookmarkTitle Bookmark the Title
1245
+	 * @param boolean  $displayPage   Display the page number for each bookmark
1246
+	 * @param integer  $page draw the automatic Index on a specific Page. if null => add a page at the end
1247
+	 * @param string   $fontName      FontName to use
1248
+	 * @access public
1249
+	 */
1250
+	public function createIndex(
1251
+		&$obj,
1252
+		$titre = 'Index',
1253
+		$sizeTitle = 20,
1254
+		$sizeBookmark = 15,
1255
+		$bookmarkTitle = true,
1256
+		$displayPage = true,
1257
+		$page = null,
1258
+		$fontName = 'helvetica')
1259
+	{
1260
+		// bookmark the Title if wanted
1261
+		if ($bookmarkTitle) $this->Bookmark($titre, 0, -1);
1262
+
1263
+		// display the Title with the good Font size
1264
+		$this->SetFont($fontName, '', $sizeTitle);
1265
+		$this->Cell(0, 5, $titre, 0, 1, 'C');
1266
+
1267
+		// set the good Font size for the bookmarks
1268
+		$this->SetFont($fontName, '', $sizeBookmark);
1269
+		$this->Ln(10);
1270
+
1271
+		// get the number of bookmarks
1272
+		$size=sizeof($this->outlines);
1273
+
1274
+		// get the size of the "P. xx" cell
1275
+		$pageCellSize=$this->GetStringWidth('p. '.$this->outlines[$size-1]['p'])+2;
1276
+
1277
+		// Foreach bookmark
1278
+		for ($i=0;$i<$size;$i++) {
1279
+			// if we need a new page => add a new page
1280
+			if ($this->getY()+$this->FontSize>=($this->h - $this->bMargin)) {
1281
+				$obj->_INDEX_NewPage($page);
1282
+				$this->SetFont($fontName, '', $sizeBookmark);
1283
+			}
1284
+
1285
+			// Offset of the current level
1286
+			$level=$this->outlines[$i]['l'];
1287
+			if($level>0) $this->Cell($level*8);
1288
+
1289
+			// Caption (cut to fit on the width page)
1290
+			$str=$this->outlines[$i]['t'];
1291
+			$strsize=$this->GetStringWidth($str);
1292
+			$availableSize=$this->w-$this->lMargin-$this->rMargin-$pageCellSize-($level*8)-4;
1293
+			while ($strsize>=$availableSize) {
1294
+				$str=substr($str, 0, -1);
1295
+				$strsize=$this->GetStringWidth($str);
1296
+			}
1297
+
1298
+			// if we want to display the page nmber
1299
+			if ($displayPage) {
1300
+				// display the Bookmark Caption
1301
+				$this->Cell($strsize+2, $this->FontSize+2, $str);
1302
+
1303
+				//Filling dots
1304
+				$w=$this->w-$this->lMargin-$this->rMargin-$pageCellSize-($level*8)-($strsize+2);
1305
+				$nb=$w/$this->GetStringWidth('.');
1306
+				$dots=str_repeat('.', $nb);
1307
+				$this->Cell($w, $this->FontSize+2, $dots, 0, 0, 'R');
1308
+
1309
+				//Page number
1310
+				$this->Cell($pageCellSize, $this->FontSize+2, 'p. '.$this->outlines[$i]['p'], 0, 1, 'R');
1311
+			} else {
1312
+				// display the Bookmark Caption
1313
+				$this->Cell($strsize+2, $this->FontSize+2, $str, 0, 1);
1314
+			}
1315
+		}
1316
+	}
1317
+
1318
+	/**
1319
+	 * Returns the string alias used for the total number of pages.
1320
+	 *
1321
+	 * @access public
1322
+	 * @return string;
1323
+	 * @see TCPDF::getAliasNbPages(), TCPDF::getPageGroupAlias()
1324
+	 */
1325
+	public function getMyAliasNbPages()
1326
+	{
1327
+		if ($this->_myLastPageGroupNb==0) {
1328
+			return $this->getAliasNbPages();
1329
+		} else {
1330
+			$old = $this->currpagegroup;
1331
+			$this->currpagegroup = '{nb'.$this->_myLastPageGroupNb.'}';
1332
+			$new = $this->getPageGroupAlias();
1333
+			$this->currpagegroup = $old;
1334
+
1335
+			return $new;
1336
+		}
1337
+	}
1338
+
1339
+	/**
1340
+	 * Returns the current page number.
1341
+	 *
1342
+	 * @access public
1343
+	 * @param  integer $page
1344
+	 * @return integer;
1345
+	 */
1346
+	public function getMyNumPage($page=null)
1347
+	{
1348
+		if ($page===null) {
1349
+			$page = $this->page;
1350
+		}
1351
+
1352
+		if ($this->_myLastPageGroupNb==0) {
1353
+			return $page;
1354
+		} else {
1355
+			return $page-$this->_myLastPageGroup;
1356
+		}
1357
+	}
1358
+
1359
+	/**
1360
+	 * Start a new group of pages
1361
+	 *
1362
+	 * @access public
1363
+	 * @return integer;
1364
+	 * @see tcpdf::startPageGroup
1365
+	 */
1366
+	public function myStartPageGroup()
1367
+	{
1368
+		$this->_myLastPageGroup = $this->page-1;
1369
+		$this->_myLastPageGroupNb++;
1370
+	}
1371
+
1372
+	/**
1373
+	 * get $_myLastPageGroup;
1374
+	 *
1375
+	 * @access public
1376
+	 * @return integer $_myLastPageGroup;
1377
+	 */
1378
+	public function getMyLastPageGroup()
1379
+	{
1380
+		return $this->_myLastPageGroup;
1381
+	}
1382
+
1383
+	/**
1384
+	 * set $_myLastPageGroup;
1385
+	 *
1386
+	 * @access public
1387
+	 * @param integer $myLastPageGroup;
1388
+	 */
1389
+	public function setMyLastPageGroup($myLastPageGroup)
1390
+	{
1391
+		$this->_myLastPageGroup = $myLastPageGroup;
1392
+	}
1393
+
1394
+	/**
1395
+	 * get $_myLastPageGroupNb;
1396
+	 *
1397
+	 * @access public
1398
+	 * @return integer $_myLastPageGroupNb;
1399
+	 */
1400
+	public function getMyLastPageGroupNb()
1401
+	{
1402
+		return $this->_myLastPageGroupNb;
1403
+	}
1404
+
1405
+	/**
1406
+	 * set $_myLastPageGroupNb;
1407
+	 *
1408
+	 * @access public
1409
+	 * @param integer $myLastPageGroupNb;
1410
+	 */
1411
+	public function setMyLastPageGroupNb($myLastPageGroupNb)
1412
+	{
1413
+		$this->_myLastPageGroupNb = $myLastPageGroupNb;
1414
+	}
1415 1415
 }
Please login to merge, or discard this patch.
Spacing   +282 added lines, -282 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 /**
3 3
  * HTML2PDF Librairy - myPdf class
4 4
  *
@@ -9,8 +9,8 @@  discard block
 block discarded – undo
9 9
  * @version   4.03
10 10
  */
11 11
 
12
-require_once(dirname(__FILE__).'/tcpdfConfig.php');
13
-require_once(dirname(__FILE__).'/../_tcpdf_'.HTML2PDF_USED_TCPDF_VERSION.'/tcpdf.php');
12
+require_once(dirname(__FILE__) . '/tcpdfConfig.php');
13
+require_once(dirname(__FILE__) . '/../_tcpdf_' . HTML2PDF_USED_TCPDF_VERSION . '/tcpdf.php');
14 14
 
15 15
 class HTML2PDF_myPdf extends TCPDF
16 16
 {
@@ -37,12 +37,12 @@  discard block
 block discarded – undo
37 37
      * @access public
38 38
      */
39 39
     public function __construct(
40
-        $orientation='P',
41
-        $unit='mm',
42
-        $format='A4',
43
-        $unicode=true,
44
-        $encoding='UTF-8',
45
-        $diskcache=false)
40
+        $orientation = 'P',
41
+        $unit = 'mm',
42
+        $format = 'A4',
43
+        $unicode = true,
44
+        $encoding = 'UTF-8',
45
+        $diskcache = false)
46 46
     {
47 47
         // call the parent constructor
48 48
         parent::__construct($orientation, $unit, $format, $unicode, $encoding, $diskcache);
@@ -93,19 +93,19 @@  discard block
 block discarded – undo
93 93
             $txt = (HTML2PDF_locale::get('pdf05'));
94 94
         }
95 95
         if ($this->_footerParam['date'] && $this->_footerParam['hour']) {
96
-            $txt.= ($txt ? ' - ' : '').(HTML2PDF_locale::get('pdf03'));
96
+            $txt .= ($txt ? ' - ' : '') . (HTML2PDF_locale::get('pdf03'));
97 97
         }
98 98
         if ($this->_footerParam['date'] && !$this->_footerParam['hour']) {
99
-            $txt.= ($txt ? ' - ' : '').(HTML2PDF_locale::get('pdf01'));
99
+            $txt .= ($txt ? ' - ' : '') . (HTML2PDF_locale::get('pdf01'));
100 100
         }
101 101
         if (!$this->_footerParam['date'] && $this->_footerParam['hour']) {
102
-            $txt.= ($txt ? ' - ' : '').(HTML2PDF_locale::get('pdf02'));
102
+            $txt .= ($txt ? ' - ' : '') . (HTML2PDF_locale::get('pdf02'));
103 103
         }
104 104
         if ($this->_footerParam['page']) {
105
-            $txt.= ($txt ? ' - ' : '').(HTML2PDF_locale::get('pdf04'));
105
+            $txt .= ($txt ? ' - ' : '') . (HTML2PDF_locale::get('pdf04'));
106 106
         }
107 107
 
108
-        if (strlen($txt)>0) {
108
+        if (strlen($txt) > 0) {
109 109
             // replace some values
110 110
             $toReplace = array(
111 111
                 '[[date_d]]'  => date('d'),
@@ -222,10 +222,10 @@  discard block
 block discarded – undo
222 222
      * @param float word spacing
223 223
      * @access public
224 224
      */
225
-    public function setWordSpacing($ws=0.)
225
+    public function setWordSpacing($ws = 0.)
226 226
     {
227 227
         $this->ws = $ws;
228
-        $this->_out(sprintf('%.3F Tw', $ws*$this->k));
228
+        $this->_out(sprintf('%.3F Tw', $ws * $this->k));
229 229
     }
230 230
 
231 231
     /**
@@ -246,118 +246,118 @@  discard block
 block discarded – undo
246 246
         $y = null,
247 247
         $w = null,
248 248
         $h = null,
249
-        $cornerTL=null,
250
-        $cornerTR=null,
251
-        $cornerBL=null,
252
-        $cornerBR=null)
249
+        $cornerTL = null,
250
+        $cornerTR = null,
251
+        $cornerBL = null,
252
+        $cornerBR = null)
253 253
     {
254 254
         // init the path
255 255
         $path = '';
256 256
 
257 257
         // if we have the position and the size of the rectangle, we can proceed
258
-        if ($x!==null && $y!==null && $w!==null && $h!==null) {
258
+        if ($x !== null && $y !== null && $w !== null && $h !== null) {
259 259
             // the positions of the rectangle's corners
260
-            $x1 = $x*$this->k;
261
-            $y1 = ($this->h-$y)*$this->k;
260
+            $x1 = $x * $this->k;
261
+            $y1 = ($this->h - $y) * $this->k;
262 262
 
263
-            $x2 = ($x+$w)*$this->k;
264
-            $y2 = ($this->h-$y)*$this->k;
263
+            $x2 = ($x + $w) * $this->k;
264
+            $y2 = ($this->h - $y) * $this->k;
265 265
 
266
-            $x3 = ($x+$w)*$this->k;
267
-            $y3 = ($this->h-$y-$h)*$this->k;
266
+            $x3 = ($x + $w) * $this->k;
267
+            $y3 = ($this->h - $y - $h) * $this->k;
268 268
 
269
-            $x4 = $x*$this->k;
270
-            $y4 = ($this->h-$y-$h)*$this->k;
269
+            $x4 = $x * $this->k;
270
+            $y4 = ($this->h - $y - $h) * $this->k;
271 271
 
272 272
             // if we have at least one radius corner, then we proceed to a specific path, else it is just a rectangle
273 273
             if ($cornerTL || $cornerTR || $cornerBL || $cornerBR) {
274 274
                 // prepare the radius values
275 275
                 if ($cornerTL) {
276
-                    $cornerTL[0] = $cornerTL[0]*$this->k;
277
-                    $cornerTL[1] =-$cornerTL[1]*$this->k;
276
+                    $cornerTL[0] = $cornerTL[0] * $this->k;
277
+                    $cornerTL[1] = -$cornerTL[1] * $this->k;
278 278
                 }
279 279
                 if ($cornerTR) {
280
-                    $cornerTR[0] = $cornerTR[0]*$this->k;
281
-                    $cornerTR[1] =-$cornerTR[1]*$this->k;
280
+                    $cornerTR[0] = $cornerTR[0] * $this->k;
281
+                    $cornerTR[1] = -$cornerTR[1] * $this->k;
282 282
                 }
283 283
                 if ($cornerBL) {
284
-                    $cornerBL[0] = $cornerBL[0]*$this->k;
285
-                    $cornerBL[1] =-$cornerBL[1]*$this->k;
284
+                    $cornerBL[0] = $cornerBL[0] * $this->k;
285
+                    $cornerBL[1] = -$cornerBL[1] * $this->k;
286 286
                 }
287 287
                 if ($cornerBR) {
288
-                    $cornerBR[0] = $cornerBR[0]*$this->k;
289
-                    $cornerBR[1] =-$cornerBR[1]*$this->k;
288
+                    $cornerBR[0] = $cornerBR[0] * $this->k;
289
+                    $cornerBR[1] = -$cornerBR[1] * $this->k;
290 290
                 }
291 291
 
292 292
                 // if TL radius then specific start else (X1,Y1)
293 293
                 if ($cornerTL) {
294
-                    $path.= sprintf('%.2F %.2F m ', $x1+$cornerTL[0], $y1);
294
+                    $path .= sprintf('%.2F %.2F m ', $x1 + $cornerTL[0], $y1);
295 295
                 } else {
296
-                    $path.= sprintf('%.2F %.2F m ', $x1, $y1);
296
+                    $path .= sprintf('%.2F %.2F m ', $x1, $y1);
297 297
                 }
298 298
 
299 299
                 // if TR radius then line + arc, else line to (X2,Y2)
300 300
                 if ($cornerTR) {
301
-                    $xt1 = ($x2-$cornerTR[0])+$cornerTR[0]*self::MY_ARC;
302
-                    $yt1 = ($y2+$cornerTR[1])-$cornerTR[1];
303
-                    $xt2 = ($x2-$cornerTR[0])+$cornerTR[0];
304
-                    $yt2 = ($y2+$cornerTR[1])-$cornerTR[1]*self::MY_ARC;
301
+                    $xt1 = ($x2 - $cornerTR[0]) + $cornerTR[0] * self::MY_ARC;
302
+                    $yt1 = ($y2 + $cornerTR[1]) - $cornerTR[1];
303
+                    $xt2 = ($x2 - $cornerTR[0]) + $cornerTR[0];
304
+                    $yt2 = ($y2 + $cornerTR[1]) - $cornerTR[1] * self::MY_ARC;
305 305
 
306
-                    $path.= sprintf('%.2F %.2F l ', $x2-$cornerTR[0], $y2);
307
-                    $path.= sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c ', $xt1, $yt1, $xt2, $yt2, $x2, $y2+$cornerTR[1]);
306
+                    $path .= sprintf('%.2F %.2F l ', $x2 - $cornerTR[0], $y2);
307
+                    $path .= sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c ', $xt1, $yt1, $xt2, $yt2, $x2, $y2 + $cornerTR[1]);
308 308
                 } else {
309
-                    $path.= sprintf('%.2F %.2F l ', $x2, $y2);
309
+                    $path .= sprintf('%.2F %.2F l ', $x2, $y2);
310 310
                 }
311 311
 
312 312
                 // if BR radius then line + arc, else line to (X3, Y3)
313 313
                 if ($cornerBR) {
314
-                    $xt1 = ($x3-$cornerBR[0])+$cornerBR[0];
315
-                    $yt1 = ($y3-$cornerBR[1])+$cornerBR[1]*self::MY_ARC;
316
-                    $xt2 = ($x3-$cornerBR[0])+$cornerBR[0]*self::MY_ARC;
317
-                    $yt2 = ($y3-$cornerBR[1])+$cornerBR[1];
314
+                    $xt1 = ($x3 - $cornerBR[0]) + $cornerBR[0];
315
+                    $yt1 = ($y3 - $cornerBR[1]) + $cornerBR[1] * self::MY_ARC;
316
+                    $xt2 = ($x3 - $cornerBR[0]) + $cornerBR[0] * self::MY_ARC;
317
+                    $yt2 = ($y3 - $cornerBR[1]) + $cornerBR[1];
318 318
 
319
-                    $path.= sprintf('%.2F %.2F l ', $x3, $y3-$cornerBR[1]);
320
-                    $path.= sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c ', $xt1, $yt1, $xt2, $yt2, $x3-$cornerBR[0], $y3);
319
+                    $path .= sprintf('%.2F %.2F l ', $x3, $y3 - $cornerBR[1]);
320
+                    $path .= sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c ', $xt1, $yt1, $xt2, $yt2, $x3 - $cornerBR[0], $y3);
321 321
                 } else {
322
-                    $path.= sprintf('%.2F %.2F l ', $x3, $y3);
322
+                    $path .= sprintf('%.2F %.2F l ', $x3, $y3);
323 323
                 }
324 324
 
325 325
                 // if BL radius then line + arc, else line to (X4, Y4)
326 326
                 if ($cornerBL) {
327
-                    $xt1 = ($x4+$cornerBL[0])-$cornerBL[0]*self::MY_ARC;
328
-                    $yt1 = ($y4-$cornerBL[1])+$cornerBL[1];
329
-                    $xt2 = ($x4+$cornerBL[0])-$cornerBL[0];
330
-                    $yt2 = ($y4-$cornerBL[1])+$cornerBL[1]*self::MY_ARC;
327
+                    $xt1 = ($x4 + $cornerBL[0]) - $cornerBL[0] * self::MY_ARC;
328
+                    $yt1 = ($y4 - $cornerBL[1]) + $cornerBL[1];
329
+                    $xt2 = ($x4 + $cornerBL[0]) - $cornerBL[0];
330
+                    $yt2 = ($y4 - $cornerBL[1]) + $cornerBL[1] * self::MY_ARC;
331 331
 
332
-                    $path.= sprintf('%.2F %.2F l ', $x4+$cornerBL[0], $y4);
333
-                    $path.= sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c ', $xt1, $yt1, $xt2, $yt2, $x4, $y4-$cornerBL[1]);
332
+                    $path .= sprintf('%.2F %.2F l ', $x4 + $cornerBL[0], $y4);
333
+                    $path .= sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c ', $xt1, $yt1, $xt2, $yt2, $x4, $y4 - $cornerBL[1]);
334 334
                 } else {
335
-                    $path.= sprintf('%.2F %.2F l ', $x4, $y4);
335
+                    $path .= sprintf('%.2F %.2F l ', $x4, $y4);
336 336
                 }
337 337
 
338 338
                 // if RL radius then line + arc
339 339
                 if ($cornerTL) {
340
-                    $xt1 = ($x1+$cornerTL[0])-$cornerTL[0];
341
-                    $yt1 = ($y1+$cornerTL[1])-$cornerTL[1]*self::MY_ARC;
342
-                    $xt2 = ($x1+$cornerTL[0])-$cornerTL[0]*self::MY_ARC;
343
-                    $yt2 = ($y1+$cornerTL[1])-$cornerTL[1];
340
+                    $xt1 = ($x1 + $cornerTL[0]) - $cornerTL[0];
341
+                    $yt1 = ($y1 + $cornerTL[1]) - $cornerTL[1] * self::MY_ARC;
342
+                    $xt2 = ($x1 + $cornerTL[0]) - $cornerTL[0] * self::MY_ARC;
343
+                    $yt2 = ($y1 + $cornerTL[1]) - $cornerTL[1];
344 344
 
345
-                    $path.= sprintf('%.2F %.2F l ', $x1, $y1+$cornerTL[1]);
346
-                    $path.= sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c ', $xt1, $yt1, $xt2, $yt2, $x1+$cornerTL[0], $y1);
345
+                    $path .= sprintf('%.2F %.2F l ', $x1, $y1 + $cornerTL[1]);
346
+                    $path .= sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c ', $xt1, $yt1, $xt2, $yt2, $x1 + $cornerTL[0], $y1);
347 347
                 }
348 348
             } else {
349
-                $path.= sprintf('%.2F %.2F m ', $x1, $y1);
350
-                $path.= sprintf('%.2F %.2F l ', $x2, $y2);
351
-                $path.= sprintf('%.2F %.2F l ', $x3, $y3);
352
-                $path.= sprintf('%.2F %.2F l ', $x4, $y4);
349
+                $path .= sprintf('%.2F %.2F m ', $x1, $y1);
350
+                $path .= sprintf('%.2F %.2F l ', $x2, $y2);
351
+                $path .= sprintf('%.2F %.2F l ', $x3, $y3);
352
+                $path .= sprintf('%.2F %.2F l ', $x4, $y4);
353 353
             }
354 354
 
355 355
             // close the path
356
-            $path.= ' h W n';
356
+            $path .= ' h W n';
357 357
         }
358 358
 
359 359
         // using the path as a clipping path
360
-        $this->_out('q '.$path.' ');
360
+        $this->_out('q ' . $path . ' ');
361 361
     }
362 362
 
363 363
     /**
@@ -396,48 +396,48 @@  discard block
 block discarded – undo
396 396
     public function drawCurve($ext1X, $ext1Y, $ext2X, $ext2Y, $int1X, $int1Y, $int2X, $int2Y, $cenX, $cenY)
397 397
     {
398 398
         // prepare the coordinates
399
-        $ext1X = $ext1X*$this->k;
400
-        $ext2X = $ext2X*$this->k;
401
-        $int1X = $int1X*$this->k;
402
-        $int2X = $int2X*$this->k;
403
-        $cenX  = $cenX*$this->k;
404
-
405
-        $ext1Y = ($this->h-$ext1Y)*$this->k;
406
-        $ext2Y = ($this->h-$ext2Y)*$this->k;
407
-        $int1Y = ($this->h-$int1Y)*$this->k;
408
-        $int2Y = ($this->h-$int2Y)*$this->k;
409
-        $cenY  = ($this->h-$cenY) *$this->k;
399
+        $ext1X = $ext1X * $this->k;
400
+        $ext2X = $ext2X * $this->k;
401
+        $int1X = $int1X * $this->k;
402
+        $int2X = $int2X * $this->k;
403
+        $cenX  = $cenX * $this->k;
404
+
405
+        $ext1Y = ($this->h - $ext1Y) * $this->k;
406
+        $ext2Y = ($this->h - $ext2Y) * $this->k;
407
+        $int1Y = ($this->h - $int1Y) * $this->k;
408
+        $int2Y = ($this->h - $int2Y) * $this->k;
409
+        $cenY  = ($this->h - $cenY) * $this->k;
410 410
 
411 411
         // init the curve
412 412
         $path = '';
413 413
 
414
-        if ($ext1X-$cenX!=0) {
415
-            $xt1 = $cenX+($ext1X-$cenX);
416
-            $yt1 = $cenY+($ext2Y-$cenY)*self::MY_ARC;
417
-            $xt2 = $cenX+($ext1X-$cenX)*self::MY_ARC;
418
-            $yt2 = $cenY+($ext2Y-$cenY);
414
+        if ($ext1X - $cenX != 0) {
415
+            $xt1 = $cenX + ($ext1X - $cenX);
416
+            $yt1 = $cenY + ($ext2Y - $cenY) * self::MY_ARC;
417
+            $xt2 = $cenX + ($ext1X - $cenX) * self::MY_ARC;
418
+            $yt2 = $cenY + ($ext2Y - $cenY);
419 419
         } else {
420
-            $xt1 = $cenX+($ext2X-$cenX)*self::MY_ARC;
421
-            $yt1 = $cenY+($ext1Y-$cenY);
422
-            $xt2 = $cenX+($ext2X-$cenX);
423
-            $yt2 = $cenY+($ext1Y-$cenY)*self::MY_ARC;
420
+            $xt1 = $cenX + ($ext2X - $cenX) * self::MY_ARC;
421
+            $yt1 = $cenY + ($ext1Y - $cenY);
422
+            $xt2 = $cenX + ($ext2X - $cenX);
423
+            $yt2 = $cenY + ($ext1Y - $cenY) * self::MY_ARC;
424 424
         }
425
-        $path.= sprintf('%.2F %.2F m ', $ext1X, $ext1Y);
426
-        $path.= sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c ', $xt1, $yt1, $xt2, $yt2, $ext2X, $ext2Y);
427
-
428
-        if ($int1X-$cenX!=0) {
429
-            $xt1 = $cenX+($int1X-$cenX)*self::MY_ARC;
430
-            $yt1 = $cenY+($int2Y-$cenY);
431
-            $xt2 = $cenX+($int1X-$cenX);
432
-            $yt2 = $cenY+($int2Y-$cenY)*self::MY_ARC;
425
+        $path .= sprintf('%.2F %.2F m ', $ext1X, $ext1Y);
426
+        $path .= sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c ', $xt1, $yt1, $xt2, $yt2, $ext2X, $ext2Y);
427
+
428
+        if ($int1X - $cenX != 0) {
429
+            $xt1 = $cenX + ($int1X - $cenX) * self::MY_ARC;
430
+            $yt1 = $cenY + ($int2Y - $cenY);
431
+            $xt2 = $cenX + ($int1X - $cenX);
432
+            $yt2 = $cenY + ($int2Y - $cenY) * self::MY_ARC;
433 433
         } else {
434
-            $xt1 = $cenX+($int2X-$cenX);
435
-            $yt1 = $cenY+($int1Y-$cenY)*self::MY_ARC;
436
-            $xt2 = $cenX+($int2X-$cenX)*self::MY_ARC;
437
-            $yt2 = $cenY+($int1Y-$cenY);
434
+            $xt1 = $cenX + ($int2X - $cenX);
435
+            $yt1 = $cenY + ($int1Y - $cenY) * self::MY_ARC;
436
+            $xt2 = $cenX + ($int2X - $cenX) * self::MY_ARC;
437
+            $yt2 = $cenY + ($int1Y - $cenY);
438 438
         }
439
-        $path.= sprintf('%.2F %.2F l ', $int2X, $int2Y);
440
-        $path.= sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c ', $xt1, $yt1, $xt2, $yt2, $int1X, $int1Y);
439
+        $path .= sprintf('%.2F %.2F l ', $int2X, $int2Y);
440
+        $path .= sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c ', $xt1, $yt1, $xt2, $yt2, $int1X, $int1Y);
441 441
 
442 442
         // draw the curve
443 443
         $this->_out($path . 'f');
@@ -467,34 +467,34 @@  discard block
 block discarded – undo
467 467
     public function drawCorner($ext1X, $ext1Y, $ext2X, $ext2Y, $intX, $intY, $cenX, $cenY)
468 468
     {
469 469
         // prepare the coordinates
470
-        $ext1X = $ext1X*$this->k;
471
-        $ext2X = $ext2X*$this->k;
472
-        $intX  = $intX*$this->k;
473
-        $cenX  = $cenX*$this->k;
470
+        $ext1X = $ext1X * $this->k;
471
+        $ext2X = $ext2X * $this->k;
472
+        $intX  = $intX * $this->k;
473
+        $cenX  = $cenX * $this->k;
474 474
 
475
-        $ext1Y = ($this->h-$ext1Y)*$this->k;
476
-        $ext2Y = ($this->h-$ext2Y)*$this->k;
477
-        $intY  = ($this->h-$intY)*$this->k;
478
-        $cenY  = ($this->h-$cenY)*$this->k;
475
+        $ext1Y = ($this->h - $ext1Y) * $this->k;
476
+        $ext2Y = ($this->h - $ext2Y) * $this->k;
477
+        $intY  = ($this->h - $intY) * $this->k;
478
+        $cenY  = ($this->h - $cenY) * $this->k;
479 479
 
480 480
         // init the curve
481 481
         $path = '';
482 482
 
483
-        if ($ext1X-$cenX!=0) {
484
-            $xt1 = $cenX+($ext1X-$cenX);
485
-            $yt1 = $cenY+($ext2Y-$cenY)*self::MY_ARC;
486
-            $xt2 = $cenX+($ext1X-$cenX)*self::MY_ARC;
487
-            $yt2 = $cenY+($ext2Y-$cenY);
483
+        if ($ext1X - $cenX != 0) {
484
+            $xt1 = $cenX + ($ext1X - $cenX);
485
+            $yt1 = $cenY + ($ext2Y - $cenY) * self::MY_ARC;
486
+            $xt2 = $cenX + ($ext1X - $cenX) * self::MY_ARC;
487
+            $yt2 = $cenY + ($ext2Y - $cenY);
488 488
         } else {
489
-            $xt1 = $cenX+($ext2X-$cenX)*self::MY_ARC;
490
-            $yt1 = $cenY+($ext1Y-$cenY);
491
-            $xt2 = $cenX+($ext2X-$cenX);
492
-            $yt2 = $cenY+($ext1Y-$cenY)*self::MY_ARC;
489
+            $xt1 = $cenX + ($ext2X - $cenX) * self::MY_ARC;
490
+            $yt1 = $cenY + ($ext1Y - $cenY);
491
+            $xt2 = $cenX + ($ext2X - $cenX);
492
+            $yt2 = $cenY + ($ext1Y - $cenY) * self::MY_ARC;
493 493
         }
494
-        $path.= sprintf('%.2F %.2F m ', $ext1X, $ext1Y);
495
-        $path.= sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c ', $xt1, $yt1, $xt2, $yt2, $ext2X, $ext2Y);
496
-        $path.= sprintf('%.2F %.2F l ', $intX, $intY);
497
-        $path.= sprintf('%.2F %.2F l ', $ext1X, $ext1Y);
494
+        $path .= sprintf('%.2F %.2F m ', $ext1X, $ext1Y);
495
+        $path .= sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c ', $xt1, $yt1, $xt2, $yt2, $ext2X, $ext2Y);
496
+        $path .= sprintf('%.2F %.2F l ', $intX, $intY);
497
+        $path .= sprintf('%.2F %.2F l ', $ext1X, $ext1Y);
498 498
 
499 499
         // draw the curve
500 500
         $this->_out($path . 'f');
@@ -530,12 +530,12 @@  discard block
 block discarded – undo
530 530
     public function setTranslate($xT, $yT)
531 531
     {
532 532
         // Matrix for Translate
533
-        $tm[0]=1;
534
-        $tm[1]=0;
535
-        $tm[2]=0;
536
-        $tm[3]=1;
537
-        $tm[4]=$xT*$this->k;
538
-        $tm[5]=-$yT*$this->k;
533
+        $tm[0] = 1;
534
+        $tm[1] = 0;
535
+        $tm[2] = 0;
536
+        $tm[3] = 1;
537
+        $tm[4] = $xT * $this->k;
538
+        $tm[5] = -$yT * $this->k;
539 539
 
540 540
         // apply the Transform Matric
541 541
         $this->_out(sprintf('%.3F %.3F %.3F %.3F %.3F %.3F cm', $tm[0], $tm[1], $tm[2], $tm[3], $tm[4], $tm[5]));
@@ -549,23 +549,23 @@  discard block
 block discarded – undo
549 549
      * @param float $Cy
550 550
      * @access public
551 551
      */
552
-    public function setRotation($angle, $xC=null, $yC=null)
552
+    public function setRotation($angle, $xC = null, $yC = null)
553 553
     {
554 554
         // if no center, rotate around the current posiition
555
-        if($xC === null) $xC=$this->x;
556
-        if($yC === null) $yC=$this->y;
555
+        if ($xC === null) $xC = $this->x;
556
+        if ($yC === null) $yC = $this->y;
557 557
 
558 558
         // prepare the coordinate
559
-        $yC=($this->h-$yC)*$this->k;
560
-        $xC*=$this->k;
559
+        $yC = ($this->h - $yC) * $this->k;
560
+        $xC *= $this->k;
561 561
 
562 562
         // Matrix for Rotate
563
-        $tm[0]=cos(deg2rad($angle));
564
-        $tm[1]=sin(deg2rad($angle));
565
-        $tm[2]=-$tm[1];
566
-        $tm[3]=$tm[0];
567
-        $tm[4]=$xC+$tm[1]*$yC-$tm[0]*$xC;
568
-        $tm[5]=$yC-$tm[0]*$yC-$tm[1]*$xC;
563
+        $tm[0] = cos(deg2rad($angle));
564
+        $tm[1] = sin(deg2rad($angle));
565
+        $tm[2] = -$tm[1];
566
+        $tm[3] = $tm[0];
567
+        $tm[4] = $xC + $tm[1] * $yC - $tm[0] * $xC;
568
+        $tm[5] = $yC - $tm[0] * $yC - $tm[1] * $xC;
569 569
 
570 570
         // apply the Transform Matric
571 571
         $this->_out(sprintf('%.3F %.3F %.3F %.3F %.3F %.3F cm', $tm[0], $tm[1], $tm[2], $tm[3], $tm[4], $tm[5]));
@@ -579,9 +579,9 @@  discard block
 block discarded – undo
579 579
      * @param boolean $rtloff NOT USED
580 580
      * @access public
581 581
      */
582
-    public function SetX($x, $rtloff=false)
582
+    public function SetX($x, $rtloff = false)
583 583
     {
584
-        $this->x=$x;
584
+        $this->x = $x;
585 585
     }
586 586
 
587 587
     /**
@@ -593,12 +593,12 @@  discard block
 block discarded – undo
593 593
      * @param boolean $rtloff NOT USED
594 594
      * @access public
595 595
      */
596
-    public function SetY($y, $resetx=true, $rtloff=false)
596
+    public function SetY($y, $resetx = true, $rtloff = false)
597 597
     {
598 598
         if ($resetx)
599
-            $this->x=$this->lMargin;
599
+            $this->x = $this->lMargin;
600 600
 
601
-        $this->y=$y;
601
+        $this->y = $y;
602 602
     }
603 603
 
604 604
     /**
@@ -610,10 +610,10 @@  discard block
 block discarded – undo
610 610
      * @param boolean $rtloff NOT USED
611 611
      * @access public
612 612
      */
613
-    public function SetXY($x, $y, $rtloff=false)
613
+    public function SetXY($x, $y, $rtloff = false)
614 614
     {
615
-        $this->x=$x;
616
-        $this->y=$y;
615
+        $this->x = $x;
616
+        $this->y = $y;
617 617
     }
618 618
 
619 619
     /**
@@ -653,7 +653,7 @@  discard block
 block discarded – undo
653 653
     }
654 654
     public function setbMargin($v)
655 655
     {
656
-        $this->bMargin=$v;
656
+        $this->bMargin = $v;
657 657
     }
658 658
 
659 659
     /**
@@ -671,14 +671,14 @@  discard block
 block discarded – undo
671 671
         // Style : fill
672 672
         if ($styles['fill']) {
673 673
             $this->setFillColorArray($styles['fill']);
674
-            $style.= 'F';
674
+            $style .= 'F';
675 675
         }
676 676
 
677 677
         // Style : stroke
678 678
         if ($styles['stroke'] && $styles['stroke-width']) {
679 679
             $this->SetDrawColorArray($styles['stroke']);
680 680
             $this->SetLineWidth($styles['stroke-width']);
681
-            $style.= 'D';
681
+            $style .= 'D';
682 682
         }
683 683
 
684 684
         // Style : opacity
@@ -702,20 +702,20 @@  discard block
 block discarded – undo
702 702
     public function svgRect($x, $y, $w, $h, $style)
703 703
     {
704 704
         // prepare the 4 corners
705
-        $x1=$x;
706
-        $x2=$x+$w;
707
-        $x3=$x+$w;
708
-        $x4=$x;
705
+        $x1 = $x;
706
+        $x2 = $x + $w;
707
+        $x3 = $x + $w;
708
+        $x4 = $x;
709 709
 
710
-        $y1=$y;
711
-        $y2=$y;
712
-        $y3=$y+$h;
713
-        $y4=$y+$h;
710
+        $y1 = $y;
711
+        $y2 = $y;
712
+        $y3 = $y + $h;
713
+        $y4 = $y + $h;
714 714
 
715 715
         // get the Closing operator from the PDF Style
716
-        if($style=='F') $op='f';
717
-        elseif($style=='FD' || $style=='DF') $op='B';
718
-        else $op='S';
716
+        if ($style == 'F') $op = 'f';
717
+        elseif ($style == 'FD' || $style == 'DF') $op = 'B';
718
+        else $op = 'S';
719 719
 
720 720
         // drawing
721 721
         $this->_Point($x1, $y1, true);
@@ -738,7 +738,7 @@  discard block
 block discarded – undo
738 738
     public function svgLine($x1, $y1, $x2, $y2)
739 739
     {
740 740
         // get the Closing operator
741
-        $op='S';
741
+        $op = 'S';
742 742
 
743 743
         // drawing
744 744
         $this->_Point($x1, $y1, true);
@@ -759,12 +759,12 @@  discard block
 block discarded – undo
759 759
     public function svgEllipse($x0, $y0, $rx, $ry, $style)
760 760
     {
761 761
         // get the Closing operator from the PDF Style
762
-        if($style=='F') $op='f';
763
-        elseif($style=='FD' || $style=='DF') $op='B';
764
-        else $op='S';
762
+        if ($style == 'F') $op = 'f';
763
+        elseif ($style == 'FD' || $style == 'DF') $op = 'B';
764
+        else $op = 'S';
765 765
 
766 766
         // drawing
767
-        $this->_Arc($x0, $y0, $rx, $ry, 0, 2*M_PI, true, true, true);
767
+        $this->_Arc($x0, $y0, $rx, $ry, 0, 2 * M_PI, true, true, true);
768 768
         $this->_out($op);
769 769
     }
770 770
 
@@ -778,16 +778,16 @@  discard block
 block discarded – undo
778 778
     public function svgPolygone($actions, $style)
779 779
     {
780 780
         // get the Closing operator from the PDF Style
781
-        if($style=='F') $op='f';
782
-        elseif($style=='FD' || $style=='DF') $op='B';
783
-        else $op='S';
781
+        if ($style == 'F') $op = 'f';
782
+        elseif ($style == 'FD' || $style == 'DF') $op = 'B';
783
+        else $op = 'S';
784 784
 
785 785
         // To save the First action and the last point
786 786
         $first = array('', 0, 0);
787 787
         $last = array(0, 0, 0, 0);
788 788
 
789 789
         foreach ($actions as $action) {
790
-            switch($action[0])
790
+            switch ($action[0])
791 791
             {
792 792
                 // Start the Path
793 793
                 case 'M':
@@ -812,7 +812,7 @@  discard block
 block discarded – undo
812 812
 
813 813
                 // Make a Line (vector from last point)
814 814
                 case 'l':
815
-                    $x = $last[0]+$action[1]; $y = $last[1]+$action[2]; $xc = $x; $yc = $y;
815
+                    $x = $last[0] + $action[1]; $y = $last[1] + $action[2]; $xc = $x; $yc = $y;
816 816
                     $this->_Line($x, $y, true);
817 817
                     break;
818 818
 
@@ -824,7 +824,7 @@  discard block
 block discarded – undo
824 824
 
825 825
                 // Make a Horisontal Line (vector from last point)
826 826
                 case 'h':
827
-                    $x = $last[0]+$action[1]; $y = $last[1]; $xc = $x; $yc = $y;
827
+                    $x = $last[0] + $action[1]; $y = $last[1]; $xc = $x; $yc = $y;
828 828
                     $this->_Line($x, $y, true);
829 829
                     break;
830 830
 
@@ -836,21 +836,21 @@  discard block
 block discarded – undo
836 836
 
837 837
                 // Make a Vertical Line (vector from last point)
838 838
                 case 'v':
839
-                    $x = $last[0]; $y = $last[1]+$action[1]; $xc = $x; $yc = $y;
839
+                    $x = $last[0]; $y = $last[1] + $action[1]; $xc = $x; $yc = $y;
840 840
                     $this->_Line($x, $y, true);
841 841
                     break;
842 842
 
843 843
                 // Make a Arc (new point)
844 844
                 case 'A':
845
-                    $rx = $action[1];   // rx
846
-                    $ry = $action[2];   // ry
847
-                    $a = $action[3];    // deviation angle of the axis X
848
-                    $l = $action[4];    // large-arc-flag
849
-                    $s = $action[5];    // sweep-flag
850
-                    $x1 = $last[0];     // begin x
851
-                    $y1 = $last[1];     // begin y
852
-                    $x2 = $action[6];   // final x
853
-                    $y2 = $action[7];   // final y
845
+                    $rx = $action[1]; // rx
846
+                    $ry = $action[2]; // ry
847
+                    $a = $action[3]; // deviation angle of the axis X
848
+                    $l = $action[4]; // large-arc-flag
849
+                    $s = $action[5]; // sweep-flag
850
+                    $x1 = $last[0]; // begin x
851
+                    $y1 = $last[1]; // begin y
852
+                    $x2 = $action[6]; // final x
853
+                    $y2 = $action[7]; // final y
854 854
 
855 855
                     $this->_Arc2($x1, $y1, $x2, $y2, $rx, $ry, $a, $l, $s, true);
856 856
                     $x = $x2; $y = $y2; $xc = $x; $yc = $y;
@@ -858,15 +858,15 @@  discard block
 block discarded – undo
858 858
 
859 859
                 // Make a Arc (vector from last point)
860 860
                 case 'a':
861
-                    $rx = $action[1];   // rx
862
-                    $ry = $action[2];   // ry
863
-                    $a = $action[3];    // deviation angle of the axis X
864
-                    $l = $action[4];    // large-arc-flag
865
-                    $s = $action[5];    // sweep-flag
866
-                    $x1 = $last[0];     // begin x
867
-                    $y1 = $last[1];     // begin y
868
-                    $x2 = $last[0]+$action[6]; // final x
869
-                    $y2 = $last[1]+$action[7]; // final y
861
+                    $rx = $action[1]; // rx
862
+                    $ry = $action[2]; // ry
863
+                    $a = $action[3]; // deviation angle of the axis X
864
+                    $l = $action[4]; // large-arc-flag
865
+                    $s = $action[5]; // sweep-flag
866
+                    $x1 = $last[0]; // begin x
867
+                    $y1 = $last[1]; // begin y
868
+                    $x2 = $last[0] + $action[6]; // final x
869
+                    $y2 = $last[1] + $action[7]; // final y
870 870
 
871 871
                     $this->_Arc2($x1, $y1, $x2, $y2, $rx, $ry, $a, $l, $s, true);
872 872
                     $x = $x2; $y = $y2; $xc = $x; $yc = $y;
@@ -886,19 +886,19 @@  discard block
 block discarded – undo
886 886
 
887 887
                 // Make a Bezier Curve (vector from last point)
888 888
                 case 'c':
889
-                    $x1 = $last[0]+$action[1];
890
-                    $y1 = $last[1]+$action[2];
891
-                    $x2 = $last[0]+$action[3];
892
-                    $y2 = $last[1]+$action[4];
893
-                    $xf = $last[0]+$action[5];
894
-                    $yf = $last[1]+$action[6];
889
+                    $x1 = $last[0] + $action[1];
890
+                    $y1 = $last[1] + $action[2];
891
+                    $x2 = $last[0] + $action[3];
892
+                    $y2 = $last[1] + $action[4];
893
+                    $xf = $last[0] + $action[5];
894
+                    $yf = $last[1] + $action[6];
895 895
                     $this->_Curve($x1, $y1, $x2, $y2, $xf, $yf, true);
896 896
                     $x = $xf; $y = $yf; $xc = $x2; $yc = $y2;
897 897
                     break;
898 898
 
899 899
                 // Unknown Path
900 900
                 default:
901
-                    throw new HTML2PDF_exception(0, 'SVG Path Error : ['.$action[0].'] unkown');
901
+                    throw new HTML2PDF_exception(0, 'SVG Path Error : [' . $action[0] . '] unkown');
902 902
             }
903 903
 
904 904
             // save the last point
@@ -984,14 +984,14 @@  discard block
 block discarded – undo
984 984
         $angleEnd,
985 985
         $direction = true,
986 986
         $drawFirst = true,
987
-        $trans=false)
987
+        $trans = false)
988 988
     {
989 989
         // if we want the no trigo direction : add 2PI to the begin angle, to invert the direction
990
-        if (!$direction) $angleBegin+= M_PI*2.;
990
+        if (!$direction) $angleBegin += M_PI * 2.;
991 991
 
992 992
         // cut in segment to convert in berize curv
993
-        $dt = ($angleEnd - $angleBegin)/self::ARC_NB_SEGMENT;
994
-        $dtm = $dt/3;
993
+        $dt = ($angleEnd - $angleBegin) / self::ARC_NB_SEGMENT;
994
+        $dtm = $dt / 3;
995 995
 
996 996
         // center of the arc
997 997
         $x0 = $xc; $y0 = $yc;
@@ -1009,7 +1009,7 @@  discard block
 block discarded – undo
1009 1009
         // foreach segment
1010 1010
         for ($i = 1; $i <= self::ARC_NB_SEGMENT; $i++) {
1011 1011
             // calculing the next point
1012
-            $t1 = ($i * $dt)+$angleBegin;
1012
+            $t1 = ($i * $dt) + $angleBegin;
1013 1013
             $a1 = $x0 + ($rx * cos($t1));
1014 1014
             $b1 = $y0 + ($ry * sin($t1));
1015 1015
             $c1 = -$rx * sin($t1);
@@ -1046,7 +1046,7 @@  discard block
 block discarded – undo
1046 1046
      * @param boolean $trans apply transformation
1047 1047
      * @access protected
1048 1048
      */
1049
-    protected function _Arc2($x1, $y1, $x2, $y2, $rx, $ry, $angle=0., $l=0, $s=0, $trans = false)
1049
+    protected function _Arc2($x1, $y1, $x2, $y2, $rx, $ry, $angle = 0., $l = 0, $s = 0, $trans = false)
1050 1050
     {
1051 1051
         // array to stock the parameters
1052 1052
         $v = array();
@@ -1060,50 +1060,50 @@  discard block
 block discarded – undo
1060 1060
         $v['ry'] = $ry;
1061 1061
 
1062 1062
         // rotate with the deviation angle of the axis X
1063
-        $v['xr1'] = $v['x1']*cos($angle) - $v['y1']*sin($angle);
1064
-        $v['yr1'] = $v['x1']*sin($angle) + $v['y1']*cos($angle);
1065
-        $v['xr2'] = $v['x2']*cos($angle) - $v['y2']*sin($angle);
1066
-        $v['yr2'] = $v['x2']*sin($angle) + $v['y2']*cos($angle);
1063
+        $v['xr1'] = $v['x1'] * cos($angle) - $v['y1'] * sin($angle);
1064
+        $v['yr1'] = $v['x1'] * sin($angle) + $v['y1'] * cos($angle);
1065
+        $v['xr2'] = $v['x2'] * cos($angle) - $v['y2'] * sin($angle);
1066
+        $v['yr2'] = $v['x2'] * sin($angle) + $v['y2'] * cos($angle);
1067 1067
 
1068 1068
         // the normalized vector
1069
-        $v['Xr1'] = $v['xr1']/$v['rx'];
1070
-        $v['Yr1'] = $v['yr1']/$v['ry'];
1071
-        $v['Xr2'] = $v['xr2']/$v['rx'];
1072
-        $v['Yr2'] = $v['yr2']/$v['ry'];
1073
-        $v['dXr'] = $v['Xr2']-$v['Xr1'];
1074
-        $v['dYr'] = $v['Yr2']-$v['Yr1'];
1075
-        $v['D'] = $v['dXr']*$v['dXr'] + $v['dYr']*$v['dYr'];
1069
+        $v['Xr1'] = $v['xr1'] / $v['rx'];
1070
+        $v['Yr1'] = $v['yr1'] / $v['ry'];
1071
+        $v['Xr2'] = $v['xr2'] / $v['rx'];
1072
+        $v['Yr2'] = $v['yr2'] / $v['ry'];
1073
+        $v['dXr'] = $v['Xr2'] - $v['Xr1'];
1074
+        $v['dYr'] = $v['Yr2'] - $v['Yr1'];
1075
+        $v['D'] = $v['dXr'] * $v['dXr'] + $v['dYr'] * $v['dYr'];
1076 1076
 
1077 1077
         // if |vector| is Null, or if |vector| > 2 : impossible to make a arc => Line
1078
-        if ($v['D']==0 || $v['D']>4) {
1078
+        if ($v['D'] == 0 || $v['D'] > 4) {
1079 1079
             $this->_Line($x2, $y2, $trans);
1080 1080
             return false;
1081 1081
         }
1082 1082
 
1083 1083
         // convert paramters for make a arc with Center, Radius, from angleBegin to angleEnd
1084 1084
         $v['s1'] = array();
1085
-        $v['s1']['t'] = sqrt((4.-$v['D'])/$v['D']);
1086
-        $v['s1']['Xr'] = ($v['Xr1']+$v['Xr2'])/2. + $v['s1']['t']*($v['Yr2']-$v['Yr1'])/2.;
1087
-        $v['s1']['Yr'] = ($v['Yr1']+$v['Yr2'])/2. + $v['s1']['t']*($v['Xr1']-$v['Xr2'])/2.;
1088
-        $v['s1']['xr'] = $v['s1']['Xr']*$v['rx'];
1089
-        $v['s1']['yr'] = $v['s1']['Yr']*$v['ry'];
1090
-        $v['s1']['x'] = $v['s1']['xr']*cos($angle)+$v['s1']['yr']*sin($angle);
1091
-        $v['s1']['y'] =-$v['s1']['xr']*sin($angle)+$v['s1']['yr']*cos($angle);
1092
-        $v['s1']['a1'] = atan2($v['y1']-$v['s1']['y'], $v['x1']-$v['s1']['x']);
1093
-        $v['s1']['a2'] = atan2($v['y2']-$v['s1']['y'], $v['x2']-$v['s1']['x']);
1094
-        if ($v['s1']['a1']>$v['s1']['a2']) $v['s1']['a1']-=2*M_PI;
1085
+        $v['s1']['t'] = sqrt((4. - $v['D']) / $v['D']);
1086
+        $v['s1']['Xr'] = ($v['Xr1'] + $v['Xr2']) / 2. + $v['s1']['t'] * ($v['Yr2'] - $v['Yr1']) / 2.;
1087
+        $v['s1']['Yr'] = ($v['Yr1'] + $v['Yr2']) / 2. + $v['s1']['t'] * ($v['Xr1'] - $v['Xr2']) / 2.;
1088
+        $v['s1']['xr'] = $v['s1']['Xr'] * $v['rx'];
1089
+        $v['s1']['yr'] = $v['s1']['Yr'] * $v['ry'];
1090
+        $v['s1']['x'] = $v['s1']['xr'] * cos($angle) + $v['s1']['yr'] * sin($angle);
1091
+        $v['s1']['y'] = -$v['s1']['xr'] * sin($angle) + $v['s1']['yr'] * cos($angle);
1092
+        $v['s1']['a1'] = atan2($v['y1'] - $v['s1']['y'], $v['x1'] - $v['s1']['x']);
1093
+        $v['s1']['a2'] = atan2($v['y2'] - $v['s1']['y'], $v['x2'] - $v['s1']['x']);
1094
+        if ($v['s1']['a1'] > $v['s1']['a2']) $v['s1']['a1'] -= 2 * M_PI;
1095 1095
 
1096 1096
         $v['s2'] = array();
1097 1097
         $v['s2']['t'] = -$v['s1']['t'];
1098
-        $v['s2']['Xr'] = ($v['Xr1']+$v['Xr2'])/2. + $v['s2']['t']*($v['Yr2']-$v['Yr1'])/2.;
1099
-        $v['s2']['Yr'] = ($v['Yr1']+$v['Yr2'])/2. + $v['s2']['t']*($v['Xr1']-$v['Xr2'])/2.;
1100
-        $v['s2']['xr'] = $v['s2']['Xr']*$v['rx'];
1101
-        $v['s2']['yr'] = $v['s2']['Yr']*$v['ry'];
1102
-        $v['s2']['x'] = $v['s2']['xr']*cos($angle)+$v['s2']['yr']*sin($angle);
1103
-        $v['s2']['y'] =-$v['s2']['xr']*sin($angle)+$v['s2']['yr']*cos($angle);
1104
-        $v['s2']['a1'] = atan2($v['y1']-$v['s2']['y'], $v['x1']-$v['s2']['x']);
1105
-        $v['s2']['a2'] = atan2($v['y2']-$v['s2']['y'], $v['x2']-$v['s2']['x']);
1106
-        if ($v['s2']['a1']>$v['s2']['a2']) $v['s2']['a1']-=2*M_PI;
1098
+        $v['s2']['Xr'] = ($v['Xr1'] + $v['Xr2']) / 2. + $v['s2']['t'] * ($v['Yr2'] - $v['Yr1']) / 2.;
1099
+        $v['s2']['Yr'] = ($v['Yr1'] + $v['Yr2']) / 2. + $v['s2']['t'] * ($v['Xr1'] - $v['Xr2']) / 2.;
1100
+        $v['s2']['xr'] = $v['s2']['Xr'] * $v['rx'];
1101
+        $v['s2']['yr'] = $v['s2']['Yr'] * $v['ry'];
1102
+        $v['s2']['x'] = $v['s2']['xr'] * cos($angle) + $v['s2']['yr'] * sin($angle);
1103
+        $v['s2']['y'] = -$v['s2']['xr'] * sin($angle) + $v['s2']['yr'] * cos($angle);
1104
+        $v['s2']['a1'] = atan2($v['y1'] - $v['s2']['y'], $v['x1'] - $v['s2']['x']);
1105
+        $v['s2']['a2'] = atan2($v['y2'] - $v['s2']['y'], $v['x2'] - $v['s2']['x']);
1106
+        if ($v['s2']['a1'] > $v['s2']['a2']) $v['s2']['a1'] -= 2 * M_PI;
1107 1107
 
1108 1108
         if (!$l) {
1109 1109
             if ($s) {
@@ -1145,20 +1145,20 @@  discard block
 block discarded – undo
1145 1145
      * @return boolean
1146 1146
      * @access public
1147 1147
      */
1148
-    public function ptTransform(&$x,  &$y, $trans=true)
1148
+    public function ptTransform(&$x, &$y, $trans = true)
1149 1149
     {
1150 1150
         // load the last Transfomation Matrix
1151 1151
         $nb = count($this->_transf);
1152
-        if ($nb)    $m = $this->_transf[$nb-1];
1153
-        else        $m = array(1,0,0,1,0,0);
1152
+        if ($nb)    $m = $this->_transf[$nb - 1];
1153
+        else        $m = array(1, 0, 0, 1, 0, 0);
1154 1154
 
1155 1155
         // apply the Transformation Matrix
1156
-        list($x,$y) = array(($x*$m[0]+$y*$m[2]+$m[4]),($x*$m[1]+$y*$m[3]+$m[5]));
1156
+        list($x, $y) = array(($x * $m[0] + $y * $m[2] + $m[4]), ($x * $m[1] + $y * $m[3] + $m[5]));
1157 1157
 
1158 1158
         // if true => convert into PDF unit
1159 1159
         if ($trans) {
1160
-            $x = $x*$this->k;
1161
-            $y = ($this->h-$y)*$this->k;
1160
+            $x = $x * $this->k;
1161
+            $y = ($this->h - $y) * $this->k;
1162 1162
         }
1163 1163
 
1164 1164
         return true;
@@ -1174,20 +1174,20 @@  discard block
 block discarded – undo
1174 1174
     {
1175 1175
         // get the last Transformation Matrix
1176 1176
         $nb = count($this->_transf);
1177
-        if ($nb)    $m = $this->_transf[$nb-1];
1178
-        else        $m = array(1,0,0,1,0,0);
1177
+        if ($nb)    $m = $this->_transf[$nb - 1];
1178
+        else        $m = array(1, 0, 0, 1, 0, 0);
1179 1179
 
1180 1180
         // if no transform, get the Identity Matrix
1181
-        if (!$n) $n = array(1,0,0,1,0,0);
1181
+        if (!$n) $n = array(1, 0, 0, 1, 0, 0);
1182 1182
 
1183 1183
         // create the new Transformation Matrix
1184 1184
         $this->_transf[] = array(
1185
-            $m[0]*$n[0]+$m[2]*$n[1],
1186
-            $m[1]*$n[0]+$m[3]*$n[1],
1187
-            $m[0]*$n[2]+$m[2]*$n[3],
1188
-            $m[1]*$n[2]+$m[3]*$n[3],
1189
-            $m[0]*$n[4]+$m[2]*$n[5]+$m[4],
1190
-            $m[1]*$n[4]+$m[3]*$n[5]+$m[5]
1185
+            $m[0] * $n[0] + $m[2] * $n[1],
1186
+            $m[1] * $n[0] + $m[3] * $n[1],
1187
+            $m[0] * $n[2] + $m[2] * $n[3],
1188
+            $m[1] * $n[2] + $m[3] * $n[3],
1189
+            $m[0] * $n[4] + $m[2] * $n[5] + $m[4],
1190
+            $m[1] * $n[4] + $m[3] * $n[5] + $m[5]
1191 1191
         );
1192 1192
     }
1193 1193
 
@@ -1228,7 +1228,7 @@  discard block
 block discarded – undo
1228 1228
         $this->write1DBarcode($code, $type, $x, $y, $w, $h, '', $style, 'N');
1229 1229
 
1230 1230
         // it Label => add the FontSize to the height
1231
-        if ($labelFontsize) $h+= ($labelFontsize);
1231
+        if ($labelFontsize) $h += ($labelFontsize);
1232 1232
 
1233 1233
         // return the size of the barcode
1234 1234
         return array($w, $h);
@@ -1269,48 +1269,48 @@  discard block
 block discarded – undo
1269 1269
         $this->Ln(10);
1270 1270
 
1271 1271
         // get the number of bookmarks
1272
-        $size=sizeof($this->outlines);
1272
+        $size = sizeof($this->outlines);
1273 1273
 
1274 1274
         // get the size of the "P. xx" cell
1275
-        $pageCellSize=$this->GetStringWidth('p. '.$this->outlines[$size-1]['p'])+2;
1275
+        $pageCellSize = $this->GetStringWidth('p. ' . $this->outlines[$size - 1]['p']) + 2;
1276 1276
 
1277 1277
         // Foreach bookmark
1278
-        for ($i=0;$i<$size;$i++) {
1278
+        for ($i = 0; $i < $size; $i++) {
1279 1279
             // if we need a new page => add a new page
1280
-            if ($this->getY()+$this->FontSize>=($this->h - $this->bMargin)) {
1280
+            if ($this->getY() + $this->FontSize >= ($this->h - $this->bMargin)) {
1281 1281
                 $obj->_INDEX_NewPage($page);
1282 1282
                 $this->SetFont($fontName, '', $sizeBookmark);
1283 1283
             }
1284 1284
 
1285 1285
             // Offset of the current level
1286
-            $level=$this->outlines[$i]['l'];
1287
-            if($level>0) $this->Cell($level*8);
1286
+            $level = $this->outlines[$i]['l'];
1287
+            if ($level > 0) $this->Cell($level * 8);
1288 1288
 
1289 1289
             // Caption (cut to fit on the width page)
1290
-            $str=$this->outlines[$i]['t'];
1291
-            $strsize=$this->GetStringWidth($str);
1292
-            $availableSize=$this->w-$this->lMargin-$this->rMargin-$pageCellSize-($level*8)-4;
1293
-            while ($strsize>=$availableSize) {
1294
-                $str=substr($str, 0, -1);
1295
-                $strsize=$this->GetStringWidth($str);
1290
+            $str = $this->outlines[$i]['t'];
1291
+            $strsize = $this->GetStringWidth($str);
1292
+            $availableSize = $this->w - $this->lMargin - $this->rMargin - $pageCellSize - ($level * 8) - 4;
1293
+            while ($strsize >= $availableSize) {
1294
+                $str = substr($str, 0, -1);
1295
+                $strsize = $this->GetStringWidth($str);
1296 1296
             }
1297 1297
 
1298 1298
             // if we want to display the page nmber
1299 1299
             if ($displayPage) {
1300 1300
                 // display the Bookmark Caption
1301
-                $this->Cell($strsize+2, $this->FontSize+2, $str);
1301
+                $this->Cell($strsize + 2, $this->FontSize + 2, $str);
1302 1302
 
1303 1303
                 //Filling dots
1304
-                $w=$this->w-$this->lMargin-$this->rMargin-$pageCellSize-($level*8)-($strsize+2);
1305
-                $nb=$w/$this->GetStringWidth('.');
1306
-                $dots=str_repeat('.', $nb);
1307
-                $this->Cell($w, $this->FontSize+2, $dots, 0, 0, 'R');
1304
+                $w = $this->w - $this->lMargin - $this->rMargin - $pageCellSize - ($level * 8) - ($strsize + 2);
1305
+                $nb = $w / $this->GetStringWidth('.');
1306
+                $dots = str_repeat('.', $nb);
1307
+                $this->Cell($w, $this->FontSize + 2, $dots, 0, 0, 'R');
1308 1308
 
1309 1309
                 //Page number
1310
-                $this->Cell($pageCellSize, $this->FontSize+2, 'p. '.$this->outlines[$i]['p'], 0, 1, 'R');
1310
+                $this->Cell($pageCellSize, $this->FontSize + 2, 'p. ' . $this->outlines[$i]['p'], 0, 1, 'R');
1311 1311
             } else {
1312 1312
                 // display the Bookmark Caption
1313
-                $this->Cell($strsize+2, $this->FontSize+2, $str, 0, 1);
1313
+                $this->Cell($strsize + 2, $this->FontSize + 2, $str, 0, 1);
1314 1314
             }
1315 1315
         }
1316 1316
     }
@@ -1324,11 +1324,11 @@  discard block
 block discarded – undo
1324 1324
      */
1325 1325
     public function getMyAliasNbPages()
1326 1326
     {
1327
-        if ($this->_myLastPageGroupNb==0) {
1327
+        if ($this->_myLastPageGroupNb == 0) {
1328 1328
             return $this->getAliasNbPages();
1329 1329
         } else {
1330 1330
             $old = $this->currpagegroup;
1331
-            $this->currpagegroup = '{nb'.$this->_myLastPageGroupNb.'}';
1331
+            $this->currpagegroup = '{nb' . $this->_myLastPageGroupNb . '}';
1332 1332
             $new = $this->getPageGroupAlias();
1333 1333
             $this->currpagegroup = $old;
1334 1334
 
@@ -1343,16 +1343,16 @@  discard block
 block discarded – undo
1343 1343
      * @param  integer $page
1344 1344
      * @return integer;
1345 1345
      */
1346
-    public function getMyNumPage($page=null)
1346
+    public function getMyNumPage($page = null)
1347 1347
     {
1348
-        if ($page===null) {
1348
+        if ($page === null) {
1349 1349
             $page = $this->page;
1350 1350
         }
1351 1351
 
1352
-        if ($this->_myLastPageGroupNb==0) {
1352
+        if ($this->_myLastPageGroupNb == 0) {
1353 1353
             return $page;
1354 1354
         } else {
1355
-            return $page-$this->_myLastPageGroup;
1355
+            return $page - $this->_myLastPageGroup;
1356 1356
         }
1357 1357
     }
1358 1358
 
@@ -1365,7 +1365,7 @@  discard block
 block discarded – undo
1365 1365
      */
1366 1366
     public function myStartPageGroup()
1367 1367
     {
1368
-        $this->_myLastPageGroup = $this->page-1;
1368
+        $this->_myLastPageGroup = $this->page - 1;
1369 1369
         $this->_myLastPageGroupNb++;
1370 1370
     }
1371 1371
 
Please login to merge, or discard this patch.
Braces   +73 added lines, -28 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 /**
3 5
  * HTML2PDF Librairy - myPdf class
4 6
  *
@@ -552,8 +554,12 @@  discard block
 block discarded – undo
552 554
     public function setRotation($angle, $xC=null, $yC=null)
553 555
     {
554 556
         // if no center, rotate around the current posiition
555
-        if($xC === null) $xC=$this->x;
556
-        if($yC === null) $yC=$this->y;
557
+        if($xC === null) {
558
+        	$xC=$this->x;
559
+        }
560
+        if($yC === null) {
561
+        	$yC=$this->y;
562
+        }
557 563
 
558 564
         // prepare the coordinate
559 565
         $yC=($this->h-$yC)*$this->k;
@@ -595,8 +601,9 @@  discard block
 block discarded – undo
595 601
      */
596 602
     public function SetY($y, $resetx=true, $rtloff=false)
597 603
     {
598
-        if ($resetx)
599
-            $this->x=$this->lMargin;
604
+        if ($resetx) {
605
+                    $this->x=$this->lMargin;
606
+        }
600 607
 
601 608
         $this->y=$y;
602 609
     }
@@ -713,9 +720,13 @@  discard block
 block discarded – undo
713 720
         $y4=$y+$h;
714 721
 
715 722
         // get the Closing operator from the PDF Style
716
-        if($style=='F') $op='f';
717
-        elseif($style=='FD' || $style=='DF') $op='B';
718
-        else $op='S';
723
+        if($style=='F') {
724
+        	$op='f';
725
+        } elseif($style=='FD' || $style=='DF') {
726
+        	$op='B';
727
+        } else {
728
+        	$op='S';
729
+        }
719 730
 
720 731
         // drawing
721 732
         $this->_Point($x1, $y1, true);
@@ -759,9 +770,13 @@  discard block
 block discarded – undo
759 770
     public function svgEllipse($x0, $y0, $rx, $ry, $style)
760 771
     {
761 772
         // get the Closing operator from the PDF Style
762
-        if($style=='F') $op='f';
763
-        elseif($style=='FD' || $style=='DF') $op='B';
764
-        else $op='S';
773
+        if($style=='F') {
774
+        	$op='f';
775
+        } elseif($style=='FD' || $style=='DF') {
776
+        	$op='B';
777
+        } else {
778
+        	$op='S';
779
+        }
765 780
 
766 781
         // drawing
767 782
         $this->_Arc($x0, $y0, $rx, $ry, 0, 2*M_PI, true, true, true);
@@ -778,9 +793,13 @@  discard block
 block discarded – undo
778 793
     public function svgPolygone($actions, $style)
779 794
     {
780 795
         // get the Closing operator from the PDF Style
781
-        if($style=='F') $op='f';
782
-        elseif($style=='FD' || $style=='DF') $op='B';
783
-        else $op='S';
796
+        if($style=='F') {
797
+        	$op='f';
798
+        } elseif($style=='FD' || $style=='DF') {
799
+        	$op='B';
800
+        } else {
801
+        	$op='S';
802
+        }
784 803
 
785 804
         // To save the First action and the last point
786 805
         $first = array('', 0, 0);
@@ -919,7 +938,9 @@  discard block
 block discarded – undo
919 938
      */
920 939
     protected function _Point($x, $y, $trans = false)
921 940
     {
922
-        if ($trans) $this->ptTransform($x, $y);
941
+        if ($trans) {
942
+        	$this->ptTransform($x, $y);
943
+        }
923 944
 
924 945
         $this->_out(sprintf('%.2F %.2F m', $x, $y));
925 946
     }
@@ -934,7 +955,9 @@  discard block
 block discarded – undo
934 955
      */
935 956
     protected function _Line($x, $y, $trans = false)
936 957
     {
937
-        if ($trans) $this->ptTransform($x, $y);
958
+        if ($trans) {
959
+        	$this->ptTransform($x, $y);
960
+        }
938 961
 
939 962
         $this->_out(sprintf('%.2F %.2F l', $x, $y));
940 963
     }
@@ -987,7 +1010,9 @@  discard block
 block discarded – undo
987 1010
         $trans=false)
988 1011
     {
989 1012
         // if we want the no trigo direction : add 2PI to the begin angle, to invert the direction
990
-        if (!$direction) $angleBegin+= M_PI*2.;
1013
+        if (!$direction) {
1014
+        	$angleBegin+= M_PI*2.;
1015
+        }
991 1016
 
992 1017
         // cut in segment to convert in berize curv
993 1018
         $dt = ($angleEnd - $angleBegin)/self::ARC_NB_SEGMENT;
@@ -1004,7 +1029,9 @@  discard block
 block discarded – undo
1004 1029
         $d0 = $ry * cos($t1);
1005 1030
 
1006 1031
         // if drawFirst => draw the first point
1007
-        if ($drawFirst) $this->_Point($a0, $b0, $trans);
1032
+        if ($drawFirst) {
1033
+        	$this->_Point($a0, $b0, $trans);
1034
+        }
1008 1035
 
1009 1036
         // foreach segment
1010 1037
         for ($i = 1; $i <= self::ARC_NB_SEGMENT; $i++) {
@@ -1091,7 +1118,9 @@  discard block
 block discarded – undo
1091 1118
         $v['s1']['y'] =-$v['s1']['xr']*sin($angle)+$v['s1']['yr']*cos($angle);
1092 1119
         $v['s1']['a1'] = atan2($v['y1']-$v['s1']['y'], $v['x1']-$v['s1']['x']);
1093 1120
         $v['s1']['a2'] = atan2($v['y2']-$v['s1']['y'], $v['x2']-$v['s1']['x']);
1094
-        if ($v['s1']['a1']>$v['s1']['a2']) $v['s1']['a1']-=2*M_PI;
1121
+        if ($v['s1']['a1']>$v['s1']['a2']) {
1122
+        	$v['s1']['a1']-=2*M_PI;
1123
+        }
1095 1124
 
1096 1125
         $v['s2'] = array();
1097 1126
         $v['s2']['t'] = -$v['s1']['t'];
@@ -1103,7 +1132,9 @@  discard block
 block discarded – undo
1103 1132
         $v['s2']['y'] =-$v['s2']['xr']*sin($angle)+$v['s2']['yr']*cos($angle);
1104 1133
         $v['s2']['a1'] = atan2($v['y1']-$v['s2']['y'], $v['x1']-$v['s2']['x']);
1105 1134
         $v['s2']['a2'] = atan2($v['y2']-$v['s2']['y'], $v['x2']-$v['s2']['x']);
1106
-        if ($v['s2']['a1']>$v['s2']['a2']) $v['s2']['a1']-=2*M_PI;
1135
+        if ($v['s2']['a1']>$v['s2']['a2']) {
1136
+        	$v['s2']['a1']-=2*M_PI;
1137
+        }
1107 1138
 
1108 1139
         if (!$l) {
1109 1140
             if ($s) {
@@ -1149,8 +1180,11 @@  discard block
 block discarded – undo
1149 1180
     {
1150 1181
         // load the last Transfomation Matrix
1151 1182
         $nb = count($this->_transf);
1152
-        if ($nb)    $m = $this->_transf[$nb-1];
1153
-        else        $m = array(1,0,0,1,0,0);
1183
+        if ($nb) {
1184
+        	$m = $this->_transf[$nb-1];
1185
+        } else {
1186
+        	$m = array(1,0,0,1,0,0);
1187
+        }
1154 1188
 
1155 1189
         // apply the Transformation Matrix
1156 1190
         list($x,$y) = array(($x*$m[0]+$y*$m[2]+$m[4]),($x*$m[1]+$y*$m[3]+$m[5]));
@@ -1174,11 +1208,16 @@  discard block
 block discarded – undo
1174 1208
     {
1175 1209
         // get the last Transformation Matrix
1176 1210
         $nb = count($this->_transf);
1177
-        if ($nb)    $m = $this->_transf[$nb-1];
1178
-        else        $m = array(1,0,0,1,0,0);
1211
+        if ($nb) {
1212
+        	$m = $this->_transf[$nb-1];
1213
+        } else {
1214
+        	$m = array(1,0,0,1,0,0);
1215
+        }
1179 1216
 
1180 1217
         // if no transform, get the Identity Matrix
1181
-        if (!$n) $n = array(1,0,0,1,0,0);
1218
+        if (!$n) {
1219
+        	$n = array(1,0,0,1,0,0);
1220
+        }
1182 1221
 
1183 1222
         // create the new Transformation Matrix
1184 1223
         $this->_transf[] = array(
@@ -1228,7 +1267,9 @@  discard block
 block discarded – undo
1228 1267
         $this->write1DBarcode($code, $type, $x, $y, $w, $h, '', $style, 'N');
1229 1268
 
1230 1269
         // it Label => add the FontSize to the height
1231
-        if ($labelFontsize) $h+= ($labelFontsize);
1270
+        if ($labelFontsize) {
1271
+        	$h+= ($labelFontsize);
1272
+        }
1232 1273
 
1233 1274
         // return the size of the barcode
1234 1275
         return array($w, $h);
@@ -1258,7 +1299,9 @@  discard block
 block discarded – undo
1258 1299
         $fontName = 'helvetica')
1259 1300
     {
1260 1301
         // bookmark the Title if wanted
1261
-        if ($bookmarkTitle) $this->Bookmark($titre, 0, -1);
1302
+        if ($bookmarkTitle) {
1303
+        	$this->Bookmark($titre, 0, -1);
1304
+        }
1262 1305
 
1263 1306
         // display the Title with the good Font size
1264 1307
         $this->SetFont($fontName, '', $sizeTitle);
@@ -1284,7 +1327,9 @@  discard block
 block discarded – undo
1284 1327
 
1285 1328
             // Offset of the current level
1286 1329
             $level=$this->outlines[$i]['l'];
1287
-            if($level>0) $this->Cell($level*8);
1330
+            if($level>0) {
1331
+            	$this->Cell($level*8);
1332
+            }
1288 1333
 
1289 1334
             // Caption (cut to fit on the width page)
1290 1335
             $str=$this->outlines[$i]['t'];
Please login to merge, or discard this patch.
includes/librairies/HTML2PDF/_class/parsingHtml.class.php 3 patches
Indentation   +506 added lines, -506 removed lines patch added patch discarded remove patch
@@ -11,510 +11,510 @@
 block discarded – undo
11 11
 
12 12
 class HTML2PDF_parsingHtml
13 13
 {
14
-    protected    $_html     = '';        // HTML code to parse
15
-    protected    $_num      = 0;         // table number
16
-    protected    $_level    = 0;         // table level
17
-    protected    $_encoding = '';        // encoding
18
-    public       $code      = array();   // parsed HTML codfe
19
-
20
-    const HTML_TAB = '        ';
21
-
22
-    /**
23
-     * main constructor
24
-     *
25
-     * @param   string encoding
26
-     * @access  public
27
-     */
28
-    public function __construct($encoding = 'UTF-8')
29
-    {
30
-        $this->_num   = 0;
31
-        $this->_level = array($this->_num);
32
-        $this->_html  = '';
33
-        $this->code  = array();
34
-        $this->setEncoding($encoding);
35
-    }
36
-
37
-    /**
38
-     * change the encoding
39
-     *
40
-     * @param   string encoding
41
-     * @access  public
42
-     */
43
-    public function setEncoding($encoding)
44
-    {
45
-        $this->_encoding = $encoding;
46
-    }
47
-
48
-    /**
49
-     * Define the HTML code to parse
50
-     *
51
-     * @param   string HTML code
52
-     * @access  public
53
-     */
54
-    public function setHTML($html)
55
-    {
56
-        // remove the HTML in comment
57
-        $html = preg_replace('/<!--(.*)-->/isU', '', $html);
58
-
59
-        // save the HTML code
60
-        $this->_html = $html;
61
-    }
62
-
63
-    /**
64
-     * parse the HTML code
65
-     *
66
-     * @access public
67
-     */
68
-    public function parse()
69
-    {
70
-        $parents = array();
71
-
72
-        // flag : are we in a <pre> Tag ?
73
-        $tagPreIn = false;
74
-
75
-        // action to use for each line of the content of a <pre> Tag
76
-        $tagPreBr = array(
77
-                    'name' => 'br',
78
-                    'close' => false,
79
-                    'param' => array(
80
-                        'style' => array(),
81
-                        'num'    => 0
82
-                    )
83
-                );
84
-
85
-        // tag that can be not closed
86
-        $tagsNotClosed = array(
87
-            'br', 'hr', 'img', 'col',
88
-            'input', 'link', 'option',
89
-            'circle', 'ellipse', 'path', 'rect', 'line', 'polygon', 'polyline'
90
-        );
91
-
92
-        // search the HTML tags
93
-        $tmp = array();
94
-        $this->_searchCode($tmp);
95
-
96
-        // all the actions to do
97
-        $actions = array();
98
-
99
-        // foreach part of the HTML code
100
-        foreach ($tmp as $part) {
101
-            // if it is a tag code
102
-            if ($part[0]=='code') {
103
-                // analise the HTML code
104
-                $res = $this->_analiseCode($part[1]);
105
-
106
-                // if it is a real HTML tag
107
-                if ($res) {
108
-                    // save the current posistion in the HTML code
109
-                    $res['html_pos'] = $part[2];
110
-
111
-                    // if the tag must be closed
112
-                    if (!in_array($res['name'], $tagsNotClosed)) {
113
-                        // if it is a closure tag
114
-                        if ($res['close']) {
115
-                            // HTML validation
116
-                            if (count($parents)<1)
117
-                                throw new HTML2PDF_exception(3, $res['name'], $this->getHtmlErrorCode($res['html_pos']));
118
-                            else if ($parents[count($parents)-1]!=$res['name'])
119
-                                throw new HTML2PDF_exception(4, $parents, $this->getHtmlErrorCode($res['html_pos']));
120
-                            else
121
-                                unset($parents[count($parents)-1]);
122
-                        } else {
123
-                            // if it is a autoclosed tag
124
-                            if ($res['autoclose']) {
125
-                                // save the opened tag
126
-                                $actions[] = $res;
127
-
128
-                                // prepare the closed tag
129
-                                $res['params'] = array();
130
-                                $res['close'] = true;
131
-                            }
132
-                            // else :add a child for validation
133
-                            else
134
-                                $parents[count($parents)] = $res['name'];
135
-                        }
136
-
137
-                        // if it is a <pre> tag (or <code> tag) not auclosed => update the flag
138
-                        if (($res['name']=='pre' || $res['name']=='code') && !$res['autoclose']) {
139
-                            $tagPreIn = !$res['close'];
140
-                        }
141
-                    }
142
-
143
-                    // save the actions to convert
144
-                    $actions[] = $res;
145
-                } else { // else (it is not a real HTML tag => we transform it in Texte
146
-                    $part[0]='txt';
147
-                }
148
-            }
149
-            // if it is text
150
-            if ($part[0]=='txt') {
151
-                // if we are not in a <pre> tag
152
-                if (!$tagPreIn) {
153
-                    // save the action
154
-                    $actions[] = array(
155
-                        'name'    => 'write',
156
-                        'close'    => false,
157
-                        'param' => array('txt' => $this->_prepareTxt($part[1])),
158
-                    );
159
-                } else { // else (if we are in a <pre> tag)
160
-                    // prepare the text
161
-                    $part[1] = str_replace("\r", '', $part[1]);
162
-                    $part[1] = explode("\n", $part[1]);
163
-
164
-                    // foreach line of the text
165
-                    foreach ($part[1] as $k => $txt) {
166
-                        // transform the line
167
-                        $txt = str_replace("\t", self::HTML_TAB, $txt);
168
-                        $txt = str_replace(' ', '&nbsp;', $txt);
169
-
170
-                        // add a break line
171
-                        if ($k>0) $actions[] = $tagPreBr;
172
-
173
-                        // save the action
174
-                        $actions[] = array(
175
-                            'name'    => 'write',
176
-                            'close'    => false,
177
-                            'param' => array('txt' => $this->_prepareTxt($txt, false)),
178
-                        );
179
-                    }
180
-                }
181
-            }
182
-        }
183
-
184
-        // for each indentified action, we have to clean up the begin and the end of the texte
185
-        // based on tags that surround it
186
-
187
-        // list of the tags to clean
188
-        $tagsToClean = array(
189
-            'page', 'page_header', 'page_footer', 'form',
190
-            'table', 'thead', 'tfoot', 'tr', 'td', 'th', 'br',
191
-            'div', 'hr', 'p', 'ul', 'ol', 'li',
192
-            'h1', 'h2', 'h3', 'h4', 'h5', 'h6',
193
-            'bookmark', 'fieldset', 'legend',
194
-            'draw', 'circle', 'ellipse', 'path', 'rect', 'line', 'g', 'polygon', 'polyline',
195
-            'option'
196
-        );
197
-
198
-        // foreach action
199
-        $nb = count($actions);
200
-        for ($k=0; $k<$nb; $k++) {
201
-            // if it is a Text
202
-            if ($actions[$k]['name']=='write') {
203
-                // if the tag before the text is a tag to clean => ltrim on the text
204
-                if ($k>0 && in_array($actions[$k-1]['name'], $tagsToClean))
205
-                    $actions[$k]['param']['txt'] = ltrim($actions[$k]['param']['txt']);
206
-
207
-                // if the tag after the text is a tag to clean => rtrim on the text
208
-                if ($k<$nb-1 && in_array($actions[$k+1]['name'], $tagsToClean))
209
-                    $actions[$k]['param']['txt'] = rtrim($actions[$k]['param']['txt']);
210
-
211
-                // if the text is empty => remove the action
212
-                if (!strlen($actions[$k]['param']['txt']))
213
-                    unset($actions[$k]);
214
-            }
215
-        }
216
-
217
-        // if we are not on the level 0 => HTML validator ERROR
218
-        if (count($parents)) throw new HTML2PDF_exception(5, $parents);
219
-
220
-        // save the actions to do
221
-        $this->code = array_values($actions);
222
-    }
223
-
224
-    /**
225
-     * prepare the text
226
-     *
227
-     * @param   string texte
228
-     * @param   boolean true => replace multiple space+\t+\r+\n by a single space
229
-     * @return  string texte
230
-     * @access  protected
231
-     */
232
-    protected function _prepareTxt($txt, $spaces = true)
233
-    {
234
-        if ($spaces) $txt = preg_replace('/\s+/is', ' ', $txt);
235
-        $txt = str_replace('&euro;', '€', $txt);
236
-        $txt = html_entity_decode($txt, ENT_QUOTES, $this->_encoding);
237
-        return $txt;
238
-    }
239
-
240
-    /**
241
-     * parse the HTML code
242
-     *
243
-     * @param    &array    array's result
244
-     * @return   null
245
-     */
246
-    protected function _searchCode(&$tmp)
247
-    {
248
-        // initialise the array
249
-        $tmp = array();
250
-
251
-        // regexp to separate the tags from the texts
252
-        $reg = '/(<[^>]+>)|([^<]+)+/isU';
253
-
254
-        // last match found
255
-        $str = '';
256
-        $offset = 0;
257
-
258
-        // As it finds a match
259
-        while (preg_match($reg, $this->_html, $parse, PREG_OFFSET_CAPTURE, $offset)) {
260
-            // if it is a tag
261
-            if ($parse[1][0]) {
262
-                // save the previous text if it exists
263
-                if ($str!=='')    $tmp[] = array('txt', $str);
264
-
265
-                // save the tag, with the offset
266
-                $tmp[] = array('code', trim($parse[1][0]), $offset);
267
-
268
-                // init the current text
269
-                $str = '';
270
-            } else { // else (if it is a text)
271
-                // add the new text to the current text
272
-                $str.= $parse[2][0];
273
-            }
274
-
275
-            // Update offset to the end of the match
276
-            $offset = $parse[0][1] + strlen($parse[0][0]);
277
-            unset($parse);
278
-        }
279
-        // if a text is present in the end, we save it
280
-        if ($str!='') $tmp[] = array('txt', $str);
281
-        unset($str);
282
-    }
283
-
284
-    /**
285
-     * analise a HTML tag
286
-     *
287
-     * @param   string   HTML code to analise
288
-     * @return  array    corresponding action
289
-     */
290
-    protected function _analiseCode($code)
291
-    {
292
-        // name of the tag, opening, closure, autoclosure
293
-        $tag = '<([\/]{0,1})([_a-z0-9]+)([\/>\s]+)';
294
-        if (!preg_match('/'.$tag.'/isU', $code, $match)) return null;
295
-        $close     = ($match[1]=='/' ? true : false);
296
-        $autoclose = preg_match('/\/>$/isU', $code);
297
-        $name      = strtolower($match[2]);
298
-
299
-        // required parameters (depends on the tag name)
300
-        $param    = array();
301
-        $param['style'] = '';
302
-        if ($name=='img') {
303
-            $param['alt'] = '';
304
-            $param['src'] = '';
305
-        }
306
-        if ($name=='a') {
307
-            $param['href'] = '';
308
-        }
309
-
310
-        // read the parameters : nom=valeur
311
-        $prop = '([a-zA-Z0-9_]+)=([^"\'\s>]+)';
312
-        preg_match_all('/'.$prop.'/is', $code, $match);
313
-        for($k=0; $k<count($match[0]); $k++)
314
-            $param[trim(strtolower($match[1][$k]))] = trim($match[2][$k]);
315
-
316
-        // read the parameters : nom="valeur"
317
-        $prop = '([a-zA-Z0-9_]+)=["]([^"]*)["]';
318
-        preg_match_all('/'.$prop.'/is', $code, $match);
319
-        for($k=0; $k<count($match[0]); $k++)
320
-            $param[trim(strtolower($match[1][$k]))] = trim($match[2][$k]);
321
-
322
-        // read the parameters : nom='valeur'
323
-        $prop = "([a-zA-Z0-9_]+)=[']([^']*)[']";
324
-        preg_match_all('/'.$prop.'/is', $code, $match);
325
-        for($k=0; $k<count($match[0]); $k++)
326
-            $param[trim(strtolower($match[1][$k]))] = trim($match[2][$k]);
327
-
328
-        // compliance of each parameter
329
-        $color  = "#000000";
330
-        $border = null;
331
-        foreach ($param as $key => $val) {
332
-            $key = strtolower($key);
333
-            switch($key)
334
-            {
335
-                case 'width':
336
-                    unset($param[$key]);
337
-                    $param['style'] .= 'width: '.$val.'px; ';
338
-                    break;
339
-
340
-                case 'align':
341
-                    if ($name==='img') {
342
-                        unset($param[$key]);
343
-                        $param['style'] .= 'float: '.$val.'; ';
344
-                    } elseif ($name!=='table') {
345
-                        unset($param[$key]);
346
-                        $param['style'] .= 'text-align: '.$val.'; ';
347
-                    }
348
-                    break;
349
-
350
-                case 'valign':
351
-                    unset($param[$key]);
352
-                    $param['style'] .= 'vertical-align: '.$val.'; ';
353
-                    break;
354
-
355
-                case 'height':
356
-                    unset($param[$key]);
357
-                    $param['style'] .= 'height: '.$val.'px; ';
358
-                    break;
359
-
360
-                case 'bgcolor':
361
-                    unset($param[$key]);
362
-                    $param['style'] .= 'background: '.$val.'; ';
363
-                    break;
364
-
365
-                case 'bordercolor':
366
-                    unset($param[$key]);
367
-                    $color = $val;
368
-                    break;
369
-
370
-                case 'border':
371
-                    unset($param[$key]);
372
-                    if (preg_match('/^[0-9]+$/isU', $val)) $val = $val.'px';
373
-                    $border = $val;
374
-                    break;
375
-
376
-                case 'cellpadding':
377
-                case 'cellspacing':
378
-                    if (preg_match('/^([0-9]+)$/isU', $val)) $param[$key] = $val.'px';
379
-                    break;
380
-
381
-                case 'colspan':
382
-                case 'rowspan':
383
-                    $val = preg_replace('/[^0-9]/isU', '', $val);
384
-                    if (!$val) $val = 1;
385
-                    $param[$key] = $val;
386
-                    break;
387
-            }
388
-        }
389
-
390
-        // compliance of the border
391
-        if ($border!==null) {
392
-            if ($border)    $border = 'border: solid '.$border.' '.$color;
393
-            else            $border = 'border: none';
394
-
395
-            $param['style'] .= $border.'; ';
396
-            $param['border'] = $border;
397
-        }
398
-
399
-        // reading styles: decomposition and standardization
400
-        $styles = explode(';', $param['style']);
401
-        $param['style'] = array();
402
-        foreach ($styles as $style) {
403
-            $tmp = explode(':', $style);
404
-            if (count($tmp)>1) {
405
-                $cod = $tmp[0];
406
-                unset($tmp[0]);
407
-                $tmp = implode(':', $tmp);
408
-                $param['style'][trim(strtolower($cod))] = preg_replace('/[\s]+/isU', ' ', trim($tmp));
409
-            }
410
-        }
411
-
412
-        // determining the level of table opening, with an added level
413
-        if (in_array($name, array('ul', 'ol', 'table')) && !$close) {
414
-            $this->_num++;
415
-            $this->_level[count($this->_level)] = $this->_num;
416
-        }
417
-
418
-        // get the level of the table containing the element
419
-        if (!isset($param['num'])) {
420
-            $param['num'] = $this->_level[count($this->_level)-1];
421
-        }
422
-
423
-        // for closures table: remove a level
424
-        if (in_array($name, array('ul', 'ol', 'table')) && $close) {
425
-            unset($this->_level[count($this->_level)-1]);
426
-        }
427
-
428
-        // prepare the parameters
429
-        if (isset($param['value']))  $param['value']  = $this->_prepareTxt($param['value']);
430
-        if (isset($param['alt']))    $param['alt']    = $this->_prepareTxt($param['alt']);
431
-        if (isset($param['title']))  $param['title']  = $this->_prepareTxt($param['title']);
432
-        if (isset($param['class']))  $param['class']  = $this->_prepareTxt($param['class']);
433
-
434
-        // return the new action to do
435
-        return array('name' => $name, 'close' => $close ? 1 : 0, 'autoclose' => $autoclose, 'param' => $param);
436
-    }
437
-
438
-    /**
439
-     * get a full level of HTML, between an opening and closing corresponding
440
-     *
441
-     * @param   integer key
442
-     * @return  array   actions
443
-     */
444
-    public function getLevel($k)
445
-    {
446
-        // if the code does not exist => return empty
447
-        if (!isset($this->code[$k])) return array();
448
-
449
-        // the tag to detect
450
-        $detect = $this->code[$k]['name'];
451
-
452
-        // if it is a text => return
453
-        if ($detect=='write') {
454
-            return array($this->code[$k]);
455
-        }
456
-
457
-        //
458
-        $level = 0;      // depth level
459
-        $end = false;    // end of the search
460
-        $code = array(); // extract code
461
-
462
-        // while it's not ended
463
-        while (!$end) {
464
-            // current action
465
-            $row = $this->code[$k];
466
-
467
-            // if 'write' => we add the text
468
-            if ($row['name']=='write') {
469
-                $code[] = $row;
470
-            } else { // else, it is a html tag
471
-                $not = false; // flag for not taking into account the current tag
472
-
473
-                // if it is the searched tag
474
-                if ($row['name']==$detect) {
475
-                    // if we are just at the root level => dont take it
476
-                    if ($level==0) {
477
-                        $not = true;
478
-                    }
479
-
480
-                    // update the level
481
-                    $level+= ($row['close'] ? -1 : 1);
482
-
483
-                    // if we are now at the root level => it is the end, and dont take it
484
-                    if ($level==0) {
485
-                        $not = true;
486
-                        $end = true;
487
-                    }
488
-                }
489
-
490
-                // if we can takin into account the current tag => save it
491
-                if (!$not) {
492
-                    if (isset($row['style']['text-align'])) unset($row['style']['text-align']);
493
-                    $code[] = $row;
494
-                }
495
-            }
496
-
497
-            // it continues as long as there has code to analise
498
-            if (isset($this->code[$k+1]))
499
-                $k++;
500
-            else
501
-                $end = true;
502
-        }
503
-
504
-        // return the extract
505
-        return $code;
506
-    }
507
-
508
-    /**
509
-     * return a part of the HTML code, for error message
510
-     *
511
-     * @param   integer position
512
-     * @param   integer take before
513
-     * @param   integer take after
514
-     * @return  string  part of the html code
515
-     */
516
-    public function getHtmlErrorCode($pos, $before=30, $after=40)
517
-    {
518
-        return substr($this->_html, $pos-$before, $before+$after);
519
-    }
14
+	protected    $_html     = '';        // HTML code to parse
15
+	protected    $_num      = 0;         // table number
16
+	protected    $_level    = 0;         // table level
17
+	protected    $_encoding = '';        // encoding
18
+	public       $code      = array();   // parsed HTML codfe
19
+
20
+	const HTML_TAB = '        ';
21
+
22
+	/**
23
+	 * main constructor
24
+	 *
25
+	 * @param   string encoding
26
+	 * @access  public
27
+	 */
28
+	public function __construct($encoding = 'UTF-8')
29
+	{
30
+		$this->_num   = 0;
31
+		$this->_level = array($this->_num);
32
+		$this->_html  = '';
33
+		$this->code  = array();
34
+		$this->setEncoding($encoding);
35
+	}
36
+
37
+	/**
38
+	 * change the encoding
39
+	 *
40
+	 * @param   string encoding
41
+	 * @access  public
42
+	 */
43
+	public function setEncoding($encoding)
44
+	{
45
+		$this->_encoding = $encoding;
46
+	}
47
+
48
+	/**
49
+	 * Define the HTML code to parse
50
+	 *
51
+	 * @param   string HTML code
52
+	 * @access  public
53
+	 */
54
+	public function setHTML($html)
55
+	{
56
+		// remove the HTML in comment
57
+		$html = preg_replace('/<!--(.*)-->/isU', '', $html);
58
+
59
+		// save the HTML code
60
+		$this->_html = $html;
61
+	}
62
+
63
+	/**
64
+	 * parse the HTML code
65
+	 *
66
+	 * @access public
67
+	 */
68
+	public function parse()
69
+	{
70
+		$parents = array();
71
+
72
+		// flag : are we in a <pre> Tag ?
73
+		$tagPreIn = false;
74
+
75
+		// action to use for each line of the content of a <pre> Tag
76
+		$tagPreBr = array(
77
+					'name' => 'br',
78
+					'close' => false,
79
+					'param' => array(
80
+						'style' => array(),
81
+						'num'    => 0
82
+					)
83
+				);
84
+
85
+		// tag that can be not closed
86
+		$tagsNotClosed = array(
87
+			'br', 'hr', 'img', 'col',
88
+			'input', 'link', 'option',
89
+			'circle', 'ellipse', 'path', 'rect', 'line', 'polygon', 'polyline'
90
+		);
91
+
92
+		// search the HTML tags
93
+		$tmp = array();
94
+		$this->_searchCode($tmp);
95
+
96
+		// all the actions to do
97
+		$actions = array();
98
+
99
+		// foreach part of the HTML code
100
+		foreach ($tmp as $part) {
101
+			// if it is a tag code
102
+			if ($part[0]=='code') {
103
+				// analise the HTML code
104
+				$res = $this->_analiseCode($part[1]);
105
+
106
+				// if it is a real HTML tag
107
+				if ($res) {
108
+					// save the current posistion in the HTML code
109
+					$res['html_pos'] = $part[2];
110
+
111
+					// if the tag must be closed
112
+					if (!in_array($res['name'], $tagsNotClosed)) {
113
+						// if it is a closure tag
114
+						if ($res['close']) {
115
+							// HTML validation
116
+							if (count($parents)<1)
117
+								throw new HTML2PDF_exception(3, $res['name'], $this->getHtmlErrorCode($res['html_pos']));
118
+							else if ($parents[count($parents)-1]!=$res['name'])
119
+								throw new HTML2PDF_exception(4, $parents, $this->getHtmlErrorCode($res['html_pos']));
120
+							else
121
+								unset($parents[count($parents)-1]);
122
+						} else {
123
+							// if it is a autoclosed tag
124
+							if ($res['autoclose']) {
125
+								// save the opened tag
126
+								$actions[] = $res;
127
+
128
+								// prepare the closed tag
129
+								$res['params'] = array();
130
+								$res['close'] = true;
131
+							}
132
+							// else :add a child for validation
133
+							else
134
+								$parents[count($parents)] = $res['name'];
135
+						}
136
+
137
+						// if it is a <pre> tag (or <code> tag) not auclosed => update the flag
138
+						if (($res['name']=='pre' || $res['name']=='code') && !$res['autoclose']) {
139
+							$tagPreIn = !$res['close'];
140
+						}
141
+					}
142
+
143
+					// save the actions to convert
144
+					$actions[] = $res;
145
+				} else { // else (it is not a real HTML tag => we transform it in Texte
146
+					$part[0]='txt';
147
+				}
148
+			}
149
+			// if it is text
150
+			if ($part[0]=='txt') {
151
+				// if we are not in a <pre> tag
152
+				if (!$tagPreIn) {
153
+					// save the action
154
+					$actions[] = array(
155
+						'name'    => 'write',
156
+						'close'    => false,
157
+						'param' => array('txt' => $this->_prepareTxt($part[1])),
158
+					);
159
+				} else { // else (if we are in a <pre> tag)
160
+					// prepare the text
161
+					$part[1] = str_replace("\r", '', $part[1]);
162
+					$part[1] = explode("\n", $part[1]);
163
+
164
+					// foreach line of the text
165
+					foreach ($part[1] as $k => $txt) {
166
+						// transform the line
167
+						$txt = str_replace("\t", self::HTML_TAB, $txt);
168
+						$txt = str_replace(' ', '&nbsp;', $txt);
169
+
170
+						// add a break line
171
+						if ($k>0) $actions[] = $tagPreBr;
172
+
173
+						// save the action
174
+						$actions[] = array(
175
+							'name'    => 'write',
176
+							'close'    => false,
177
+							'param' => array('txt' => $this->_prepareTxt($txt, false)),
178
+						);
179
+					}
180
+				}
181
+			}
182
+		}
183
+
184
+		// for each indentified action, we have to clean up the begin and the end of the texte
185
+		// based on tags that surround it
186
+
187
+		// list of the tags to clean
188
+		$tagsToClean = array(
189
+			'page', 'page_header', 'page_footer', 'form',
190
+			'table', 'thead', 'tfoot', 'tr', 'td', 'th', 'br',
191
+			'div', 'hr', 'p', 'ul', 'ol', 'li',
192
+			'h1', 'h2', 'h3', 'h4', 'h5', 'h6',
193
+			'bookmark', 'fieldset', 'legend',
194
+			'draw', 'circle', 'ellipse', 'path', 'rect', 'line', 'g', 'polygon', 'polyline',
195
+			'option'
196
+		);
197
+
198
+		// foreach action
199
+		$nb = count($actions);
200
+		for ($k=0; $k<$nb; $k++) {
201
+			// if it is a Text
202
+			if ($actions[$k]['name']=='write') {
203
+				// if the tag before the text is a tag to clean => ltrim on the text
204
+				if ($k>0 && in_array($actions[$k-1]['name'], $tagsToClean))
205
+					$actions[$k]['param']['txt'] = ltrim($actions[$k]['param']['txt']);
206
+
207
+				// if the tag after the text is a tag to clean => rtrim on the text
208
+				if ($k<$nb-1 && in_array($actions[$k+1]['name'], $tagsToClean))
209
+					$actions[$k]['param']['txt'] = rtrim($actions[$k]['param']['txt']);
210
+
211
+				// if the text is empty => remove the action
212
+				if (!strlen($actions[$k]['param']['txt']))
213
+					unset($actions[$k]);
214
+			}
215
+		}
216
+
217
+		// if we are not on the level 0 => HTML validator ERROR
218
+		if (count($parents)) throw new HTML2PDF_exception(5, $parents);
219
+
220
+		// save the actions to do
221
+		$this->code = array_values($actions);
222
+	}
223
+
224
+	/**
225
+	 * prepare the text
226
+	 *
227
+	 * @param   string texte
228
+	 * @param   boolean true => replace multiple space+\t+\r+\n by a single space
229
+	 * @return  string texte
230
+	 * @access  protected
231
+	 */
232
+	protected function _prepareTxt($txt, $spaces = true)
233
+	{
234
+		if ($spaces) $txt = preg_replace('/\s+/is', ' ', $txt);
235
+		$txt = str_replace('&euro;', '€', $txt);
236
+		$txt = html_entity_decode($txt, ENT_QUOTES, $this->_encoding);
237
+		return $txt;
238
+	}
239
+
240
+	/**
241
+	 * parse the HTML code
242
+	 *
243
+	 * @param    &array    array's result
244
+	 * @return   null
245
+	 */
246
+	protected function _searchCode(&$tmp)
247
+	{
248
+		// initialise the array
249
+		$tmp = array();
250
+
251
+		// regexp to separate the tags from the texts
252
+		$reg = '/(<[^>]+>)|([^<]+)+/isU';
253
+
254
+		// last match found
255
+		$str = '';
256
+		$offset = 0;
257
+
258
+		// As it finds a match
259
+		while (preg_match($reg, $this->_html, $parse, PREG_OFFSET_CAPTURE, $offset)) {
260
+			// if it is a tag
261
+			if ($parse[1][0]) {
262
+				// save the previous text if it exists
263
+				if ($str!=='')    $tmp[] = array('txt', $str);
264
+
265
+				// save the tag, with the offset
266
+				$tmp[] = array('code', trim($parse[1][0]), $offset);
267
+
268
+				// init the current text
269
+				$str = '';
270
+			} else { // else (if it is a text)
271
+				// add the new text to the current text
272
+				$str.= $parse[2][0];
273
+			}
274
+
275
+			// Update offset to the end of the match
276
+			$offset = $parse[0][1] + strlen($parse[0][0]);
277
+			unset($parse);
278
+		}
279
+		// if a text is present in the end, we save it
280
+		if ($str!='') $tmp[] = array('txt', $str);
281
+		unset($str);
282
+	}
283
+
284
+	/**
285
+	 * analise a HTML tag
286
+	 *
287
+	 * @param   string   HTML code to analise
288
+	 * @return  array    corresponding action
289
+	 */
290
+	protected function _analiseCode($code)
291
+	{
292
+		// name of the tag, opening, closure, autoclosure
293
+		$tag = '<([\/]{0,1})([_a-z0-9]+)([\/>\s]+)';
294
+		if (!preg_match('/'.$tag.'/isU', $code, $match)) return null;
295
+		$close     = ($match[1]=='/' ? true : false);
296
+		$autoclose = preg_match('/\/>$/isU', $code);
297
+		$name      = strtolower($match[2]);
298
+
299
+		// required parameters (depends on the tag name)
300
+		$param    = array();
301
+		$param['style'] = '';
302
+		if ($name=='img') {
303
+			$param['alt'] = '';
304
+			$param['src'] = '';
305
+		}
306
+		if ($name=='a') {
307
+			$param['href'] = '';
308
+		}
309
+
310
+		// read the parameters : nom=valeur
311
+		$prop = '([a-zA-Z0-9_]+)=([^"\'\s>]+)';
312
+		preg_match_all('/'.$prop.'/is', $code, $match);
313
+		for($k=0; $k<count($match[0]); $k++)
314
+			$param[trim(strtolower($match[1][$k]))] = trim($match[2][$k]);
315
+
316
+		// read the parameters : nom="valeur"
317
+		$prop = '([a-zA-Z0-9_]+)=["]([^"]*)["]';
318
+		preg_match_all('/'.$prop.'/is', $code, $match);
319
+		for($k=0; $k<count($match[0]); $k++)
320
+			$param[trim(strtolower($match[1][$k]))] = trim($match[2][$k]);
321
+
322
+		// read the parameters : nom='valeur'
323
+		$prop = "([a-zA-Z0-9_]+)=[']([^']*)[']";
324
+		preg_match_all('/'.$prop.'/is', $code, $match);
325
+		for($k=0; $k<count($match[0]); $k++)
326
+			$param[trim(strtolower($match[1][$k]))] = trim($match[2][$k]);
327
+
328
+		// compliance of each parameter
329
+		$color  = "#000000";
330
+		$border = null;
331
+		foreach ($param as $key => $val) {
332
+			$key = strtolower($key);
333
+			switch($key)
334
+			{
335
+				case 'width':
336
+					unset($param[$key]);
337
+					$param['style'] .= 'width: '.$val.'px; ';
338
+					break;
339
+
340
+				case 'align':
341
+					if ($name==='img') {
342
+						unset($param[$key]);
343
+						$param['style'] .= 'float: '.$val.'; ';
344
+					} elseif ($name!=='table') {
345
+						unset($param[$key]);
346
+						$param['style'] .= 'text-align: '.$val.'; ';
347
+					}
348
+					break;
349
+
350
+				case 'valign':
351
+					unset($param[$key]);
352
+					$param['style'] .= 'vertical-align: '.$val.'; ';
353
+					break;
354
+
355
+				case 'height':
356
+					unset($param[$key]);
357
+					$param['style'] .= 'height: '.$val.'px; ';
358
+					break;
359
+
360
+				case 'bgcolor':
361
+					unset($param[$key]);
362
+					$param['style'] .= 'background: '.$val.'; ';
363
+					break;
364
+
365
+				case 'bordercolor':
366
+					unset($param[$key]);
367
+					$color = $val;
368
+					break;
369
+
370
+				case 'border':
371
+					unset($param[$key]);
372
+					if (preg_match('/^[0-9]+$/isU', $val)) $val = $val.'px';
373
+					$border = $val;
374
+					break;
375
+
376
+				case 'cellpadding':
377
+				case 'cellspacing':
378
+					if (preg_match('/^([0-9]+)$/isU', $val)) $param[$key] = $val.'px';
379
+					break;
380
+
381
+				case 'colspan':
382
+				case 'rowspan':
383
+					$val = preg_replace('/[^0-9]/isU', '', $val);
384
+					if (!$val) $val = 1;
385
+					$param[$key] = $val;
386
+					break;
387
+			}
388
+		}
389
+
390
+		// compliance of the border
391
+		if ($border!==null) {
392
+			if ($border)    $border = 'border: solid '.$border.' '.$color;
393
+			else            $border = 'border: none';
394
+
395
+			$param['style'] .= $border.'; ';
396
+			$param['border'] = $border;
397
+		}
398
+
399
+		// reading styles: decomposition and standardization
400
+		$styles = explode(';', $param['style']);
401
+		$param['style'] = array();
402
+		foreach ($styles as $style) {
403
+			$tmp = explode(':', $style);
404
+			if (count($tmp)>1) {
405
+				$cod = $tmp[0];
406
+				unset($tmp[0]);
407
+				$tmp = implode(':', $tmp);
408
+				$param['style'][trim(strtolower($cod))] = preg_replace('/[\s]+/isU', ' ', trim($tmp));
409
+			}
410
+		}
411
+
412
+		// determining the level of table opening, with an added level
413
+		if (in_array($name, array('ul', 'ol', 'table')) && !$close) {
414
+			$this->_num++;
415
+			$this->_level[count($this->_level)] = $this->_num;
416
+		}
417
+
418
+		// get the level of the table containing the element
419
+		if (!isset($param['num'])) {
420
+			$param['num'] = $this->_level[count($this->_level)-1];
421
+		}
422
+
423
+		// for closures table: remove a level
424
+		if (in_array($name, array('ul', 'ol', 'table')) && $close) {
425
+			unset($this->_level[count($this->_level)-1]);
426
+		}
427
+
428
+		// prepare the parameters
429
+		if (isset($param['value']))  $param['value']  = $this->_prepareTxt($param['value']);
430
+		if (isset($param['alt']))    $param['alt']    = $this->_prepareTxt($param['alt']);
431
+		if (isset($param['title']))  $param['title']  = $this->_prepareTxt($param['title']);
432
+		if (isset($param['class']))  $param['class']  = $this->_prepareTxt($param['class']);
433
+
434
+		// return the new action to do
435
+		return array('name' => $name, 'close' => $close ? 1 : 0, 'autoclose' => $autoclose, 'param' => $param);
436
+	}
437
+
438
+	/**
439
+	 * get a full level of HTML, between an opening and closing corresponding
440
+	 *
441
+	 * @param   integer key
442
+	 * @return  array   actions
443
+	 */
444
+	public function getLevel($k)
445
+	{
446
+		// if the code does not exist => return empty
447
+		if (!isset($this->code[$k])) return array();
448
+
449
+		// the tag to detect
450
+		$detect = $this->code[$k]['name'];
451
+
452
+		// if it is a text => return
453
+		if ($detect=='write') {
454
+			return array($this->code[$k]);
455
+		}
456
+
457
+		//
458
+		$level = 0;      // depth level
459
+		$end = false;    // end of the search
460
+		$code = array(); // extract code
461
+
462
+		// while it's not ended
463
+		while (!$end) {
464
+			// current action
465
+			$row = $this->code[$k];
466
+
467
+			// if 'write' => we add the text
468
+			if ($row['name']=='write') {
469
+				$code[] = $row;
470
+			} else { // else, it is a html tag
471
+				$not = false; // flag for not taking into account the current tag
472
+
473
+				// if it is the searched tag
474
+				if ($row['name']==$detect) {
475
+					// if we are just at the root level => dont take it
476
+					if ($level==0) {
477
+						$not = true;
478
+					}
479
+
480
+					// update the level
481
+					$level+= ($row['close'] ? -1 : 1);
482
+
483
+					// if we are now at the root level => it is the end, and dont take it
484
+					if ($level==0) {
485
+						$not = true;
486
+						$end = true;
487
+					}
488
+				}
489
+
490
+				// if we can takin into account the current tag => save it
491
+				if (!$not) {
492
+					if (isset($row['style']['text-align'])) unset($row['style']['text-align']);
493
+					$code[] = $row;
494
+				}
495
+			}
496
+
497
+			// it continues as long as there has code to analise
498
+			if (isset($this->code[$k+1]))
499
+				$k++;
500
+			else
501
+				$end = true;
502
+		}
503
+
504
+		// return the extract
505
+		return $code;
506
+	}
507
+
508
+	/**
509
+	 * return a part of the HTML code, for error message
510
+	 *
511
+	 * @param   integer position
512
+	 * @param   integer take before
513
+	 * @param   integer take after
514
+	 * @return  string  part of the html code
515
+	 */
516
+	public function getHtmlErrorCode($pos, $before=30, $after=40)
517
+	{
518
+		return substr($this->_html, $pos-$before, $before+$after);
519
+	}
520 520
 }
521 521
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 /**
3 3
  * HTML2PDF Librairy - parsingHtml class
4 4
  *
@@ -11,11 +11,11 @@  discard block
 block discarded – undo
11 11
 
12 12
 class HTML2PDF_parsingHtml
13 13
 {
14
-    protected    $_html     = '';        // HTML code to parse
15
-    protected    $_num      = 0;         // table number
16
-    protected    $_level    = 0;         // table level
17
-    protected    $_encoding = '';        // encoding
18
-    public       $code      = array();   // parsed HTML codfe
14
+    protected    $_html     = ''; // HTML code to parse
15
+    protected    $_num      = 0; // table number
16
+    protected    $_level    = 0; // table level
17
+    protected    $_encoding = ''; // encoding
18
+    public       $code      = array(); // parsed HTML codfe
19 19
 
20 20
     const HTML_TAB = '        ';
21 21
 
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         $this->_num   = 0;
31 31
         $this->_level = array($this->_num);
32 32
         $this->_html  = '';
33
-        $this->code  = array();
33
+        $this->code = array();
34 34
         $this->setEncoding($encoding);
35 35
     }
36 36
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         // foreach part of the HTML code
100 100
         foreach ($tmp as $part) {
101 101
             // if it is a tag code
102
-            if ($part[0]=='code') {
102
+            if ($part[0] == 'code') {
103 103
                 // analise the HTML code
104 104
                 $res = $this->_analiseCode($part[1]);
105 105
 
@@ -113,12 +113,12 @@  discard block
 block discarded – undo
113 113
                         // if it is a closure tag
114 114
                         if ($res['close']) {
115 115
                             // HTML validation
116
-                            if (count($parents)<1)
116
+                            if (count($parents) < 1)
117 117
                                 throw new HTML2PDF_exception(3, $res['name'], $this->getHtmlErrorCode($res['html_pos']));
118
-                            else if ($parents[count($parents)-1]!=$res['name'])
118
+                            else if ($parents[count($parents) - 1] != $res['name'])
119 119
                                 throw new HTML2PDF_exception(4, $parents, $this->getHtmlErrorCode($res['html_pos']));
120 120
                             else
121
-                                unset($parents[count($parents)-1]);
121
+                                unset($parents[count($parents) - 1]);
122 122
                         } else {
123 123
                             // if it is a autoclosed tag
124 124
                             if ($res['autoclose']) {
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
                         }
136 136
 
137 137
                         // if it is a <pre> tag (or <code> tag) not auclosed => update the flag
138
-                        if (($res['name']=='pre' || $res['name']=='code') && !$res['autoclose']) {
138
+                        if (($res['name'] == 'pre' || $res['name'] == 'code') && !$res['autoclose']) {
139 139
                             $tagPreIn = !$res['close'];
140 140
                         }
141 141
                     }
@@ -143,11 +143,11 @@  discard block
 block discarded – undo
143 143
                     // save the actions to convert
144 144
                     $actions[] = $res;
145 145
                 } else { // else (it is not a real HTML tag => we transform it in Texte
146
-                    $part[0]='txt';
146
+                    $part[0] = 'txt';
147 147
                 }
148 148
             }
149 149
             // if it is text
150
-            if ($part[0]=='txt') {
150
+            if ($part[0] == 'txt') {
151 151
                 // if we are not in a <pre> tag
152 152
                 if (!$tagPreIn) {
153 153
                     // save the action
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
                         $txt = str_replace(' ', '&nbsp;', $txt);
169 169
 
170 170
                         // add a break line
171
-                        if ($k>0) $actions[] = $tagPreBr;
171
+                        if ($k > 0) $actions[] = $tagPreBr;
172 172
 
173 173
                         // save the action
174 174
                         $actions[] = array(
@@ -197,15 +197,15 @@  discard block
 block discarded – undo
197 197
 
198 198
         // foreach action
199 199
         $nb = count($actions);
200
-        for ($k=0; $k<$nb; $k++) {
200
+        for ($k = 0; $k < $nb; $k++) {
201 201
             // if it is a Text
202
-            if ($actions[$k]['name']=='write') {
202
+            if ($actions[$k]['name'] == 'write') {
203 203
                 // if the tag before the text is a tag to clean => ltrim on the text
204
-                if ($k>0 && in_array($actions[$k-1]['name'], $tagsToClean))
204
+                if ($k > 0 && in_array($actions[$k - 1]['name'], $tagsToClean))
205 205
                     $actions[$k]['param']['txt'] = ltrim($actions[$k]['param']['txt']);
206 206
 
207 207
                 // if the tag after the text is a tag to clean => rtrim on the text
208
-                if ($k<$nb-1 && in_array($actions[$k+1]['name'], $tagsToClean))
208
+                if ($k < $nb - 1 && in_array($actions[$k + 1]['name'], $tagsToClean))
209 209
                     $actions[$k]['param']['txt'] = rtrim($actions[$k]['param']['txt']);
210 210
 
211 211
                 // if the text is empty => remove the action
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
             // if it is a tag
261 261
             if ($parse[1][0]) {
262 262
                 // save the previous text if it exists
263
-                if ($str!=='')    $tmp[] = array('txt', $str);
263
+                if ($str !== '')    $tmp[] = array('txt', $str);
264 264
 
265 265
                 // save the tag, with the offset
266 266
                 $tmp[] = array('code', trim($parse[1][0]), $offset);
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
                 $str = '';
270 270
             } else { // else (if it is a text)
271 271
                 // add the new text to the current text
272
-                $str.= $parse[2][0];
272
+                $str .= $parse[2][0];
273 273
             }
274 274
 
275 275
             // Update offset to the end of the match
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
             unset($parse);
278 278
         }
279 279
         // if a text is present in the end, we save it
280
-        if ($str!='') $tmp[] = array('txt', $str);
280
+        if ($str != '') $tmp[] = array('txt', $str);
281 281
         unset($str);
282 282
     }
283 283
 
@@ -291,38 +291,38 @@  discard block
 block discarded – undo
291 291
     {
292 292
         // name of the tag, opening, closure, autoclosure
293 293
         $tag = '<([\/]{0,1})([_a-z0-9]+)([\/>\s]+)';
294
-        if (!preg_match('/'.$tag.'/isU', $code, $match)) return null;
295
-        $close     = ($match[1]=='/' ? true : false);
294
+        if (!preg_match('/' . $tag . '/isU', $code, $match)) return null;
295
+        $close     = ($match[1] == '/' ? true : false);
296 296
         $autoclose = preg_match('/\/>$/isU', $code);
297 297
         $name      = strtolower($match[2]);
298 298
 
299 299
         // required parameters (depends on the tag name)
300
-        $param    = array();
300
+        $param = array();
301 301
         $param['style'] = '';
302
-        if ($name=='img') {
302
+        if ($name == 'img') {
303 303
             $param['alt'] = '';
304 304
             $param['src'] = '';
305 305
         }
306
-        if ($name=='a') {
306
+        if ($name == 'a') {
307 307
             $param['href'] = '';
308 308
         }
309 309
 
310 310
         // read the parameters : nom=valeur
311 311
         $prop = '([a-zA-Z0-9_]+)=([^"\'\s>]+)';
312
-        preg_match_all('/'.$prop.'/is', $code, $match);
313
-        for($k=0; $k<count($match[0]); $k++)
312
+        preg_match_all('/' . $prop . '/is', $code, $match);
313
+        for ($k = 0; $k < count($match[0]); $k++)
314 314
             $param[trim(strtolower($match[1][$k]))] = trim($match[2][$k]);
315 315
 
316 316
         // read the parameters : nom="valeur"
317 317
         $prop = '([a-zA-Z0-9_]+)=["]([^"]*)["]';
318
-        preg_match_all('/'.$prop.'/is', $code, $match);
319
-        for($k=0; $k<count($match[0]); $k++)
318
+        preg_match_all('/' . $prop . '/is', $code, $match);
319
+        for ($k = 0; $k < count($match[0]); $k++)
320 320
             $param[trim(strtolower($match[1][$k]))] = trim($match[2][$k]);
321 321
 
322 322
         // read the parameters : nom='valeur'
323 323
         $prop = "([a-zA-Z0-9_]+)=[']([^']*)[']";
324
-        preg_match_all('/'.$prop.'/is', $code, $match);
325
-        for($k=0; $k<count($match[0]); $k++)
324
+        preg_match_all('/' . $prop . '/is', $code, $match);
325
+        for ($k = 0; $k < count($match[0]); $k++)
326 326
             $param[trim(strtolower($match[1][$k]))] = trim($match[2][$k]);
327 327
 
328 328
         // compliance of each parameter
@@ -330,36 +330,36 @@  discard block
 block discarded – undo
330 330
         $border = null;
331 331
         foreach ($param as $key => $val) {
332 332
             $key = strtolower($key);
333
-            switch($key)
333
+            switch ($key)
334 334
             {
335 335
                 case 'width':
336 336
                     unset($param[$key]);
337
-                    $param['style'] .= 'width: '.$val.'px; ';
337
+                    $param['style'] .= 'width: ' . $val . 'px; ';
338 338
                     break;
339 339
 
340 340
                 case 'align':
341
-                    if ($name==='img') {
341
+                    if ($name === 'img') {
342 342
                         unset($param[$key]);
343
-                        $param['style'] .= 'float: '.$val.'; ';
344
-                    } elseif ($name!=='table') {
343
+                        $param['style'] .= 'float: ' . $val . '; ';
344
+                    } elseif ($name !== 'table') {
345 345
                         unset($param[$key]);
346
-                        $param['style'] .= 'text-align: '.$val.'; ';
346
+                        $param['style'] .= 'text-align: ' . $val . '; ';
347 347
                     }
348 348
                     break;
349 349
 
350 350
                 case 'valign':
351 351
                     unset($param[$key]);
352
-                    $param['style'] .= 'vertical-align: '.$val.'; ';
352
+                    $param['style'] .= 'vertical-align: ' . $val . '; ';
353 353
                     break;
354 354
 
355 355
                 case 'height':
356 356
                     unset($param[$key]);
357
-                    $param['style'] .= 'height: '.$val.'px; ';
357
+                    $param['style'] .= 'height: ' . $val . 'px; ';
358 358
                     break;
359 359
 
360 360
                 case 'bgcolor':
361 361
                     unset($param[$key]);
362
-                    $param['style'] .= 'background: '.$val.'; ';
362
+                    $param['style'] .= 'background: ' . $val . '; ';
363 363
                     break;
364 364
 
365 365
                 case 'bordercolor':
@@ -369,13 +369,13 @@  discard block
 block discarded – undo
369 369
 
370 370
                 case 'border':
371 371
                     unset($param[$key]);
372
-                    if (preg_match('/^[0-9]+$/isU', $val)) $val = $val.'px';
372
+                    if (preg_match('/^[0-9]+$/isU', $val)) $val = $val . 'px';
373 373
                     $border = $val;
374 374
                     break;
375 375
 
376 376
                 case 'cellpadding':
377 377
                 case 'cellspacing':
378
-                    if (preg_match('/^([0-9]+)$/isU', $val)) $param[$key] = $val.'px';
378
+                    if (preg_match('/^([0-9]+)$/isU', $val)) $param[$key] = $val . 'px';
379 379
                     break;
380 380
 
381 381
                 case 'colspan':
@@ -388,11 +388,11 @@  discard block
 block discarded – undo
388 388
         }
389 389
 
390 390
         // compliance of the border
391
-        if ($border!==null) {
392
-            if ($border)    $border = 'border: solid '.$border.' '.$color;
391
+        if ($border !== null) {
392
+            if ($border)    $border = 'border: solid ' . $border . ' ' . $color;
393 393
             else            $border = 'border: none';
394 394
 
395
-            $param['style'] .= $border.'; ';
395
+            $param['style'] .= $border . '; ';
396 396
             $param['border'] = $border;
397 397
         }
398 398
 
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
         $param['style'] = array();
402 402
         foreach ($styles as $style) {
403 403
             $tmp = explode(':', $style);
404
-            if (count($tmp)>1) {
404
+            if (count($tmp) > 1) {
405 405
                 $cod = $tmp[0];
406 406
                 unset($tmp[0]);
407 407
                 $tmp = implode(':', $tmp);
@@ -417,12 +417,12 @@  discard block
 block discarded – undo
417 417
 
418 418
         // get the level of the table containing the element
419 419
         if (!isset($param['num'])) {
420
-            $param['num'] = $this->_level[count($this->_level)-1];
420
+            $param['num'] = $this->_level[count($this->_level) - 1];
421 421
         }
422 422
 
423 423
         // for closures table: remove a level
424 424
         if (in_array($name, array('ul', 'ol', 'table')) && $close) {
425
-            unset($this->_level[count($this->_level)-1]);
425
+            unset($this->_level[count($this->_level) - 1]);
426 426
         }
427 427
 
428 428
         // prepare the parameters
@@ -450,13 +450,13 @@  discard block
 block discarded – undo
450 450
         $detect = $this->code[$k]['name'];
451 451
 
452 452
         // if it is a text => return
453
-        if ($detect=='write') {
453
+        if ($detect == 'write') {
454 454
             return array($this->code[$k]);
455 455
         }
456 456
 
457 457
         //
458
-        $level = 0;      // depth level
459
-        $end = false;    // end of the search
458
+        $level = 0; // depth level
459
+        $end = false; // end of the search
460 460
         $code = array(); // extract code
461 461
 
462 462
         // while it's not ended
@@ -465,23 +465,23 @@  discard block
 block discarded – undo
465 465
             $row = $this->code[$k];
466 466
 
467 467
             // if 'write' => we add the text
468
-            if ($row['name']=='write') {
468
+            if ($row['name'] == 'write') {
469 469
                 $code[] = $row;
470 470
             } else { // else, it is a html tag
471 471
                 $not = false; // flag for not taking into account the current tag
472 472
 
473 473
                 // if it is the searched tag
474
-                if ($row['name']==$detect) {
474
+                if ($row['name'] == $detect) {
475 475
                     // if we are just at the root level => dont take it
476
-                    if ($level==0) {
476
+                    if ($level == 0) {
477 477
                         $not = true;
478 478
                     }
479 479
 
480 480
                     // update the level
481
-                    $level+= ($row['close'] ? -1 : 1);
481
+                    $level += ($row['close'] ? -1 : 1);
482 482
 
483 483
                     // if we are now at the root level => it is the end, and dont take it
484
-                    if ($level==0) {
484
+                    if ($level == 0) {
485 485
                         $not = true;
486 486
                         $end = true;
487 487
                     }
@@ -495,7 +495,7 @@  discard block
 block discarded – undo
495 495
             }
496 496
 
497 497
             // it continues as long as there has code to analise
498
-            if (isset($this->code[$k+1]))
498
+            if (isset($this->code[$k + 1]))
499 499
                 $k++;
500 500
             else
501 501
                 $end = true;
@@ -513,8 +513,8 @@  discard block
 block discarded – undo
513 513
      * @param   integer take after
514 514
      * @return  string  part of the html code
515 515
      */
516
-    public function getHtmlErrorCode($pos, $before=30, $after=40)
516
+    public function getHtmlErrorCode($pos, $before = 30, $after = 40)
517 517
     {
518
-        return substr($this->_html, $pos-$before, $before+$after);
518
+        return substr($this->_html, $pos - $before, $before + $after);
519 519
     }
520 520
 }
521 521
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +86 added lines, -42 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 /**
3 5
  * HTML2PDF Librairy - parsingHtml class
4 6
  *
@@ -113,12 +115,13 @@  discard block
 block discarded – undo
113 115
                         // if it is a closure tag
114 116
                         if ($res['close']) {
115 117
                             // HTML validation
116
-                            if (count($parents)<1)
117
-                                throw new HTML2PDF_exception(3, $res['name'], $this->getHtmlErrorCode($res['html_pos']));
118
-                            else if ($parents[count($parents)-1]!=$res['name'])
119
-                                throw new HTML2PDF_exception(4, $parents, $this->getHtmlErrorCode($res['html_pos']));
120
-                            else
121
-                                unset($parents[count($parents)-1]);
118
+                            if (count($parents)<1) {
119
+                                                            throw new HTML2PDF_exception(3, $res['name'], $this->getHtmlErrorCode($res['html_pos']));
120
+                            } else if ($parents[count($parents)-1]!=$res['name']) {
121
+                                                            throw new HTML2PDF_exception(4, $parents, $this->getHtmlErrorCode($res['html_pos']));
122
+                            } else {
123
+                                                            unset($parents[count($parents)-1]);
124
+                            }
122 125
                         } else {
123 126
                             // if it is a autoclosed tag
124 127
                             if ($res['autoclose']) {
@@ -130,8 +133,9 @@  discard block
 block discarded – undo
130 133
                                 $res['close'] = true;
131 134
                             }
132 135
                             // else :add a child for validation
133
-                            else
134
-                                $parents[count($parents)] = $res['name'];
136
+                            else {
137
+                                                            $parents[count($parents)] = $res['name'];
138
+                            }
135 139
                         }
136 140
 
137 141
                         // if it is a <pre> tag (or <code> tag) not auclosed => update the flag
@@ -168,7 +172,9 @@  discard block
 block discarded – undo
168 172
                         $txt = str_replace(' ', '&nbsp;', $txt);
169 173
 
170 174
                         // add a break line
171
-                        if ($k>0) $actions[] = $tagPreBr;
175
+                        if ($k>0) {
176
+                        	$actions[] = $tagPreBr;
177
+                        }
172 178
 
173 179
                         // save the action
174 180
                         $actions[] = array(
@@ -201,21 +207,26 @@  discard block
 block discarded – undo
201 207
             // if it is a Text
202 208
             if ($actions[$k]['name']=='write') {
203 209
                 // if the tag before the text is a tag to clean => ltrim on the text
204
-                if ($k>0 && in_array($actions[$k-1]['name'], $tagsToClean))
205
-                    $actions[$k]['param']['txt'] = ltrim($actions[$k]['param']['txt']);
210
+                if ($k>0 && in_array($actions[$k-1]['name'], $tagsToClean)) {
211
+                                    $actions[$k]['param']['txt'] = ltrim($actions[$k]['param']['txt']);
212
+                }
206 213
 
207 214
                 // if the tag after the text is a tag to clean => rtrim on the text
208
-                if ($k<$nb-1 && in_array($actions[$k+1]['name'], $tagsToClean))
209
-                    $actions[$k]['param']['txt'] = rtrim($actions[$k]['param']['txt']);
215
+                if ($k<$nb-1 && in_array($actions[$k+1]['name'], $tagsToClean)) {
216
+                                    $actions[$k]['param']['txt'] = rtrim($actions[$k]['param']['txt']);
217
+                }
210 218
 
211 219
                 // if the text is empty => remove the action
212
-                if (!strlen($actions[$k]['param']['txt']))
213
-                    unset($actions[$k]);
220
+                if (!strlen($actions[$k]['param']['txt'])) {
221
+                                    unset($actions[$k]);
222
+                }
214 223
             }
215 224
         }
216 225
 
217 226
         // if we are not on the level 0 => HTML validator ERROR
218
-        if (count($parents)) throw new HTML2PDF_exception(5, $parents);
227
+        if (count($parents)) {
228
+        	throw new HTML2PDF_exception(5, $parents);
229
+        }
219 230
 
220 231
         // save the actions to do
221 232
         $this->code = array_values($actions);
@@ -231,7 +242,9 @@  discard block
 block discarded – undo
231 242
      */
232 243
     protected function _prepareTxt($txt, $spaces = true)
233 244
     {
234
-        if ($spaces) $txt = preg_replace('/\s+/is', ' ', $txt);
245
+        if ($spaces) {
246
+        	$txt = preg_replace('/\s+/is', ' ', $txt);
247
+        }
235 248
         $txt = str_replace('&euro;', '€', $txt);
236 249
         $txt = html_entity_decode($txt, ENT_QUOTES, $this->_encoding);
237 250
         return $txt;
@@ -260,7 +273,9 @@  discard block
 block discarded – undo
260 273
             // if it is a tag
261 274
             if ($parse[1][0]) {
262 275
                 // save the previous text if it exists
263
-                if ($str!=='')    $tmp[] = array('txt', $str);
276
+                if ($str!=='') {
277
+                	$tmp[] = array('txt', $str);
278
+                }
264 279
 
265 280
                 // save the tag, with the offset
266 281
                 $tmp[] = array('code', trim($parse[1][0]), $offset);
@@ -277,7 +292,9 @@  discard block
 block discarded – undo
277 292
             unset($parse);
278 293
         }
279 294
         // if a text is present in the end, we save it
280
-        if ($str!='') $tmp[] = array('txt', $str);
295
+        if ($str!='') {
296
+        	$tmp[] = array('txt', $str);
297
+        }
281 298
         unset($str);
282 299
     }
283 300
 
@@ -291,7 +308,9 @@  discard block
 block discarded – undo
291 308
     {
292 309
         // name of the tag, opening, closure, autoclosure
293 310
         $tag = '<([\/]{0,1})([_a-z0-9]+)([\/>\s]+)';
294
-        if (!preg_match('/'.$tag.'/isU', $code, $match)) return null;
311
+        if (!preg_match('/'.$tag.'/isU', $code, $match)) {
312
+        	return null;
313
+        }
295 314
         $close     = ($match[1]=='/' ? true : false);
296 315
         $autoclose = preg_match('/\/>$/isU', $code);
297 316
         $name      = strtolower($match[2]);
@@ -310,20 +329,23 @@  discard block
 block discarded – undo
310 329
         // read the parameters : nom=valeur
311 330
         $prop = '([a-zA-Z0-9_]+)=([^"\'\s>]+)';
312 331
         preg_match_all('/'.$prop.'/is', $code, $match);
313
-        for($k=0; $k<count($match[0]); $k++)
314
-            $param[trim(strtolower($match[1][$k]))] = trim($match[2][$k]);
332
+        for($k=0; $k<count($match[0]); $k++) {
333
+                    $param[trim(strtolower($match[1][$k]))] = trim($match[2][$k]);
334
+        }
315 335
 
316 336
         // read the parameters : nom="valeur"
317 337
         $prop = '([a-zA-Z0-9_]+)=["]([^"]*)["]';
318 338
         preg_match_all('/'.$prop.'/is', $code, $match);
319
-        for($k=0; $k<count($match[0]); $k++)
320
-            $param[trim(strtolower($match[1][$k]))] = trim($match[2][$k]);
339
+        for($k=0; $k<count($match[0]); $k++) {
340
+                    $param[trim(strtolower($match[1][$k]))] = trim($match[2][$k]);
341
+        }
321 342
 
322 343
         // read the parameters : nom='valeur'
323 344
         $prop = "([a-zA-Z0-9_]+)=[']([^']*)[']";
324 345
         preg_match_all('/'.$prop.'/is', $code, $match);
325
-        for($k=0; $k<count($match[0]); $k++)
326
-            $param[trim(strtolower($match[1][$k]))] = trim($match[2][$k]);
346
+        for($k=0; $k<count($match[0]); $k++) {
347
+                    $param[trim(strtolower($match[1][$k]))] = trim($match[2][$k]);
348
+        }
327 349
 
328 350
         // compliance of each parameter
329 351
         $color  = "#000000";
@@ -369,19 +391,25 @@  discard block
 block discarded – undo
369 391
 
370 392
                 case 'border':
371 393
                     unset($param[$key]);
372
-                    if (preg_match('/^[0-9]+$/isU', $val)) $val = $val.'px';
394
+                    if (preg_match('/^[0-9]+$/isU', $val)) {
395
+                    	$val = $val.'px';
396
+                    }
373 397
                     $border = $val;
374 398
                     break;
375 399
 
376 400
                 case 'cellpadding':
377 401
                 case 'cellspacing':
378
-                    if (preg_match('/^([0-9]+)$/isU', $val)) $param[$key] = $val.'px';
402
+                    if (preg_match('/^([0-9]+)$/isU', $val)) {
403
+                    	$param[$key] = $val.'px';
404
+                    }
379 405
                     break;
380 406
 
381 407
                 case 'colspan':
382 408
                 case 'rowspan':
383 409
                     $val = preg_replace('/[^0-9]/isU', '', $val);
384
-                    if (!$val) $val = 1;
410
+                    if (!$val) {
411
+                    	$val = 1;
412
+                    }
385 413
                     $param[$key] = $val;
386 414
                     break;
387 415
             }
@@ -389,8 +417,11 @@  discard block
 block discarded – undo
389 417
 
390 418
         // compliance of the border
391 419
         if ($border!==null) {
392
-            if ($border)    $border = 'border: solid '.$border.' '.$color;
393
-            else            $border = 'border: none';
420
+            if ($border) {
421
+            	$border = 'border: solid '.$border.' '.$color;
422
+            } else {
423
+            	$border = 'border: none';
424
+            }
394 425
 
395 426
             $param['style'] .= $border.'; ';
396 427
             $param['border'] = $border;
@@ -426,10 +457,18 @@  discard block
 block discarded – undo
426 457
         }
427 458
 
428 459
         // prepare the parameters
429
-        if (isset($param['value']))  $param['value']  = $this->_prepareTxt($param['value']);
430
-        if (isset($param['alt']))    $param['alt']    = $this->_prepareTxt($param['alt']);
431
-        if (isset($param['title']))  $param['title']  = $this->_prepareTxt($param['title']);
432
-        if (isset($param['class']))  $param['class']  = $this->_prepareTxt($param['class']);
460
+        if (isset($param['value'])) {
461
+        	$param['value']  = $this->_prepareTxt($param['value']);
462
+        }
463
+        if (isset($param['alt'])) {
464
+        	$param['alt']    = $this->_prepareTxt($param['alt']);
465
+        }
466
+        if (isset($param['title'])) {
467
+        	$param['title']  = $this->_prepareTxt($param['title']);
468
+        }
469
+        if (isset($param['class'])) {
470
+        	$param['class']  = $this->_prepareTxt($param['class']);
471
+        }
433 472
 
434 473
         // return the new action to do
435 474
         return array('name' => $name, 'close' => $close ? 1 : 0, 'autoclose' => $autoclose, 'param' => $param);
@@ -444,7 +483,9 @@  discard block
 block discarded – undo
444 483
     public function getLevel($k)
445 484
     {
446 485
         // if the code does not exist => return empty
447
-        if (!isset($this->code[$k])) return array();
486
+        if (!isset($this->code[$k])) {
487
+        	return array();
488
+        }
448 489
 
449 490
         // the tag to detect
450 491
         $detect = $this->code[$k]['name'];
@@ -489,16 +530,19 @@  discard block
 block discarded – undo
489 530
 
490 531
                 // if we can takin into account the current tag => save it
491 532
                 if (!$not) {
492
-                    if (isset($row['style']['text-align'])) unset($row['style']['text-align']);
533
+                    if (isset($row['style']['text-align'])) {
534
+                    	unset($row['style']['text-align']);
535
+                    }
493 536
                     $code[] = $row;
494 537
                 }
495 538
             }
496 539
 
497 540
             // it continues as long as there has code to analise
498
-            if (isset($this->code[$k+1]))
499
-                $k++;
500
-            else
501
-                $end = true;
541
+            if (isset($this->code[$k+1])) {
542
+                            $k++;
543
+            } else {
544
+                            $end = true;
545
+            }
502 546
         }
503 547
 
504 548
         // return the extract
Please login to merge, or discard this patch.
includes/librairies/HTML2PDF/_class/tcpdfConfig.php 3 patches
Indentation   +206 added lines, -206 removed lines patch added patch discarded remove patch
@@ -34,212 +34,212 @@
 block discarded – undo
34 34
 
35 35
 if (!defined('K_TCPDF_EXTERNAL_CONFIG')) {
36 36
 
37
-    define('K_TCPDF_EXTERNAL_CONFIG', true);
38
-
39
-    // DOCUMENT_ROOT fix for IIS Webserver
40
-    if ((!isset($_SERVER['DOCUMENT_ROOT'])) OR (empty($_SERVER['DOCUMENT_ROOT']))) {
41
-        if (isset($_SERVER['SCRIPT_FILENAME'])) {
42
-            $_SERVER['DOCUMENT_ROOT'] = str_replace(
43
-                '\\',
44
-                '/',
45
-                substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF']))
46
-            );
47
-        } elseif (isset($_SERVER['PATH_TRANSLATED'])) {
48
-            $_SERVER['DOCUMENT_ROOT'] = str_replace(
49
-                '\\',
50
-                '/',
51
-                substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0-strlen($_SERVER['PHP_SELF']))
52
-            );
53
-        } else {
54
-            // define here your DOCUMENT_ROOT path if the previous fails
55
-            $_SERVER['DOCUMENT_ROOT'] = '/var/www';
56
-        }
57
-    }
58
-
59
-    // Automatic calculation for the following K_PATH_MAIN constant
60
-    $kPathMain = str_replace('\\', '/', dirname(__FILE__));
61
-    $kPathMain = dirname($kPathMain).'/'; // remove the current directory
62
-    $kPathMain.= '_tcpdf_'.HTML2PDF_USED_TCPDF_VERSION.'/';
63
-    define('K_PATH_MAIN', $kPathMain);
64
-
65
-    // Automatic calculation for the following K_PATH_URL constant
66
-    if (isset($_SERVER['HTTP_HOST']) AND (!empty($_SERVER['HTTP_HOST']))) {
67
-        if (isset($_SERVER['HTTPS']) AND (!empty($_SERVER['HTTPS'])) AND strtolower($_SERVER['HTTPS'])!='off') {
68
-            $kPathUrl = 'https://';
69
-        } else {
70
-            $kPathUrl = 'http://';
71
-        }
72
-        $kPathUrl .= $_SERVER['HTTP_HOST'];
73
-        $kPathUrl .= str_replace('\\', '/', substr(K_PATH_MAIN, (strlen($_SERVER['DOCUMENT_ROOT']) - 1)));
74
-    }
75
-
76
-    /**
77
-     * URL path to tcpdf installation folder (http://localhost/tcpdf/).
78
-     * By default it is automatically calculated but you can also set it as a fixed string to improve performances.
79
-     */
80
-    define('K_PATH_URL', $kPathUrl);
81
-
82
-    /**
83
-     * path for PDF fonts
84
-     * use K_PATH_MAIN.'fonts/old/' for old non-UTF8 fonts
85
-     */
86
-    define('K_PATH_FONTS', K_PATH_MAIN.'fonts/');
87
-
88
-    /**
89
-     * cache directory for temporary files (full path)
90
-     */
91
-    define('K_PATH_CACHE', K_PATH_MAIN.'cache/');
92
-
93
-    /**
94
-     * cache directory for temporary files (url path)
95
-     */
96
-    define('K_PATH_URL_CACHE', K_PATH_URL.'cache/');
97
-
98
-    /**
99
-     *images directory
100
-     */
101
-    define('K_PATH_IMAGES', K_PATH_MAIN.'images/');
102
-
103
-    /**
104
-     * blank image
105
-     */
106
-    define('K_BLANK_IMAGE', K_PATH_IMAGES.'_blank.png');
107
-
108
-    /**
109
-     * page format
110
-     */
111
-    define('PDF_PAGE_FORMAT', 'A4');
112
-
113
-    /**
114
-     * page orientation (P=portrait, L=landscape)
115
-     */
116
-    define('PDF_PAGE_ORIENTATION', 'P');
117
-
118
-    /**
119
-     * document creator
120
-     */
121
-    define('PDF_CREATOR', 'HTML2PDF - TCPDF');
122
-
123
-    /**
124
-     * document author
125
-     */
126
-    define('PDF_AUTHOR', 'HTML2PDF - TCPDF');
127
-
128
-    /**
129
-     * header title
130
-     */
131
-    define('PDF_HEADER_TITLE', null);
132
-
133
-    /**
134
-     * header description string
135
-     */
136
-    define('PDF_HEADER_STRING', null);
137
-
138
-    /**
139
-     * image logo
140
-     */
141
-    define('PDF_HEADER_LOGO', null);
142
-
143
-    /**
144
-     * header logo image width [mm]
145
-     */
146
-    define('PDF_HEADER_LOGO_WIDTH', null);
147
-
148
-    /**
149
-     *  document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch]
150
-     */
151
-    define('PDF_UNIT', 'mm');
152
-
153
-    /**
154
-     * header margin
155
-     */
156
-    define('PDF_MARGIN_HEADER', 0);
157
-
158
-    /**
159
-     * footer margin
160
-     */
161
-    define('PDF_MARGIN_FOOTER', 0);
162
-
163
-    /**
164
-     * top margin
165
-     */
166
-    define('PDF_MARGIN_TOP', 0);
167
-
168
-    /**
169
-     * bottom margin
170
-     */
171
-    define('PDF_MARGIN_BOTTOM', 0);
172
-
173
-    /**
174
-     * left margin
175
-     */
176
-    define('PDF_MARGIN_LEFT', 0);
177
-
178
-    /**
179
-     * right margin
180
-     */
181
-    define('PDF_MARGIN_RIGHT', 0);
182
-
183
-    /**
184
-     * default main font name
185
-     */
186
-    define('PDF_FONT_NAME_MAIN', 'helvetica');
187
-
188
-    /**
189
-     * default main font size
190
-     */
191
-    define('PDF_FONT_SIZE_MAIN', 10);
192
-
193
-    /**
194
-     * default data font name
195
-     */
196
-    define('PDF_FONT_NAME_DATA', 'helvetica');
197
-
198
-    /**
199
-     * default data font size
200
-     */
201
-    define('PDF_FONT_SIZE_DATA', 8);
202
-
203
-    /**
204
-     * default monospaced font name
205
-     */
206
-    define('PDF_FONT_MONOSPACED', 'courier');
207
-
208
-    /**
209
-     * ratio used to adjust the conversion of pixels to user units
210
-     */
211
-    define('PDF_IMAGE_SCALE_RATIO', 1);
212
-
213
-    /**
214
-     * magnification factor for titles
215
-     */
216
-    define('HEAD_MAGNIFICATION', 1);
217
-
218
-    /**
219
-     * height of cell repect font height
220
-     */
221
-    define('K_CELL_HEIGHT_RATIO', 1);
222
-
223
-    /**
224
-     * title magnification respect main font size
225
-     */
226
-    define('K_TITLE_MAGNIFICATION', 1);
227
-
228
-    /**
229
-     * reduction factor for small font
230
-     */
231
-    define('K_SMALL_RATIO', 2/3);
232
-
233
-    /**
234
-     * set to true to enable the special procedure used to avoid the overlappind of symbols on Thai language
235
-     */
236
-    define('K_THAI_TOPCHARS', true);
237
-
238
-    /**
239
-     * if true allows to call TCPDF methods using HTML syntax
240
-     * IMPORTANT: For security reason, disable this feature if you are printing user HTML content.
241
-     */
242
-    define('K_TCPDF_CALLS_IN_HTML', false);
37
+	define('K_TCPDF_EXTERNAL_CONFIG', true);
38
+
39
+	// DOCUMENT_ROOT fix for IIS Webserver
40
+	if ((!isset($_SERVER['DOCUMENT_ROOT'])) OR (empty($_SERVER['DOCUMENT_ROOT']))) {
41
+		if (isset($_SERVER['SCRIPT_FILENAME'])) {
42
+			$_SERVER['DOCUMENT_ROOT'] = str_replace(
43
+				'\\',
44
+				'/',
45
+				substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF']))
46
+			);
47
+		} elseif (isset($_SERVER['PATH_TRANSLATED'])) {
48
+			$_SERVER['DOCUMENT_ROOT'] = str_replace(
49
+				'\\',
50
+				'/',
51
+				substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0-strlen($_SERVER['PHP_SELF']))
52
+			);
53
+		} else {
54
+			// define here your DOCUMENT_ROOT path if the previous fails
55
+			$_SERVER['DOCUMENT_ROOT'] = '/var/www';
56
+		}
57
+	}
58
+
59
+	// Automatic calculation for the following K_PATH_MAIN constant
60
+	$kPathMain = str_replace('\\', '/', dirname(__FILE__));
61
+	$kPathMain = dirname($kPathMain).'/'; // remove the current directory
62
+	$kPathMain.= '_tcpdf_'.HTML2PDF_USED_TCPDF_VERSION.'/';
63
+	define('K_PATH_MAIN', $kPathMain);
64
+
65
+	// Automatic calculation for the following K_PATH_URL constant
66
+	if (isset($_SERVER['HTTP_HOST']) AND (!empty($_SERVER['HTTP_HOST']))) {
67
+		if (isset($_SERVER['HTTPS']) AND (!empty($_SERVER['HTTPS'])) AND strtolower($_SERVER['HTTPS'])!='off') {
68
+			$kPathUrl = 'https://';
69
+		} else {
70
+			$kPathUrl = 'http://';
71
+		}
72
+		$kPathUrl .= $_SERVER['HTTP_HOST'];
73
+		$kPathUrl .= str_replace('\\', '/', substr(K_PATH_MAIN, (strlen($_SERVER['DOCUMENT_ROOT']) - 1)));
74
+	}
75
+
76
+	/**
77
+	 * URL path to tcpdf installation folder (http://localhost/tcpdf/).
78
+	 * By default it is automatically calculated but you can also set it as a fixed string to improve performances.
79
+	 */
80
+	define('K_PATH_URL', $kPathUrl);
81
+
82
+	/**
83
+	 * path for PDF fonts
84
+	 * use K_PATH_MAIN.'fonts/old/' for old non-UTF8 fonts
85
+	 */
86
+	define('K_PATH_FONTS', K_PATH_MAIN.'fonts/');
87
+
88
+	/**
89
+	 * cache directory for temporary files (full path)
90
+	 */
91
+	define('K_PATH_CACHE', K_PATH_MAIN.'cache/');
92
+
93
+	/**
94
+	 * cache directory for temporary files (url path)
95
+	 */
96
+	define('K_PATH_URL_CACHE', K_PATH_URL.'cache/');
97
+
98
+	/**
99
+	 *images directory
100
+	 */
101
+	define('K_PATH_IMAGES', K_PATH_MAIN.'images/');
102
+
103
+	/**
104
+	 * blank image
105
+	 */
106
+	define('K_BLANK_IMAGE', K_PATH_IMAGES.'_blank.png');
107
+
108
+	/**
109
+	 * page format
110
+	 */
111
+	define('PDF_PAGE_FORMAT', 'A4');
112
+
113
+	/**
114
+	 * page orientation (P=portrait, L=landscape)
115
+	 */
116
+	define('PDF_PAGE_ORIENTATION', 'P');
117
+
118
+	/**
119
+	 * document creator
120
+	 */
121
+	define('PDF_CREATOR', 'HTML2PDF - TCPDF');
122
+
123
+	/**
124
+	 * document author
125
+	 */
126
+	define('PDF_AUTHOR', 'HTML2PDF - TCPDF');
127
+
128
+	/**
129
+	 * header title
130
+	 */
131
+	define('PDF_HEADER_TITLE', null);
132
+
133
+	/**
134
+	 * header description string
135
+	 */
136
+	define('PDF_HEADER_STRING', null);
137
+
138
+	/**
139
+	 * image logo
140
+	 */
141
+	define('PDF_HEADER_LOGO', null);
142
+
143
+	/**
144
+	 * header logo image width [mm]
145
+	 */
146
+	define('PDF_HEADER_LOGO_WIDTH', null);
147
+
148
+	/**
149
+	 *  document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch]
150
+	 */
151
+	define('PDF_UNIT', 'mm');
152
+
153
+	/**
154
+	 * header margin
155
+	 */
156
+	define('PDF_MARGIN_HEADER', 0);
157
+
158
+	/**
159
+	 * footer margin
160
+	 */
161
+	define('PDF_MARGIN_FOOTER', 0);
162
+
163
+	/**
164
+	 * top margin
165
+	 */
166
+	define('PDF_MARGIN_TOP', 0);
167
+
168
+	/**
169
+	 * bottom margin
170
+	 */
171
+	define('PDF_MARGIN_BOTTOM', 0);
172
+
173
+	/**
174
+	 * left margin
175
+	 */
176
+	define('PDF_MARGIN_LEFT', 0);
177
+
178
+	/**
179
+	 * right margin
180
+	 */
181
+	define('PDF_MARGIN_RIGHT', 0);
182
+
183
+	/**
184
+	 * default main font name
185
+	 */
186
+	define('PDF_FONT_NAME_MAIN', 'helvetica');
187
+
188
+	/**
189
+	 * default main font size
190
+	 */
191
+	define('PDF_FONT_SIZE_MAIN', 10);
192
+
193
+	/**
194
+	 * default data font name
195
+	 */
196
+	define('PDF_FONT_NAME_DATA', 'helvetica');
197
+
198
+	/**
199
+	 * default data font size
200
+	 */
201
+	define('PDF_FONT_SIZE_DATA', 8);
202
+
203
+	/**
204
+	 * default monospaced font name
205
+	 */
206
+	define('PDF_FONT_MONOSPACED', 'courier');
207
+
208
+	/**
209
+	 * ratio used to adjust the conversion of pixels to user units
210
+	 */
211
+	define('PDF_IMAGE_SCALE_RATIO', 1);
212
+
213
+	/**
214
+	 * magnification factor for titles
215
+	 */
216
+	define('HEAD_MAGNIFICATION', 1);
217
+
218
+	/**
219
+	 * height of cell repect font height
220
+	 */
221
+	define('K_CELL_HEIGHT_RATIO', 1);
222
+
223
+	/**
224
+	 * title magnification respect main font size
225
+	 */
226
+	define('K_TITLE_MAGNIFICATION', 1);
227
+
228
+	/**
229
+	 * reduction factor for small font
230
+	 */
231
+	define('K_SMALL_RATIO', 2/3);
232
+
233
+	/**
234
+	 * set to true to enable the special procedure used to avoid the overlappind of symbols on Thai language
235
+	 */
236
+	define('K_THAI_TOPCHARS', true);
237
+
238
+	/**
239
+	 * if true allows to call TCPDF methods using HTML syntax
240
+	 * IMPORTANT: For security reason, disable this feature if you are printing user HTML content.
241
+	 */
242
+	define('K_TCPDF_CALLS_IN_HTML', false);
243 243
 }
244 244
 
245 245
 //============================================================+
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 //============================================================+
3 3
 // File name   : tcpdf_config.php
4 4
 // Begin       : 2004-06-11
@@ -42,13 +42,13 @@  discard block
 block discarded – undo
42 42
             $_SERVER['DOCUMENT_ROOT'] = str_replace(
43 43
                 '\\',
44 44
                 '/',
45
-                substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF']))
45
+                substr($_SERVER['SCRIPT_FILENAME'], 0, 0 - strlen($_SERVER['PHP_SELF']))
46 46
             );
47 47
         } elseif (isset($_SERVER['PATH_TRANSLATED'])) {
48 48
             $_SERVER['DOCUMENT_ROOT'] = str_replace(
49 49
                 '\\',
50 50
                 '/',
51
-                substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0-strlen($_SERVER['PHP_SELF']))
51
+                substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0 - strlen($_SERVER['PHP_SELF']))
52 52
             );
53 53
         } else {
54 54
             // define here your DOCUMENT_ROOT path if the previous fails
@@ -58,13 +58,13 @@  discard block
 block discarded – undo
58 58
 
59 59
     // Automatic calculation for the following K_PATH_MAIN constant
60 60
     $kPathMain = str_replace('\\', '/', dirname(__FILE__));
61
-    $kPathMain = dirname($kPathMain).'/'; // remove the current directory
62
-    $kPathMain.= '_tcpdf_'.HTML2PDF_USED_TCPDF_VERSION.'/';
61
+    $kPathMain = dirname($kPathMain) . '/'; // remove the current directory
62
+    $kPathMain .= '_tcpdf_' . HTML2PDF_USED_TCPDF_VERSION . '/';
63 63
     define('K_PATH_MAIN', $kPathMain);
64 64
 
65 65
     // Automatic calculation for the following K_PATH_URL constant
66 66
     if (isset($_SERVER['HTTP_HOST']) AND (!empty($_SERVER['HTTP_HOST']))) {
67
-        if (isset($_SERVER['HTTPS']) AND (!empty($_SERVER['HTTPS'])) AND strtolower($_SERVER['HTTPS'])!='off') {
67
+        if (isset($_SERVER['HTTPS']) AND (!empty($_SERVER['HTTPS'])) AND strtolower($_SERVER['HTTPS']) != 'off') {
68 68
             $kPathUrl = 'https://';
69 69
         } else {
70 70
             $kPathUrl = 'http://';
@@ -83,27 +83,27 @@  discard block
 block discarded – undo
83 83
      * path for PDF fonts
84 84
      * use K_PATH_MAIN.'fonts/old/' for old non-UTF8 fonts
85 85
      */
86
-    define('K_PATH_FONTS', K_PATH_MAIN.'fonts/');
86
+    define('K_PATH_FONTS', K_PATH_MAIN . 'fonts/');
87 87
 
88 88
     /**
89 89
      * cache directory for temporary files (full path)
90 90
      */
91
-    define('K_PATH_CACHE', K_PATH_MAIN.'cache/');
91
+    define('K_PATH_CACHE', K_PATH_MAIN . 'cache/');
92 92
 
93 93
     /**
94 94
      * cache directory for temporary files (url path)
95 95
      */
96
-    define('K_PATH_URL_CACHE', K_PATH_URL.'cache/');
96
+    define('K_PATH_URL_CACHE', K_PATH_URL . 'cache/');
97 97
 
98 98
     /**
99 99
      *images directory
100 100
      */
101
-    define('K_PATH_IMAGES', K_PATH_MAIN.'images/');
101
+    define('K_PATH_IMAGES', K_PATH_MAIN . 'images/');
102 102
 
103 103
     /**
104 104
      * blank image
105 105
      */
106
-    define('K_BLANK_IMAGE', K_PATH_IMAGES.'_blank.png');
106
+    define('K_BLANK_IMAGE', K_PATH_IMAGES . '_blank.png');
107 107
 
108 108
     /**
109 109
      * page format
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
     /**
229 229
      * reduction factor for small font
230 230
      */
231
-    define('K_SMALL_RATIO', 2/3);
231
+    define('K_SMALL_RATIO', 2 / 3);
232 232
 
233 233
     /**
234 234
      * set to true to enable the special procedure used to avoid the overlappind of symbols on Thai language
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 //============================================================+
3 5
 // File name   : tcpdf_config.php
4 6
 // Begin       : 2004-06-11
Please login to merge, or discard this patch.
includes/librairies/HTML2PDF/_class/exception.class.php 3 patches
Indentation   +154 added lines, -154 removed lines patch added patch discarded remove patch
@@ -11,158 +11,158 @@
 block discarded – undo
11 11
 
12 12
 class HTML2PDF_exception extends exception
13 13
 {
14
-    protected $_tag = null;
15
-    protected $_html = null;
16
-    protected $_other = null;
17
-    protected $_image = null;
18
-    protected $_messageHtml = '';
19
-
20
-    /**
21
-     * generate a HTML2PDF exception
22
-     *
23
-     * @param    int     $err error number
24
-     * @param    mixed   $other additionnal informations
25
-     * @return   string  $html optionnal code HTML associated to the error
26
-     */
27
-    final public function __construct($err = 0, $other = null, $html = '')
28
-    {
29
-        // read the error
30
-        switch($err)
31
-        {
32
-            case 1: // Unsupported tag
33
-                $msg = (HTML2PDF_locale::get('err01'));
34
-                $msg = str_replace('[[OTHER]]', $other, $msg);
35
-                $this->_tag = $other;
36
-                break;
37
-
38
-            case 2: // too long sentence
39
-                $msg = (HTML2PDF_locale::get('err02'));
40
-                $msg = str_replace('[[OTHER_0]]', $other[0], $msg);
41
-                $msg = str_replace('[[OTHER_1]]', $other[1], $msg);
42
-                $msg = str_replace('[[OTHER_2]]', $other[2], $msg);
43
-                break;
44
-
45
-            case 3: // closing tag in excess
46
-                $msg = (HTML2PDF_locale::get('err03'));
47
-                $msg = str_replace('[[OTHER]]', $other, $msg);
48
-                $this->_tag = $other;
49
-                break;
50
-
51
-            case 4: // tags closed in the wrong order
52
-                $msg = (HTML2PDF_locale::get('err04'));
53
-                $msg = str_replace('[[OTHER]]', print_r($other, true), $msg);
54
-                break;
55
-
56
-            case 5: // unclosed tag
57
-                $msg = (HTML2PDF_locale::get('err05'));
58
-                $msg = str_replace('[[OTHER]]', print_r($other, true), $msg);
59
-                break;
60
-
61
-            case 6: // image can not be loaded
62
-                $msg = (HTML2PDF_locale::get('err06'));
63
-                $msg = str_replace('[[OTHER]]', $other, $msg);
64
-                $this->_image = $other;
65
-                break;
66
-
67
-            case 7: // too big TD content
68
-                $msg = (HTML2PDF_locale::get('err07'));
69
-                break;
70
-
71
-            case 8: // SVG tag not in DRAW tag
72
-                $msg = (HTML2PDF_locale::get('err08'));
73
-                $msg = str_replace('[[OTHER]]', $other, $msg);
74
-                $this->_tag = $other;
75
-                break;
76
-
77
-            case 9: // deprecated
78
-                $msg = (HTML2PDF_locale::get('err09'));
79
-                $msg = str_replace('[[OTHER_0]]', $other[0], $msg);
80
-                $msg = str_replace('[[OTHER_1]]', $other[1], $msg);
81
-                $this->_tag = $other[0];
82
-                break;
83
-
84
-            case 0: // specific error
85
-            default:
86
-                $msg = $other;
87
-                break;
88
-        }
89
-
90
-        // create the HTML message
91
-        $this->_messageHtml = '<span style="color: #AA0000; font-weight: bold;">'.HTML2PDF_locale::get('txt01', 'error: ').$err.'</span><br>';
92
-        $this->_messageHtml.= HTML2PDF_locale::get('txt02', 'file:').' '.$this->file.'<br>';
93
-        $this->_messageHtml.= HTML2PDF_locale::get('txt03', 'line:').' '.$this->line.'<br>';
94
-        $this->_messageHtml.= '<br>';
95
-        $this->_messageHtml.= $msg;
96
-
97
-        // create the text message
98
-        $msg = HTML2PDF_locale::get('txt01', 'error: ').$err.' : '.strip_tags($msg);
99
-
100
-        // add the optionnal html content
101
-        if ($html) {
102
-            $this->_messageHtml.= "<br><br>HTML : ...".trim(htmlentities($html)).'...';
103
-            $this->_html = $html;
104
-            $msg.= ' HTML : ...'.trim($html).'...';
105
-        }
106
-
107
-        // save the other informations
108
-        $this->_other = $other;
109
-
110
-        // construct the exception
111
-        parent::__construct($msg, $err);
112
-    }
113
-
114
-    /**
115
-     * get the message as string
116
-     *
117
-     * @access public
118
-     * @return string $messageHtml
119
-     */
120
-    public function __toString()
121
-    {
122
-        return $this->_messageHtml;
123
-    }
124
-
125
-    /**
126
-     * get the html tag name
127
-     *
128
-     * @access public
129
-     * @return string $tagName
130
-     */
131
-    public function getTAG()
132
-    {
133
-        return $this->_tag;
134
-    }
135
-
136
-    /**
137
-     * get the optional html code
138
-     *
139
-     * @access public
140
-     * @return string $html
141
-     */
142
-    public function getHTML()
143
-    {
144
-        return $this->_html;
145
-    }
146
-
147
-    /**
148
-     * get the optional other informations
149
-     *
150
-     * @access public
151
-     * @return mixed $other
152
-     */
153
-    public function getOTHER()
154
-    {
155
-        return $this->_other;
156
-    }
157
-
158
-    /**
159
-     * get the image source
160
-     *
161
-     * @access public
162
-     * @return string $imageSrc
163
-     */
164
-    public function getIMAGE()
165
-    {
166
-        return $this->_image;
167
-    }
14
+	protected $_tag = null;
15
+	protected $_html = null;
16
+	protected $_other = null;
17
+	protected $_image = null;
18
+	protected $_messageHtml = '';
19
+
20
+	/**
21
+	 * generate a HTML2PDF exception
22
+	 *
23
+	 * @param    int     $err error number
24
+	 * @param    mixed   $other additionnal informations
25
+	 * @return   string  $html optionnal code HTML associated to the error
26
+	 */
27
+	final public function __construct($err = 0, $other = null, $html = '')
28
+	{
29
+		// read the error
30
+		switch($err)
31
+		{
32
+			case 1: // Unsupported tag
33
+				$msg = (HTML2PDF_locale::get('err01'));
34
+				$msg = str_replace('[[OTHER]]', $other, $msg);
35
+				$this->_tag = $other;
36
+				break;
37
+
38
+			case 2: // too long sentence
39
+				$msg = (HTML2PDF_locale::get('err02'));
40
+				$msg = str_replace('[[OTHER_0]]', $other[0], $msg);
41
+				$msg = str_replace('[[OTHER_1]]', $other[1], $msg);
42
+				$msg = str_replace('[[OTHER_2]]', $other[2], $msg);
43
+				break;
44
+
45
+			case 3: // closing tag in excess
46
+				$msg = (HTML2PDF_locale::get('err03'));
47
+				$msg = str_replace('[[OTHER]]', $other, $msg);
48
+				$this->_tag = $other;
49
+				break;
50
+
51
+			case 4: // tags closed in the wrong order
52
+				$msg = (HTML2PDF_locale::get('err04'));
53
+				$msg = str_replace('[[OTHER]]', print_r($other, true), $msg);
54
+				break;
55
+
56
+			case 5: // unclosed tag
57
+				$msg = (HTML2PDF_locale::get('err05'));
58
+				$msg = str_replace('[[OTHER]]', print_r($other, true), $msg);
59
+				break;
60
+
61
+			case 6: // image can not be loaded
62
+				$msg = (HTML2PDF_locale::get('err06'));
63
+				$msg = str_replace('[[OTHER]]', $other, $msg);
64
+				$this->_image = $other;
65
+				break;
66
+
67
+			case 7: // too big TD content
68
+				$msg = (HTML2PDF_locale::get('err07'));
69
+				break;
70
+
71
+			case 8: // SVG tag not in DRAW tag
72
+				$msg = (HTML2PDF_locale::get('err08'));
73
+				$msg = str_replace('[[OTHER]]', $other, $msg);
74
+				$this->_tag = $other;
75
+				break;
76
+
77
+			case 9: // deprecated
78
+				$msg = (HTML2PDF_locale::get('err09'));
79
+				$msg = str_replace('[[OTHER_0]]', $other[0], $msg);
80
+				$msg = str_replace('[[OTHER_1]]', $other[1], $msg);
81
+				$this->_tag = $other[0];
82
+				break;
83
+
84
+			case 0: // specific error
85
+			default:
86
+				$msg = $other;
87
+				break;
88
+		}
89
+
90
+		// create the HTML message
91
+		$this->_messageHtml = '<span style="color: #AA0000; font-weight: bold;">'.HTML2PDF_locale::get('txt01', 'error: ').$err.'</span><br>';
92
+		$this->_messageHtml.= HTML2PDF_locale::get('txt02', 'file:').' '.$this->file.'<br>';
93
+		$this->_messageHtml.= HTML2PDF_locale::get('txt03', 'line:').' '.$this->line.'<br>';
94
+		$this->_messageHtml.= '<br>';
95
+		$this->_messageHtml.= $msg;
96
+
97
+		// create the text message
98
+		$msg = HTML2PDF_locale::get('txt01', 'error: ').$err.' : '.strip_tags($msg);
99
+
100
+		// add the optionnal html content
101
+		if ($html) {
102
+			$this->_messageHtml.= "<br><br>HTML : ...".trim(htmlentities($html)).'...';
103
+			$this->_html = $html;
104
+			$msg.= ' HTML : ...'.trim($html).'...';
105
+		}
106
+
107
+		// save the other informations
108
+		$this->_other = $other;
109
+
110
+		// construct the exception
111
+		parent::__construct($msg, $err);
112
+	}
113
+
114
+	/**
115
+	 * get the message as string
116
+	 *
117
+	 * @access public
118
+	 * @return string $messageHtml
119
+	 */
120
+	public function __toString()
121
+	{
122
+		return $this->_messageHtml;
123
+	}
124
+
125
+	/**
126
+	 * get the html tag name
127
+	 *
128
+	 * @access public
129
+	 * @return string $tagName
130
+	 */
131
+	public function getTAG()
132
+	{
133
+		return $this->_tag;
134
+	}
135
+
136
+	/**
137
+	 * get the optional html code
138
+	 *
139
+	 * @access public
140
+	 * @return string $html
141
+	 */
142
+	public function getHTML()
143
+	{
144
+		return $this->_html;
145
+	}
146
+
147
+	/**
148
+	 * get the optional other informations
149
+	 *
150
+	 * @access public
151
+	 * @return mixed $other
152
+	 */
153
+	public function getOTHER()
154
+	{
155
+		return $this->_other;
156
+	}
157
+
158
+	/**
159
+	 * get the image source
160
+	 *
161
+	 * @access public
162
+	 * @return string $imageSrc
163
+	 */
164
+	public function getIMAGE()
165
+	{
166
+		return $this->_image;
167
+	}
168 168
 }
169 169
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 /**
3 3
  * HTML2PDF Librairy - HTML2PDF Exception
4 4
  *
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     final public function __construct($err = 0, $other = null, $html = '')
28 28
     {
29 29
         // read the error
30
-        switch($err)
30
+        switch ($err)
31 31
         {
32 32
             case 1: // Unsupported tag
33 33
                 $msg = (HTML2PDF_locale::get('err01'));
@@ -88,20 +88,20 @@  discard block
 block discarded – undo
88 88
         }
89 89
 
90 90
         // create the HTML message
91
-        $this->_messageHtml = '<span style="color: #AA0000; font-weight: bold;">'.HTML2PDF_locale::get('txt01', 'error: ').$err.'</span><br>';
92
-        $this->_messageHtml.= HTML2PDF_locale::get('txt02', 'file:').' '.$this->file.'<br>';
93
-        $this->_messageHtml.= HTML2PDF_locale::get('txt03', 'line:').' '.$this->line.'<br>';
94
-        $this->_messageHtml.= '<br>';
95
-        $this->_messageHtml.= $msg;
91
+        $this->_messageHtml = '<span style="color: #AA0000; font-weight: bold;">' . HTML2PDF_locale::get('txt01', 'error: ') . $err . '</span><br>';
92
+        $this->_messageHtml .= HTML2PDF_locale::get('txt02', 'file:') . ' ' . $this->file . '<br>';
93
+        $this->_messageHtml .= HTML2PDF_locale::get('txt03', 'line:') . ' ' . $this->line . '<br>';
94
+        $this->_messageHtml .= '<br>';
95
+        $this->_messageHtml .= $msg;
96 96
 
97 97
         // create the text message
98
-        $msg = HTML2PDF_locale::get('txt01', 'error: ').$err.' : '.strip_tags($msg);
98
+        $msg = HTML2PDF_locale::get('txt01', 'error: ') . $err . ' : ' . strip_tags($msg);
99 99
 
100 100
         // add the optionnal html content
101 101
         if ($html) {
102
-            $this->_messageHtml.= "<br><br>HTML : ...".trim(htmlentities($html)).'...';
102
+            $this->_messageHtml .= "<br><br>HTML : ..." . trim(htmlentities($html)) . '...';
103 103
             $this->_html = $html;
104
-            $msg.= ' HTML : ...'.trim($html).'...';
104
+            $msg .= ' HTML : ...' . trim($html) . '...';
105 105
         }
106 106
 
107 107
         // save the other informations
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 /**
3 5
  * HTML2PDF Librairy - HTML2PDF Exception
4 6
  *
Please login to merge, or discard this patch.
includes/librairies/HTML2PDF/_class/locale.class.php 3 patches
Indentation   +71 added lines, -71 removed lines patch added patch discarded remove patch
@@ -11,86 +11,86 @@
 block discarded – undo
11 11
 
12 12
 class HTML2PDF_locale
13 13
 {
14
-    /**
15
-     * code of the current used locale
16
-     * @var string
17
-     */
18
-    static protected $_code = null;
14
+	/**
15
+	 * code of the current used locale
16
+	 * @var string
17
+	 */
18
+	static protected $_code = null;
19 19
 
20
-    /**
21
-     * texts of the current used locale
22
-     * @var array
23
-     */
24
-    static protected $_list = array();
20
+	/**
21
+	 * texts of the current used locale
22
+	 * @var array
23
+	 */
24
+	static protected $_list = array();
25 25
 
26
-    /**
27
-     * directory where locale files are
28
-     * @var string
29
-     */
30
-    static protected $_directory = null;
26
+	/**
27
+	 * directory where locale files are
28
+	 * @var string
29
+	 */
30
+	static protected $_directory = null;
31 31
 
32
-    /**
33
-     * load the locale
34
-     *
35
-     * @access public
36
-     * @param  string $code
37
-     */
38
-    static public function load($code)
39
-    {
40
-        if (self::$_directory===null) {
41
-            self::$_directory = dirname(dirname(__FILE__)).'/locale/';
42
-        }
32
+	/**
33
+	 * load the locale
34
+	 *
35
+	 * @access public
36
+	 * @param  string $code
37
+	 */
38
+	static public function load($code)
39
+	{
40
+		if (self::$_directory===null) {
41
+			self::$_directory = dirname(dirname(__FILE__)).'/locale/';
42
+		}
43 43
 
44
-        // must be in lower case
45
-        $code = strtolower($code);
44
+		// must be in lower case
45
+		$code = strtolower($code);
46 46
 
47
-        // must be [a-z-0-9]
48
-        if (!preg_match('/^([a-z0-9]+)$/isU', $code)) {
49
-            throw new HTML2PDF_exception(0, 'invalid language code ['.self::$_code.']');
50
-        }
47
+		// must be [a-z-0-9]
48
+		if (!preg_match('/^([a-z0-9]+)$/isU', $code)) {
49
+			throw new HTML2PDF_exception(0, 'invalid language code ['.self::$_code.']');
50
+		}
51 51
 
52
-        // save the code
53
-        self::$_code = $code;
52
+		// save the code
53
+		self::$_code = $code;
54 54
 
55
-        // get the name of the locale file
56
-        $file = self::$_directory.self::$_code.'.csv';
55
+		// get the name of the locale file
56
+		$file = self::$_directory.self::$_code.'.csv';
57 57
 
58
-        // the file must exist
59
-        if (!is_file($file)) {
60
-            throw new HTML2PDF_exception(0, 'language code ['.self::$_code.'] unknown. You can create the translation file ['.$file.'] and send it to the webmaster of html2pdf in order to integrate it into a future release');
61
-        }
58
+		// the file must exist
59
+		if (!is_file($file)) {
60
+			throw new HTML2PDF_exception(0, 'language code ['.self::$_code.'] unknown. You can create the translation file ['.$file.'] and send it to the webmaster of html2pdf in order to integrate it into a future release');
61
+		}
62 62
 
63
-        // load the file
64
-        self::$_list = array();
65
-        $handle = fopen($file, 'r');
66
-        while (!feof($handle)) {
67
-            $line = fgetcsv($handle);
68
-            if (count($line)!=2) continue;
69
-            self::$_list[trim($line[0])] = trim($line[1]);
70
-        }
71
-        fclose($handle);
72
-    }
63
+		// load the file
64
+		self::$_list = array();
65
+		$handle = fopen($file, 'r');
66
+		while (!feof($handle)) {
67
+			$line = fgetcsv($handle);
68
+			if (count($line)!=2) continue;
69
+			self::$_list[trim($line[0])] = trim($line[1]);
70
+		}
71
+		fclose($handle);
72
+	}
73 73
 
74
-    /**
75
-     * clean the locale
76
-     *
77
-     * @access public static
78
-     */
79
-    static public function clean()
80
-    {
81
-        self::$_code = null;
82
-        self::$_list = array();
83
-    }
74
+	/**
75
+	 * clean the locale
76
+	 *
77
+	 * @access public static
78
+	 */
79
+	static public function clean()
80
+	{
81
+		self::$_code = null;
82
+		self::$_list = array();
83
+	}
84 84
 
85
-    /**
86
-     * get a text
87
-     *
88
-     * @access public static
89
-     * @param  string $key
90
-     * @return string
91
-     */
92
-    static public function get($key, $default='######')
93
-    {
94
-        return (isset(self::$_list[$key]) ? self::$_list[$key] : $default);
95
-    }
85
+	/**
86
+	 * get a text
87
+	 *
88
+	 * @access public static
89
+	 * @param  string $key
90
+	 * @return string
91
+	 */
92
+	static public function get($key, $default='######')
93
+	{
94
+		return (isset(self::$_list[$key]) ? self::$_list[$key] : $default);
95
+	}
96 96
 }
97 97
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if (!defined('ABSPATH')) exit;
2 2
 /**
3 3
  * HTML2PDF Librairy - HTML2PDF Locale
4 4
  *
@@ -37,8 +37,8 @@  discard block
 block discarded – undo
37 37
      */
38 38
     static public function load($code)
39 39
     {
40
-        if (self::$_directory===null) {
41
-            self::$_directory = dirname(dirname(__FILE__)).'/locale/';
40
+        if (self::$_directory === null) {
41
+            self::$_directory = dirname(dirname(__FILE__)) . '/locale/';
42 42
         }
43 43
 
44 44
         // must be in lower case
@@ -46,18 +46,18 @@  discard block
 block discarded – undo
46 46
 
47 47
         // must be [a-z-0-9]
48 48
         if (!preg_match('/^([a-z0-9]+)$/isU', $code)) {
49
-            throw new HTML2PDF_exception(0, 'invalid language code ['.self::$_code.']');
49
+            throw new HTML2PDF_exception(0, 'invalid language code [' . self::$_code . ']');
50 50
         }
51 51
 
52 52
         // save the code
53 53
         self::$_code = $code;
54 54
 
55 55
         // get the name of the locale file
56
-        $file = self::$_directory.self::$_code.'.csv';
56
+        $file = self::$_directory . self::$_code . '.csv';
57 57
 
58 58
         // the file must exist
59 59
         if (!is_file($file)) {
60
-            throw new HTML2PDF_exception(0, 'language code ['.self::$_code.'] unknown. You can create the translation file ['.$file.'] and send it to the webmaster of html2pdf in order to integrate it into a future release');
60
+            throw new HTML2PDF_exception(0, 'language code [' . self::$_code . '] unknown. You can create the translation file [' . $file . '] and send it to the webmaster of html2pdf in order to integrate it into a future release');
61 61
         }
62 62
 
63 63
         // load the file
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         $handle = fopen($file, 'r');
66 66
         while (!feof($handle)) {
67 67
             $line = fgetcsv($handle);
68
-            if (count($line)!=2) continue;
68
+            if (count($line) != 2) continue;
69 69
             self::$_list[trim($line[0])] = trim($line[1]);
70 70
         }
71 71
         fclose($handle);
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      * @param  string $key
90 90
      * @return string
91 91
      */
92
-    static public function get($key, $default='######')
92
+    static public function get($key, $default = '######')
93 93
     {
94 94
         return (isset(self::$_list[$key]) ? self::$_list[$key] : $default);
95 95
     }
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'ABSPATH' ) ) exit;
1
+<?php if ( !defined( 'ABSPATH' ) ) {
2
+	exit;
3
+}
2 4
 /**
3 5
  * HTML2PDF Librairy - HTML2PDF Locale
4 6
  *
@@ -65,7 +67,9 @@  discard block
 block discarded – undo
65 67
         $handle = fopen($file, 'r');
66 68
         while (!feof($handle)) {
67 69
             $line = fgetcsv($handle);
68
-            if (count($line)!=2) continue;
70
+            if (count($line)!=2) {
71
+            	continue;
72
+            }
69 73
             self::$_list[trim($line[0])] = trim($line[1]);
70 74
         }
71 75
         fclose($handle);
Please login to merge, or discard this patch.