Linux cesa-www-main 6.1.0-49-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
Apache/2.4.68 (Debian)
Server IP : 10.218.0.2 & Your IP : 216.73.216.28
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
cesa.co.za /
fpdf /
Delete
Unzip
Name
Size
Permission
Date
Action
cache
[ DIR ]
drwxr-sr-x
2017-05-29 10:14
classes
[ DIR ]
drwxr-sr-x
2013-05-22 07:48
data
[ DIR ]
drwxr-sr-x
2013-05-22 07:49
demo
[ DIR ]
drwxr-sr-x
2017-10-25 14:17
destinations
[ DIR ]
drwxr-sr-x
2013-05-22 07:51
features
[ DIR ]
drwxr-sr-x
2013-05-22 07:52
fonts
[ DIR ]
drwxr-sr-x
2013-05-22 07:54
fpdf
[ DIR ]
drwxr-sr-x
2013-05-22 07:55
help
[ DIR ]
drwxr-sr-x
2013-05-22 07:55
out
[ DIR ]
drwxr-sr-x
2013-05-22 07:56
postscript
[ DIR ]
drwxr-sr-x
2013-05-22 07:57
samples
[ DIR ]
drwxr-sr-x
2013-05-22 07:57
temp
[ DIR ]
drwxr-sr-x
2017-05-29 18:53
templates
[ DIR ]
drwxr-sr-x
2013-05-22 07:58
unittest
[ DIR ]
drwxr-sr-x
2013-05-22 07:59
.cvsignore
181
B
-rw-r--r--
2013-05-22 07:29
ChangeLog
52.56
KB
-rw-r--r--
2013-05-22 07:48
LICENSE
25.82
KB
-rw-r--r--
2013-05-22 07:56
TODO
894
B
-rw-r--r--
2013-05-22 07:58
autofix.url.php
1.8
KB
-rw-r--r--
2013-05-22 07:29
background.image.php
7.33
KB
-rw-r--r--
2013-05-22 07:29
background.position.php
2.17
KB
-rw-r--r--
2013-05-22 07:29
box.block.inline.php
5.24
KB
-rw-r--r--
2013-05-22 07:29
box.block.php
16.2
KB
-rw-r--r--
2013-05-22 07:29
box.body.php
894
B
-rw-r--r--
2013-05-22 07:29
box.br.php
6.07
KB
-rw-r--r--
2013-05-22 07:29
box.button.php
4.03
KB
-rw-r--r--
2013-05-22 07:29
box.button.reset.php
965
B
-rw-r--r--
2013-05-22 07:29
box.button.submit.php
2.86
KB
-rw-r--r--
2013-05-22 07:29
box.checkbutton.php
6.5
KB
-rw-r--r--
2013-05-22 07:29
box.container.php
33.85
KB
-rw-r--r--
2013-05-22 07:29
box.field.pageno.php
2.16
KB
-rw-r--r--
2013-05-22 07:29
box.field.pages.php
2.26
KB
-rw-r--r--
2013-05-22 07:29
box.form.php
842
B
-rw-r--r--
2013-05-22 07:29
box.frame.php
10.75
KB
-rw-r--r--
2013-05-22 07:29
box.generic.formatted.php
33.63
KB
-rw-r--r--
2013-05-22 07:29
box.generic.inline.php
3.72
KB
-rw-r--r--
2013-05-22 07:29
box.generic.php
11.08
KB
-rw-r--r--
2013-05-22 07:29
box.iframe.php
2.21
KB
-rw-r--r--
2013-05-22 07:29
box.img.php
9.76
KB
-rw-r--r--
2013-05-22 07:29
box.inline.control.php
3.15
KB
-rw-r--r--
2013-05-22 07:29
box.inline.php
14.46
KB
-rw-r--r--
2013-05-22 07:29
box.inline.simple.php
893
B
-rw-r--r--
2013-05-22 07:29
box.input.img.php
3.79
KB
-rw-r--r--
2013-05-22 07:29
box.input.password.php
2.05
KB
-rw-r--r--
2013-05-22 07:29
box.input.text.php
2.35
KB
-rw-r--r--
2013-05-22 07:29
box.input.textarea.php
1.91
KB
-rw-r--r--
2013-05-22 07:29
box.legend.php
1.55
KB
-rw-r--r--
2013-05-22 07:29
box.list-item.php
6.77
KB
-rw-r--r--
2013-05-22 07:29
box.note-call.class.php
6.23
KB
-rw-r--r--
2013-05-22 07:29
box.null.php
959
B
-rw-r--r--
2013-05-22 07:29
box.page.margin.class.php
18.82
KB
-rw-r--r--
2013-05-22 07:30
box.page.php
1.05
KB
-rw-r--r--
2013-05-22 07:30
box.php
18.32
KB
-rw-r--r--
2013-05-22 07:30
box.radiobutton.php
3.5
KB
-rw-r--r--
2013-05-22 07:30
box.select.php
4.3
KB
-rw-r--r--
2013-05-22 07:30
box.table.cell.fake.php
1.23
KB
-rw-r--r--
2013-05-22 07:30
box.table.cell.php
9.92
KB
-rw-r--r--
2013-05-22 07:30
box.table.php
43.15
KB
-rw-r--r--
2013-05-22 07:30
box.table.row.php
6.08
KB
-rw-r--r--
2013-05-22 07:30
box.table.section.php
1.52
KB
-rw-r--r--
2013-05-22 07:30
box.text.php
20.09
KB
-rw-r--r--
2013-05-22 07:30
box.text.string.php
1.41
KB
-rw-r--r--
2013-05-22 07:30
box.utils.text-align.inc.php
2.87
KB
-rw-r--r--
2013-05-22 07:30
box.whitespace.php
3.21
KB
-rw-r--r--
2013-05-22 07:30
config.inc.php
5.78
KB
-rw-r--r--
2013-05-22 07:48
config.parse.php
7.61
KB
-rw-r--r--
2013-05-22 07:48
content_type.class.php
506
B
-rw-r--r--
2013-05-22 07:48
converter.class.php
1.4
KB
-rw-r--r--
2013-05-22 07:48
css.background.attachment.inc.php
788
B
-rw-r--r--
2013-05-22 07:48
css.background.color.inc.php
1.98
KB
-rw-r--r--
2013-05-22 07:48
css.background.image.inc.php
1021
B
-rw-r--r--
2013-05-22 07:48
css.background.inc.php
2.13
KB
-rw-r--r--
2013-05-22 07:48
css.background.position.inc.php
3.56
KB
-rw-r--r--
2013-05-22 07:48
css.background.repeat.inc.php
1.47
KB
-rw-r--r--
2013-05-22 07:48
css.border.bottom.color.inc.php
753
B
-rw-r--r--
2013-05-22 07:48
css.border.bottom.inc.php
469
B
-rw-r--r--
2013-05-22 07:48
css.border.bottom.style.inc.php
726
B
-rw-r--r--
2013-05-22 07:48
css.border.bottom.width.inc.php
920
B
-rw-r--r--
2013-05-22 07:48
css.border.collapse.inc.php
812
B
-rw-r--r--
2013-05-22 07:48
css.border.color.inc.php
2.74
KB
-rw-r--r--
2013-05-22 07:48
css.border.inc.php
6.41
KB
-rw-r--r--
2013-05-22 07:48
css.border.left.color.inc.php
718
B
-rw-r--r--
2013-05-22 07:48
css.border.left.inc.php
459
B
-rw-r--r--
2013-05-22 07:48
css.border.left.style.inc.php
712
B
-rw-r--r--
2013-05-22 07:48
css.border.left.width.inc.php
904
B
-rw-r--r--
2013-05-22 07:48
css.border.right.color.inc.php
725
B
-rw-r--r--
2013-05-22 07:48
css.border.right.inc.php
464
B
-rw-r--r--
2013-05-22 07:48
css.border.right.style.inc.php
719
B
-rw-r--r--
2013-05-22 07:48
css.border.right.width.inc.php
912
B
-rw-r--r--
2013-05-22 07:48
css.border.style.inc.php
3.04
KB
-rw-r--r--
2013-05-22 07:49
css.border.top.color.inc.php
711
B
-rw-r--r--
2013-05-22 07:49
css.border.top.inc.php
455
B
-rw-r--r--
2013-05-22 07:49
css.border.top.style.inc.php
705
B
-rw-r--r--
2013-05-22 07:49
css.border.top.width.inc.php
896
B
-rw-r--r--
2013-05-22 07:49
css.border.width.inc.php
2.77
KB
-rw-r--r--
2013-05-22 07:49
css.bottom.inc.php
1.62
KB
-rw-r--r--
2013-05-22 07:49
css.cache.class.php
1018
B
-rw-r--r--
2013-05-22 07:49
css.clear.inc.php
903
B
-rw-r--r--
2013-05-22 07:49
css.color.inc.php
610
B
-rw-r--r--
2013-05-22 07:49
css.colors.inc.php
9.09
KB
-rw-r--r--
2013-05-22 07:49
css.constants.inc.php
6.32
KB
-rw-r--r--
2013-05-22 07:49
css.content.inc.php
3.39
KB
-rw-r--r--
2013-05-22 07:49
css.counter.collection.php
378
B
-rw-r--r--
2013-05-22 07:49
css.counter.php
419
B
-rw-r--r--
2013-05-22 07:49
css.direction.inc.php
685
B
-rw-r--r--
2013-05-22 07:49
css.display.inc.php
1
KB
-rw-r--r--
2013-05-22 07:49
css.float.inc.php
737
B
-rw-r--r--
2013-05-22 07:49
css.font-family.inc.php
1.22
KB
-rw-r--r--
2013-05-22 07:49
css.font-size.inc.php
1.51
KB
-rw-r--r--
2013-05-22 07:49
css.font-style.inc.php
531
B
-rw-r--r--
2013-05-22 07:49
css.font-weight.inc.php
671
B
-rw-r--r--
2013-05-22 07:49
css.font.inc.php
6.67
KB
-rw-r--r--
2013-05-22 07:49
css.frame.inc.php
100
B
-rw-r--r--
2013-05-22 07:49
css.height.inc.php
1.04
KB
-rw-r--r--
2013-05-22 07:49
css.html2ps.html.content.inc.php
984
B
-rw-r--r--
2013-05-22 07:49
css.html2ps.pixels.php
496
B
-rw-r--r--
2013-05-22 07:49
css.html2ps.pseudoelements.inc.php
755
B
-rw-r--r--
2013-05-22 07:49
css.inc.php
4.3
KB
-rw-r--r--
2013-05-22 07:49
css.left.inc.php
693
B
-rw-r--r--
2013-05-22 07:49
css.letter-spacing.inc.php
829
B
-rw-r--r--
2013-05-22 07:49
css.line-height.inc.php
1.88
KB
-rw-r--r--
2013-05-22 07:49
css.list-style-image.inc.php
1.06
KB
-rw-r--r--
2013-05-22 07:49
css.list-style-position.inc.php
695
B
-rw-r--r--
2013-05-22 07:49
css.list-style-type.inc.php
3.66
KB
-rw-r--r--
2013-05-22 07:49
css.list-style.inc.php
1.3
KB
-rw-r--r--
2013-05-22 07:49
css.margin.inc.php
2.87
KB
-rw-r--r--
2013-05-22 07:49
css.max-height.inc.php
1.3
KB
-rw-r--r--
2013-05-22 07:49
css.min-height.inc.php
1.22
KB
-rw-r--r--
2013-05-22 07:49
css.min-width.inc.php
521
B
-rw-r--r--
2013-05-22 07:49
css.orphans.inc.php
407
B
-rw-r--r--
2013-05-22 07:49
css.overflow.inc.php
910
B
-rw-r--r--
2013-05-22 07:49
css.padding.inc.php
2.96
KB
-rw-r--r--
2013-05-22 07:49
css.page-break-after.inc.php
351
B
-rw-r--r--
2013-05-22 07:49
css.page-break-before.inc.php
360
B
-rw-r--r--
2013-05-22 07:49
css.page-break-inside.inc.php
360
B
-rw-r--r--
2013-05-22 07:49
css.page-break.inc.php
813
B
-rw-r--r--
2013-05-22 07:49
css.page.inc.php
484
B
-rw-r--r--
2013-05-22 07:49
css.parse.inc.php
9.29
KB
-rw-r--r--
2013-05-22 07:49
css.parse.media.inc.php
805
B
-rw-r--r--
2013-05-22 07:49
css.parse.properties.php
1.92
KB
-rw-r--r--
2013-05-22 07:49
css.position.inc.php
1.06
KB
-rw-r--r--
2013-05-22 07:49
css.property.collection.php
2.99
KB
-rw-r--r--
2013-05-22 07:49
css.property.declaration.php
1.45
KB
-rw-r--r--
2013-05-22 07:49
css.property.handler.class.php
2.39
KB
-rw-r--r--
2013-05-22 07:49
css.property.stringset.class.php
783
B
-rw-r--r--
2013-05-22 07:49
css.property.sub.class.php
1.69
KB
-rw-r--r--
2013-05-22 07:49
css.property.sub.field.class.php
455
B
-rw-r--r--
2013-05-22 07:49
css.pseudo.add.margin.inc.php
9
B
-rw-r--r--
2013-05-22 07:49
css.pseudo.align.inc.php
1.75
KB
-rw-r--r--
2013-05-22 07:49
css.pseudo.cellpadding.inc.php
587
B
-rw-r--r--
2013-05-22 07:49
css.pseudo.cellspacing.inc.php
587
B
-rw-r--r--
2013-05-22 07:49
css.pseudo.form.action.inc.php
441
B
-rw-r--r--
2013-05-22 07:49
css.pseudo.form.radiogroup.inc.php
477
B
-rw-r--r--
2013-05-22 07:49
css.pseudo.link.destination.inc.php
484
B
-rw-r--r--
2013-05-22 07:49
css.pseudo.link.target.inc.php
955
B
-rw-r--r--
2013-05-22 07:49
css.pseudo.listcounter.inc.php
567
B
-rw-r--r--
2013-05-22 07:49
css.pseudo.localalign.inc.php
588
B
-rw-r--r--
2013-05-22 07:49
css.pseudo.nowrap.inc.php
532
B
-rw-r--r--
2013-05-22 07:49
css.pseudo.table.border.inc.php
2.24
KB
-rw-r--r--
2013-05-22 07:49
css.right.inc.php
702
B
-rw-r--r--
2013-05-22 07:49
css.rules.inc.php
1.98
KB
-rw-r--r--
2013-05-22 07:49
css.rules.page.inc.php
11.19
KB
-rw-r--r--
2013-05-22 07:49
css.ruleset.class.php
9.87
KB
-rw-r--r--
2013-05-22 07:49
css.selectors.inc.php
7.4
KB
-rw-r--r--
2013-05-22 07:49
css.size.inc.php
1.54
KB
-rw-r--r--
2013-05-22 07:49
css.state.class.php
5.15
KB
-rw-r--r--
2013-05-22 07:49
css.table-layout.inc.php
734
B
-rw-r--r--
2013-05-22 07:49
css.text-align.inc.php
1.22
KB
-rw-r--r--
2013-05-22 07:49
css.text-decoration.inc.php
1.54
KB
-rw-r--r--
2013-05-22 07:49
css.text-indent.inc.php
845
B
-rw-r--r--
2013-05-22 07:49
css.text-transform.inc.php
1.1
KB
-rw-r--r--
2013-05-22 07:49
css.top.inc.php
685
B
-rw-r--r--
2013-05-22 07:49
css.utils.inc.php
4.95
KB
-rw-r--r--
2013-05-22 07:49
css.vertical-align.inc.php
4.91
KB
-rw-r--r--
2013-05-22 07:49
css.visibility.inc.php
941
B
-rw-r--r--
2013-05-22 07:49
css.white-space.inc.php
1.02
KB
-rw-r--r--
2013-05-22 07:49
css.widows.inc.php
394
B
-rw-r--r--
2013-05-22 07:49
css.width.inc.php
1.76
KB
-rw-r--r--
2013-05-22 07:49
css.word-spacing.inc.php
817
B
-rw-r--r--
2013-05-22 07:49
css.z-index.inc.php
473
B
-rw-r--r--
2013-05-22 07:49
default.css
7.31
KB
-rw-r--r--
2013-05-22 07:50
destination._http.class.php
618
B
-rw-r--r--
2013-05-22 07:51
destination._interface.class.php
518
B
-rw-r--r--
2013-05-22 07:51
destination.browser.class.php
377
B
-rw-r--r--
2013-05-22 07:50
destination.download.class.php
540
B
-rw-r--r--
2013-05-22 07:50
destination.file.class.php
622
B
-rw-r--r--
2013-05-22 07:51
dispatcher.class.php
713
B
-rw-r--r--
2013-05-22 07:51
doc.anchor.class.php
1.07
KB
-rw-r--r--
2013-05-22 07:51
dom.activelink.inc.php
2.81
KB
-rw-r--r--
2013-05-22 07:51
dom.php4.inc.php
1.5
KB
-rw-r--r--
2013-05-22 07:51
dom.php5.inc.php
1.88
KB
-rw-r--r--
2013-05-22 07:51
encoding.cp1251.inc.php
10.38
KB
-rw-r--r--
2013-05-22 07:51
encoding.cp866.inc.php
10.89
KB
-rw-r--r--
2013-05-22 07:51
encoding.dingbats.inc.php
11.71
KB
-rw-r--r--
2013-05-22 07:51
encoding.entities.inc.php
25.8
KB
-rw-r--r--
2013-05-22 07:51
encoding.glyphs.inc.php
101.68
KB
-rw-r--r--
2013-05-22 07:51
encoding.inc.php
1.61
KB
-rw-r--r--
2013-05-22 07:51
encoding.iso-8859-1.inc.php
10.49
KB
-rw-r--r--
2013-05-22 07:51
encoding.iso-8859-10.inc.php
10.92
KB
-rw-r--r--
2013-05-22 07:51
encoding.iso-8859-11.inc.php
9.63
KB
-rw-r--r--
2013-05-22 07:51
encoding.iso-8859-13.inc.php
10.6
KB
-rw-r--r--
2013-05-22 07:51
encoding.iso-8859-14.inc.php
10.98
KB
-rw-r--r--
2013-05-22 07:51
encoding.iso-8859-15.inc.php
10.55
KB
-rw-r--r--
2013-05-22 07:51
encoding.iso-8859-2.inc.php
16.24
KB
-rw-r--r--
2013-05-22 07:51
encoding.iso-8859-3.inc.php
15.74
KB
-rw-r--r--
2013-05-22 07:51
encoding.iso-8859-4.inc.php
10.71
KB
-rw-r--r--
2013-05-22 07:51
encoding.iso-8859-5.inc.php
10.36
KB
-rw-r--r--
2013-05-22 07:51
encoding.iso-8859-6.inc.php
8.88
KB
-rw-r--r--
2013-05-22 07:51
encoding.iso-8859-7.inc.php
10.22
KB
-rw-r--r--
2013-05-22 07:51
encoding.iso-8859-8.inc.php
5.96
KB
-rw-r--r--
2013-05-22 07:51
encoding.iso-8859-9.inc.php
10.49
KB
-rw-r--r--
2013-05-22 07:51
encoding.koi8-r.inc.php
11.09
KB
-rw-r--r--
2013-05-22 07:51
encoding.symbol.inc.php
10.04
KB
-rw-r--r--
2013-05-22 07:51
encoding.windows-1250.inc.php
17
KB
-rw-r--r--
2013-05-22 07:52
encoding.windows-1251.inc.php
10.39
KB
-rw-r--r--
2013-05-22 07:52
encoding.windows-1252.inc.php
16.32
KB
-rw-r--r--
2013-05-22 07:52
error.php
191
B
-rw-r--r--
2013-05-22 07:52
favicon.ico
1
B
-rw-r--r--
2013-05-22 07:52
fetched_data._html.class.php
405
B
-rw-r--r--
2013-05-22 07:52
fetched_data._interface.class.php
286
B
-rw-r--r--
2013-05-22 07:52
fetched_data.file.class.php
688
B
-rw-r--r--
2013-05-22 07:52
fetched_data.url.class.php
1.31
KB
-rw-r--r--
2013-05-22 07:52
fetcher._interface.class.php
995
B
-rw-r--r--
2013-05-22 07:52
fetcher.local.class.php
357
B
-rw-r--r--
2013-05-22 07:52
fetcher.memory.class.php
600
B
-rw-r--r--
2013-05-22 07:52
fetcher.url.class.php
14.88
KB
-rw-r--r--
2013-05-22 07:52
fetcher.url.curl.class.php
2.6
KB
-rw-r--r--
2013-05-22 07:52
filter.data._interface.class.php
138
B
-rw-r--r--
2013-05-22 07:52
filter.data.doctype.class.php
1.98
KB
-rw-r--r--
2013-05-22 07:52
filter.data.encoding.class.php
889
B
-rw-r--r--
2013-05-22 07:52
filter.data.html2xhtml.class.php
211
B
-rw-r--r--
2013-05-22 07:52
filter.data.ucs2.class.php
283
B
-rw-r--r--
2013-05-22 07:52
filter.data.utf8.class.php
284
B
-rw-r--r--
2013-05-22 07:52
filter.data.xhtml2xhtml.class.php
169
B
-rw-r--r--
2013-05-22 07:52
filter.output._interface.class.php
249
B
-rw-r--r--
2013-05-22 07:52
filter.output.gzip.class.php
391
B
-rw-r--r--
2013-05-22 07:52
filter.output.ps2pdf.class.php
1.28
KB
-rw-r--r--
2013-05-22 07:52
filter.post._interface.class.php
142
B
-rw-r--r--
2013-05-22 07:52
filter.post.positioned.class.php
806
B
-rw-r--r--
2013-05-22 07:52
filter.post.postponed.class.php
765
B
-rw-r--r--
2013-05-22 07:52
filter.pre._interface.class.php
160
B
-rw-r--r--
2013-05-22 07:52
filter.pre.fields.class.php
1.7
KB
-rw-r--r--
2013-05-22 07:52
filter.pre.footnotes.class.php
1.16
KB
-rw-r--r--
2013-05-22 07:52
filter.pre.headfoot.class.php
1.05
KB
-rw-r--r--
2013-05-22 07:52
filter.pre.height-constraint.class.php
1.2
KB
-rw-r--r--
2013-05-22 07:52
flow_context.class.inc.php
11.75
KB
-rw-r--r--
2013-05-22 07:52
flow_viewport.class.inc.php
829
B
-rw-r--r--
2013-05-22 07:52
font.class.php
6.15
KB
-rw-r--r--
2013-05-22 07:52
font.constants.inc.php
228
B
-rw-r--r--
2013-05-22 07:52
font.resolver.class.php
7.41
KB
-rw-r--r--
2013-05-22 07:52
font_factory.class.php
1.51
KB
-rw-r--r--
2013-05-22 07:55
globals.inc.php
51
B
-rw-r--r--
2013-05-22 07:55
globals.php
119
B
-rw-r--r--
2013-05-22 07:55
height.php
7.25
KB
-rw-r--r--
2013-05-22 07:55
html.attrs.inc.php
31.84
KB
-rw-r--r--
2013-05-22 07:56
html2ps.config
7.99
KB
-rw-r--r--
2013-05-22 07:56
html2ps.config.recommended
8.94
KB
-rw-r--r--
2013-05-22 07:56
image.class.php
5.3
KB
-rw-r--r--
2013-05-22 07:56
index.php
185
B
-rw-r--r--
2013-05-22 07:56
inline.content.builder.factory.php
1.03
KB
-rw-r--r--
2013-05-22 07:56
inline.content.builder.normal.php
1.65
KB
-rw-r--r--
2013-05-22 07:56
inline.content.builder.nowrap.php
632
B
-rw-r--r--
2013-05-22 07:56
inline.content.builder.php
53.41
KB
-rw-r--r--
2013-05-22 07:56
inline.content.builder.pre.line.php
1.09
KB
-rw-r--r--
2013-05-22 07:56
inline.content.builder.pre.php
938
B
-rw-r--r--
2013-05-22 07:56
inline.content.builder.pre.wrap.php
1.18
KB
-rw-r--r--
2013-05-22 07:56
layout._interface.class.php
149
B
-rw-r--r--
2013-05-22 07:56
layout.default.class.php
3.25
KB
-rw-r--r--
2013-05-22 07:56
layout.page.breaks.php
21.75
KB
-rw-r--r--
2013-05-22 07:56
layout.vertical.php
1.46
KB
-rw-r--r--
2013-05-22 07:56
list-style.image.php
335
B
-rw-r--r--
2013-05-22 07:56
logger.php
424
B
-rw-r--r--
2013-05-22 07:56
manager.encoding.php
8.57
KB
-rw-r--r--
2013-05-22 07:56
media.layout.inc.php
3.6
KB
-rw-r--r--
2013-05-22 07:56
observer.class.php
89
B
-rw-r--r--
2013-05-22 07:56
ot.class.php
27.21
KB
-rw-r--r--
2013-05-22 07:56
output._generic.class.php
8.72
KB
-rw-r--r--
2013-05-22 07:56
output._generic.pdf.class.php
582
B
-rw-r--r--
2013-05-22 07:56
output._generic.ps.class.php
851
B
-rw-r--r--
2013-05-22 07:56
output._interface.class.php
2.78
KB
-rw-r--r--
2013-05-22 07:56
output.fastps.class.php
12.54
KB
-rw-r--r--
2013-05-22 07:56
output.fastps.l2.class.php
2.95
KB
-rw-r--r--
2013-05-22 07:56
output.fpdf.class.php
11.46
KB
-rw-r--r--
2013-05-22 07:56
output.pcl.class.php
8.35
KB
-rw-r--r--
2013-05-22 07:56
output.pdflib.1.6.class.php
7.66
KB
-rw-r--r--
2013-05-22 07:56
output.pdflib.class.php
12.68
KB
-rw-r--r--
2013-05-22 07:56
output.pdflib.old.class.php
959
B
-rw-r--r--
2013-05-22 07:56
output.png.class.php
15.33
KB
-rw-r--r--
2013-05-22 07:56
parser._interface.class.php
134
B
-rw-r--r--
2013-05-22 07:56
parser.xhtml.class.php
3.24
KB
-rw-r--r--
2013-05-22 07:56
path.php
3.3
KB
-rw-r--r--
2013-05-22 07:56
path.point.php
187
B
-rw-r--r--
2013-05-22 07:56
path.rectangle.php
566
B
-rw-r--r--
2013-05-22 07:56
pdf.fpdf.makefont.php
13.08
KB
-rw-r--r--
2013-05-22 07:56
pdf.fpdf.php
86.35
KB
-rw-r--r--
2013-05-22 07:56
pipeline.class.php
43.81
KB
-rw-r--r--
2013-05-22 07:56
pipeline.factory.class.php
1.17
KB
-rw-r--r--
2013-05-22 07:56
ps.image.encoder.inc.php
8
B
-rw-r--r--
2013-05-22 07:57
ps.image.encoder.simple.inc.php
7.07
KB
-rw-r--r--
2013-05-22 07:57
ps.image.encoder.stream.inc.php
657
B
-rw-r--r--
2013-05-22 07:57
ps.l2.image.encoder.stream.inc.php
1.13
KB
-rw-r--r--
2013-05-22 07:57
ps.l3.image.encoder.stream.inc.php
7.92
KB
-rw-r--r--
2013-05-22 07:57
ps.unicode.inc.php
3.07
KB
-rw-r--r--
2013-05-22 07:57
ps.utils.inc.php
344
B
-rw-r--r--
2013-05-22 07:57
ps.whitespace.inc.php
103
B
-rw-r--r--
2013-05-22 07:57
render.queue.class.php
275
B
-rw-r--r--
2013-05-22 07:57
render.stacking.context.class.php
589
B
-rw-r--r--
2013-05-22 07:57
render.stacking.level.class.php
246
B
-rw-r--r--
2013-05-22 07:57
strategy.link.rendering.normal.php
929
B
-rw-r--r--
2013-05-22 07:57
strategy.page.break.simple.php
370
B
-rw-r--r--
2013-05-22 07:57
strategy.page.break.smart.php
395
B
-rw-r--r--
2013-05-22 07:57
strategy.position.absolute.php
3.07
KB
-rw-r--r--
2013-05-22 07:57
strategy.table.layout.auto.php
10.07
KB
-rw-r--r--
2013-05-22 07:57
strategy.table.layout.fixed.php
381
B
-rw-r--r--
2013-05-22 07:57
strategy.width.absolute.positioned.php
7.54
KB
-rw-r--r--
2013-05-22 07:58
strategy.width.max.natural.php
2.55
KB
-rw-r--r--
2013-05-22 07:58
strategy.width.max.php
2.14
KB
-rw-r--r--
2013-05-22 07:58
strategy.width.min.nowrap.php
1.36
KB
-rw-r--r--
2013-05-22 07:58
strategy.width.min.php
2.01
KB
-rw-r--r--
2013-05-22 07:58
stubs._.inc.php
48
B
-rw-r--r--
2013-05-22 07:58
stubs.common.inc.php
615
B
-rw-r--r--
2013-05-22 07:58
stubs.file_get_contents.inc.php
253
B
-rw-r--r--
2013-05-22 07:58
stubs.file_put_contents.inc.php
133
B
-rw-r--r--
2013-05-22 07:58
stubs.is_executable.inc.php
54
B
-rw-r--r--
2013-05-22 07:58
stubs.memory_get_usage.inc.php
854
B
-rw-r--r--
2013-05-22 07:58
tag.body.inc.php
97
B
-rw-r--r--
2013-05-22 07:58
tag.font.inc.php
97
B
-rw-r--r--
2013-05-22 07:58
tag.frame.inc.php
3.59
KB
-rw-r--r--
2013-05-22 07:58
tag.img.inc.php
98
B
-rw-r--r--
2013-05-22 07:58
tag.input.inc.php
156
B
-rw-r--r--
2013-05-22 07:58
tag.select.inc.php
100
B
-rw-r--r--
2013-05-22 07:58
tag.span.inc.php
97
B
-rw-r--r--
2013-05-22 07:58
tag.table.inc.php
99
B
-rw-r--r--
2013-05-22 07:58
tag.td.inc.php
97
B
-rw-r--r--
2013-05-22 07:58
tag.utils.inc.php
98
B
-rw-r--r--
2013-05-22 07:58
tree.navigation.inc.php
1.68
KB
-rw-r--r--
2013-05-22 07:58
treebuilder.class.php
2.25
KB
-rw-r--r--
2013-05-22 07:58
utils_array.php
1.95
KB
-rw-r--r--
2013-05-22 07:59
utils_graphic.php
1.46
KB
-rw-r--r--
2013-05-22 07:59
utils_number.php
451
B
-rw-r--r--
2013-05-22 07:59
utils_text.php
182
B
-rw-r--r--
2013-05-22 07:59
utils_units.php
1.84
KB
-rw-r--r--
2013-05-22 07:59
utils_url.php
2.22
KB
-rw-r--r--
2013-05-22 07:59
value.background.php
4.81
KB
-rw-r--r--
2013-05-22 07:59
value.border.class.php
5.64
KB
-rw-r--r--
2013-05-22 07:59
value.border.color.class.php
483
B
-rw-r--r--
2013-05-22 07:59
value.border.edge.class.php
7.44
KB
-rw-r--r--
2013-05-22 07:59
value.border.style.class.php
451
B
-rw-r--r--
2013-05-22 07:59
value.border.width.class.php
483
B
-rw-r--r--
2013-05-22 07:59
value.bottom.php
314
B
-rw-r--r--
2013-05-22 07:59
value.color.php
1.14
KB
-rw-r--r--
2013-05-22 07:59
value.content.item.php
5
KB
-rw-r--r--
2013-05-22 07:59
value.content.php
1.01
KB
-rw-r--r--
2013-05-22 07:59
value.font.class.php
1.57
KB
-rw-r--r--
2013-05-22 07:59
value.generic.length.php
2.44
KB
-rw-r--r--
2013-05-22 07:59
value.generic.percentage.php
1.77
KB
-rw-r--r--
2013-05-22 07:59
value.generic.php
294
B
-rw-r--r--
2013-05-22 07:59
value.height.php
314
B
-rw-r--r--
2013-05-22 07:59
value.left.php
308
B
-rw-r--r--
2013-05-22 07:59
value.line-height.class.php
909
B
-rw-r--r--
2013-05-22 07:59
value.list-style.class.php
1.25
KB
-rw-r--r--
2013-05-22 07:59
value.margin.class.php
3.43
KB
-rw-r--r--
2013-05-22 07:59
value.max-height.php
323
B
-rw-r--r--
2013-05-22 07:59
value.min-height.php
323
B
-rw-r--r--
2013-05-22 07:59
value.padding.class.php
3.29
KB
-rw-r--r--
2013-05-22 07:59
value.right.php
311
B
-rw-r--r--
2013-05-22 07:59
value.text-indent.class.php
845
B
-rw-r--r--
2013-05-22 07:59
value.top.php
305
B
-rw-r--r--
2013-05-22 07:59
width.constraint.php
909
B
-rw-r--r--
2013-05-22 07:59
width.php
2.16
KB
-rw-r--r--
2013-05-22 07:59
xhtml.autoclose.inc.php
2.31
KB
-rw-r--r--
2013-05-22 07:59
xhtml.comments.inc.php
240
B
-rw-r--r--
2013-05-22 07:59
xhtml.deflist.inc.php
854
B
-rw-r--r--
2013-05-22 07:59
xhtml.entities.inc.php
2.88
KB
-rw-r--r--
2013-05-22 07:59
xhtml.lists.inc.php
982
B
-rw-r--r--
2013-05-22 07:59
xhtml.p.inc.php
1.16
KB
-rw-r--r--
2013-05-22 07:59
xhtml.script.inc.php
211
B
-rw-r--r--
2013-05-22 07:59
xhtml.selects.inc.php
727
B
-rw-r--r--
2013-05-22 07:59
xhtml.style.inc.php
1.18
KB
-rw-r--r--
2013-05-22 07:59
xhtml.tables.inc.php
4.49
KB
-rw-r--r--
2013-05-22 07:59
xhtml.utils.inc.php
15.36
KB
-rw-r--r--
2013-05-22 07:59
xml.validation.inc.php
326
B
-rw-r--r--
2013-05-22 07:59
Save
Rename
<?php // $Header: /cvsroot/html2ps/box.container.php,v 1.68 2007/05/06 18:49:29 Konstantin Exp $ require_once(HTML2PS_DIR.'strategy.width.min.php'); require_once(HTML2PS_DIR.'strategy.width.min.nowrap.php'); require_once(HTML2PS_DIR.'strategy.width.max.php'); require_once(HTML2PS_DIR.'strategy.width.max.natural.php'); /** * @package HTML2PS * @subpackage Document * * This file contains the abstract class describing the behavior of document element * containing some other document elements. */ /** * @package HTML2PS * @subpackage Document * * The GenericContainerBox class is a common superclass for all document elements able * to contain other elements. This class does provide the line-box handling utilies and * some minor float related-functions. * */ class GenericContainerBox extends GenericFormattedBox { /** * @var Array A list of contained elements (of type GenericFormattedBox) * @access public */ var $content; var $_first_line; /** * @var Array A list of child nodes in the current line box; changes dynamically * during the reflow process. * @access private */ var $_line; /** * Sometimes floats may appear inside the line box, consider the following code, * for example: "<div>text<div style='float:left'>float</div>word</div>". In * this case, the floating DIV should be rendered below the "text word" line; * thus, we need to keep a list of deferred floating elements and render them * when current line box closes. * * @var Array A list of floats which should be flown after current line box ends; * @access private */ var $_deferred_floats; /** * @var float Current output X value inside the current element * @access public */ var $_current_x; /** * @var float Current output Y value inside the current element * @access public */ var $_current_y; function destroy() { for ($i=0, $size = count($this->content); $i < $size; $i++) { $this->content[$i]->destroy(); }; unset($this->content); parent::destroy(); } /** * Render current container box using the specified output method. * * @param OutputDriver $driver The output driver object * * @return Boolean flag indicating the success or 'null' value in case of critical rendering * error */ function show(&$driver) { GenericFormattedBox::show($driver); $overflow = $this->get_css_property(CSS_OVERFLOW); /** * Sometimes the content may overflow container boxes. This situation arise, for example, * for relative-positioned child boxes, boxes having constrained height and in some * other cases. If the container box does not have CSS 'overflow' property * set to 'visible' value, the content should be visually clipped using container box * padding area. */ if ($overflow !== OVERFLOW_VISIBLE) { $driver->save(); $this->_setupClip($driver); }; /** * Render child elements */ for ($i=0, $size = count($this->content); $i < $size; $i++) { $child =& $this->content[$i]; /** * We'll check the visibility property here * Reason: all boxes (except the top-level one) are contained in some other box, * so every box will pass this check. The alternative is to add this check into every * box class show member. * * The only exception of absolute positioned block boxes which are drawn separately; * their show method is called explicitly; the similar check should be performed there */ if ($child->isVisibleInFlow()) { /** * To reduce the drawing overhead, we'll check if some part if current child element * belongs to current output page. If not, there will be no reason to draw this * child this time. * * @see OutputDriver::contains() * * @todo In rare cases the element content may be placed outside the element itself; * in such situantion content may be visible on the page, while element is not. * This situation should be resolved somehow. */ if ($driver->contains($child)) { if (is_null($child->show($driver))) { return null; }; }; }; } /** * Restore previous clipping mode, if it have been modified for non-'overflow: visible' * box. */ if ($overflow !== OVERFLOW_VISIBLE) { $driver->restore(); }; return true; } /** * Render current fixed-positioned container box using the specified output method. Unlike * the 'show' method, there's no check if current page viewport contains current element, as * fixed-positioned may be drawn on the page margins, outside the viewport. * * @param OutputDriver $driver The output driver object * * @return Boolean flag indicating the success or 'null' value in case of critical rendering * error * * @see GenericContainerBox::show() * * @todo the 'show' and 'show_fixed' method code are almost the same except the child element * method called in the inner loop; also, no check is done if current viewport contains this element, * thus sllowinf printing data on page margins, where no data should be printed normally * I suppose some more generic method containing the common code should be made. */ function show_fixed(&$driver) { GenericFormattedBox::show($driver); $overflow = $this->get_css_property(CSS_OVERFLOW); /** * Sometimes the content may overflow container boxes. This situation arise, for example, * for relative-positioned child boxes, boxes having constrained height and in some * other cases. If the container box does not have CSS 'overflow' property * set to 'visible' value, the content should be visually clipped using container box * padding area. */ if ($overflow !== OVERFLOW_VISIBLE) { // Save graphics state (of course, BEFORE the clipping area will be set) $driver->save(); $this->_setupClip($driver); }; /** * Render child elements */ $size = count($this->content); for ($i=0; $i < $size; $i++) { /** * We'll check the visibility property here * Reason: all boxes (except the top-level one) are contained in some other box, * so every box will pass this check. The alternative is to add this check into every * box class show member. * * The only exception of absolute positioned block boxes which are drawn separately; * their show method is called explicitly; the similar check should be performed there */ $child =& $this->content[$i]; if ($child->get_css_property(CSS_VISIBILITY) === VISIBILITY_VISIBLE) { // Fixed-positioned blocks are displayed separately; // If we call them now, they will be drawn twice if ($child->get_css_property(CSS_POSITION) != POSITION_FIXED) { if (is_null($child->show_fixed($driver))) { return null; }; }; }; } /** * Restore previous clipping mode, if it have been modified for non-'overflow: visible' * box. */ if ($overflow !== OVERFLOW_VISIBLE) { $driver->restore(); }; return true; } function _find(&$box) { $size = count($this->content); for ($i=0; $i<$size; $i++) { if ($this->content[$i]->uid == $box->uid) { return $i; }; } return null; } // Inserts new child box at the specified (zero-based) offset; 0 stands for first child // // @param $index index to insert child at // @param $box child to be inserted // function insert_child($index, &$box) { $box->parent =& $this; // Offset the content array for ($i = count($this->content)-1; $i>= $index; $i--) { $this->content[$i+1] =& $this->content[$i]; }; $this->content[$index] =& $box; } function insert_before(&$what, &$where) { if ($where) { $index = $this->_find($where); if (is_null($index)) { return null; }; $this->insert_child($index, $what); } else { // If 'where' is not specified, 'what' should become the last child $this->add_child($what); }; return $what; } function add_child(&$box) { $this->append_child($box); } function append_child(&$box) { // In general, this function is called like following: // $box->add_child(create_pdf_box(...)) // As create_pdf_box _may_ return null value (for example, for an empty text node), // we should process the case of $box == null here if ($box) { $box->parent =& $this; $this->content[] =& $box; }; } // Get first child of current box which actually will be drawn // on the page. So, whitespace and null boxes will be ignored // // See description of is_null for null box definition. // (not only NullBox is treated as null box) // // @return reference to the first visible child of current box function &get_first() { $size = count($this->content); for ($i=0; $i<$size; $i++) { if (!is_whitespace($this->content[$i]) && !$this->content[$i]->is_null()) { return $this->content[$i]; }; }; // We use this construct to avoid notice messages in PHP 4.4 and PHP 5 $dummy = null; return $dummy; } // Get first text or image child of current box which actually will be drawn // on the page. // // See description of is_null for null box definition. // (not only NullBox is treated as null box) // // @return reference to the first visible child of current box function &get_first_data() { $size = count($this->content); for ($i=0; $i<$size; $i++) { if (!is_whitespace($this->content[$i]) && !$this->content[$i]->is_null()) { if (is_container($this->content[$i])) { $data =& $this->content[$i]->get_first_data(); if (!is_null($data)) { return $data; }; } else { return $this->content[$i]; }; }; }; // We use this construct to avoid notice messages in PHP 4.4 and PHP 5 $dummy = null; return $dummy; } // Get last child of current box which actually will be drawn // on the page. So, whitespace and null boxes will be ignored // // See description of is_null for null box definition. // (not only NullBox is treated as null box) // // @return reference to the last visible child of current box function &get_last() { for ($i=count($this->content)-1; $i>=0; $i--) { if (!is_whitespace($this->content[$i]) && !$this->content[$i]->is_null()) { return $this->content[$i]; }; }; // We use this construct to avoid notice messages in PHP 4.4 and PHP 5 $dummy = null; return $dummy; } function offset_if_first(&$box, $dx, $dy) { if ($this->is_first($box)) { // The top-level box (page box) should never be offset if ($this->parent) { if (!$this->parent->offset_if_first($box, $dx, $dy)) { $this->offset($dx, $dy); return true; }; }; }; return false; } function offset($dx, $dy) { parent::offset($dx, $dy); $this->_current_x += $dx; $this->_current_y += $dy; // Offset contents $size = count($this->content); for ($i=0; $i < $size; $i++) { $this->content[$i]->offset($dx, $dy); } } function GenericContainerBox() { $this->GenericFormattedBox(); // By default, box does not have any content $this->content = array(); // Initialize line box $this->_line = array(); // Initialize floats-related stuff $this->_deferred_floats = array(); $this->_additional_text_indent = 0; // Current-point $this->_current_x = 0; $this->_current_y = 0; // Initialize floating children array $this->_floats = array(); } function add_deferred_float(&$float) { $this->_deferred_floats[] =& $float; } /** * Create the child nodes of current container object using the parsed HTML data * * @param mixed $root node corresponding to the current container object */ function create_content(&$root, &$pipeline) { // Initialize content $child = $root->first_child(); while ($child) { $box_child =& create_pdf_box($child, $pipeline); $this->add_child($box_child); $child = $child->next_sibling(); }; } // Content-handling functions function is_container() { return true; } function get_content() { return join('', array_map(array($this, 'get_content_callback'), $this->content)); } function get_content_callback(&$node) { return $node->get_content(); } // Get total height of this box content (including floats, if any) // Note that floats can be contained inside children, so we'll need to use // this function recusively function get_real_full_height() { $content_size = count($this->content); $overflow = $this->get_css_property(CSS_OVERFLOW); // Treat items with overflow: hidden specifically, // as floats flown out of this boxes will not be visible if ($overflow == OVERFLOW_HIDDEN) { return $this->get_full_height(); }; // Check if this object is totally empty $first = $this->get_first(); if (is_null($first)) { return 0; }; // Initialize the vertical extent taken by content using the // very first child $max_top = $first->get_top_margin(); $min_bottom = $first->get_bottom_margin(); for ($i=0; $i<$content_size; $i++) { if (!$this->content[$i]->is_null()) { // Check if top margin of current child is to the up // of vertical extent top margin $max_top = max($max_top, $this->content[$i]->get_top_margin()); /** * Check if current child bottom margin will extend * the vertical space OR if it contains floats extending * this, unless this child have overflow: hidden, because this * will prevent additional content to be visible */ if (!$this->content[$i]->is_container()) { $min_bottom = min($min_bottom, $this->content[$i]->get_bottom_margin()); } else { $content_overflow = $this->content[$i]->get_css_property(CSS_OVERFLOW); if ($content_overflow == OVERFLOW_HIDDEN) { $min_bottom = min($min_bottom, $this->content[$i]->get_bottom_margin()); } else { $min_bottom = min($min_bottom, $this->content[$i]->get_bottom_margin(), $this->content[$i]->get_top_margin() - $this->content[$i]->get_real_full_height()); }; }; }; } return max(0, $max_top - $min_bottom) + $this->_get_vert_extra(); } // LINE-LENGTH RELATED FUNCTIONS function _line_length() { $sum = 0; $size = count($this->_line); for ($i=0; $i < $size; $i++) { // Note that the line length should include the inline boxes margin/padding // as inline boxes are not directly included to the parent line box, // we'll need to check the parent of current line box element, // and, if it is an inline box, AND this element is last or first contained element // add correcponsing padding value $element =& $this->_line[$i]; if (isset($element->wrapped) && !is_null($element->wrapped)) { if ($i==0) { $sum += $element->get_full_width() - $element->getWrappedWidth(); } else { $sum += $element->getWrappedWidthAndHyphen(); }; } else { $sum += $element->get_full_width(); }; if ($element->parent) { $first = $element->parent->get_first(); $last = $element->parent->get_last(); if (!is_null($first) && $first->uid === $element->uid) { $sum += $element->parent->get_extra_line_left(); } if (!is_null($last) && $last->uid === $element->uid) { $sum += $element->parent->get_extra_line_right(); } }; } if ($this->_first_line) { $ti = $this->get_css_property(CSS_TEXT_INDENT); $sum += $ti->calculate($this); $sum += $this->_additional_text_indent; }; return $sum; } function _line_length_delta(&$context) { return max($this->get_available_width($context) - $this->_line_length(),0); } /** * Get the last box in current line box */ function &last_in_line() { $size = count($this->_line); if ($size < 1) { $dummy = null; return $dummy; }; return $this->_line[$size-1]; } // WIDTH function get_min_width_natural(&$context) { $content_size = count($this->content); /** * If box does not have any context, its minimal width is determined by extra horizontal space: * padding, border width and margins */ if ($content_size == 0) { $min_width = $this->_get_hor_extra(); return $min_width; }; /** * If we're in 'nowrap' mode, minimal and maximal width will be equal */ $white_space = $this->get_css_property(CSS_WHITE_SPACE); $pseudo_nowrap = $this->get_css_property(CSS_HTML2PS_NOWRAP); if ($white_space == WHITESPACE_NOWRAP || $pseudo_nowrap == NOWRAP_NOWRAP) { $min_width = $this->get_min_nowrap_width($context); return $min_width; } /** * We need to add text indent size to the width of the first item */ $start_index = 0; while ($start_index < $content_size && $this->content[$start_index]->out_of_flow()) { $start_index++; }; if ($start_index < $content_size) { $ti = $this->get_css_property(CSS_TEXT_INDENT); $minw = $ti->calculate($this) + $this->content[$start_index]->get_min_width_natural($context); } else { $minw = 0; }; for ($i=$start_index; $i<$content_size; $i++) { $item =& $this->content[$i]; if (!$item->out_of_flow()) { $minw = max($minw, $item->get_min_width($context)); }; } /** * Apply width constraint to min width. Return maximal value */ $wc = $this->get_css_property(CSS_WIDTH); $containing_block =& $this->_get_containing_block(); $min_width = $minw; return $min_width; } function get_min_width(&$context) { $strategy = new StrategyWidthMin(); return $strategy->apply($this, $context); } function get_min_nowrap_width(&$context) { $strategy = new StrategyWidthMinNowrap(); return $strategy->apply($this, $context); } // Note: <table width="100%" inside some block box cause this box to expand // $limit - maximal width which should not be exceeded; by default, there's no limit at all // function get_max_width_natural(&$context, $limit=10E6) { $strategy = new StrategyWidthMaxNatural($limit); return $strategy->apply($this, $context); } function get_max_width(&$context, $limit=10E6) { $strategy = new StrategyWidthMax($limit); return $strategy->apply($this, $context); } function close_line(&$context, $lastline = false) { // Align line-box using 'text-align' property $size = count($this->_line); if ($size > 0) { $last_item =& $this->_line[$size-1]; if (is_whitespace($last_item)) { $last_item->width = 0; $last_item->height = 0; }; }; // Note that text-align should not be applied to the block boxes! // As block boxes will be alone in the line-box, we can check // if the very first box in the line is inline; if not - no justification should be made // if ($size > 0) { if (is_inline($this->_line[0])) { $cb = CSSTextAlign::value2pdf($this->get_css_property(CSS_TEXT_ALIGN)); $cb($this, $context, $lastline); } else { // Nevertheless, CENTER tag and P/DIV with ALIGN attribute set should affect the // position of non-inline children. $cb = CSSPseudoAlign::value2pdf($this->get_css_property(CSS_HTML2PS_ALIGN)); $cb($this, $context, $lastline); }; }; // Apply vertical align to all of the line content // first, we need to aling all baseline-aligned boxes to determine the basic line-box height, top and bottom edges // then, SUP and SUP positioned boxes (as they can extend the top and bottom edges, but not affected themselves) // then, MIDDLE, BOTTOM and TOP positioned boxes in the given order // $baselined = array(); $baseline = 0; $height = 0; for ($i=0; $i < $size; $i++) { $vertical_align = $this->_line[$i]->get_css_property(CSS_VERTICAL_ALIGN); if ($vertical_align == VA_BASELINE) { // Add current baseline-aligned item to the baseline // $baselined[] =& $this->_line[$i]; $baseline = max($baseline, $this->_line[$i]->default_baseline); }; }; $size_baselined = count($baselined); for ($i=0; $i < $size_baselined; $i++) { $baselined[$i]->baseline = $baseline; $height = max($height, $baselined[$i]->get_full_height() + $baselined[$i]->getBaselineOffset(), $baselined[$i]->get_ascender() + $baselined[$i]->get_descender()); }; // SUB vertical align // for ($i=0; $i < $size; $i++) { $vertical_align = $this->_line[$i]->get_css_property(CSS_VERTICAL_ALIGN); if ($vertical_align == VA_SUB) { $this->_line[$i]->baseline = $baseline + $this->_line[$i]->get_full_height()/2; }; } // SUPER vertical align // for ($i=0; $i < $size; $i++) { $vertical_align = $this->_line[$i]->get_css_property(CSS_VERTICAL_ALIGN); if ($vertical_align == VA_SUPER) { $this->_line[$i]->baseline = $this->_line[$i]->get_full_height()/2; }; } // MIDDLE vertical align // $middle = 0; for ($i=0; $i < $size; $i++) { $vertical_align = $this->_line[$i]->get_css_property(CSS_VERTICAL_ALIGN); if ($vertical_align == VA_MIDDLE) { $middle = max($middle, $this->_line[$i]->get_full_height() / 2); }; }; if ($middle * 2 > $height) { // Offset already aligned items // for ($i=0; $i < $size; $i++) { $this->_line[$i]->baseline += ($middle - $height/2); }; $height = $middle * 2; }; for ($i=0; $i < $size; $i++) { $vertical_align = $this->_line[$i]->get_css_property(CSS_VERTICAL_ALIGN); if ($vertical_align == VA_MIDDLE) { $this->_line[$i]->baseline = $this->_line[$i]->default_baseline + ($height/2 - $this->_line[$i]->get_full_height()/2); }; } // BOTTOM vertical align // $bottom = 0; for ($i=0; $i < $size; $i++) { $vertical_align = $this->_line[$i]->get_css_property(CSS_VERTICAL_ALIGN); if ($vertical_align == VA_BOTTOM) { $bottom = max($bottom, $this->_line[$i]->get_full_height()); }; }; if ($bottom > $height) { // Offset already aligned items // for ($i=0; $i < $size; $i++) { $this->_line[$i]->baseline += ($bottom - $height); }; $height = $bottom; }; for ($i=0; $i < $size; $i++) { $vertical_align = $this->_line[$i]->get_css_property(CSS_VERTICAL_ALIGN); if ($vertical_align == VA_BOTTOM) { $this->_line[$i]->baseline = $this->_line[$i]->default_baseline + $height - $this->_line[$i]->get_full_height(); }; } // TOP vertical align // $bottom = 0; for ($i=0; $i < $size; $i++) { $vertical_align = $this->_line[$i]->get_css_property(CSS_VERTICAL_ALIGN); if ($vertical_align == VA_TOP) { $bottom = max($bottom, $this->_line[$i]->get_full_height()); }; }; if ($bottom > $height) { $height = $bottom; }; for ($i=0; $i < $size; $i++) { $vertical_align = $this->_line[$i]->get_css_property(CSS_VERTICAL_ALIGN); if ($vertical_align == VA_TOP) { $this->_line[$i]->baseline = $this->_line[$i]->default_baseline; }; } // Calculate the bottom Y coordinate of last line box // $line_bottom = $this->_current_y; foreach ($this->_line AS $line_element) { // This line is required; say, we have sequence of text and image inside the container, // AND image have greater baseline than text; in out case, text will be offset to the bottom // of the page and we lose the gap between text and container bottom edge, unless we'll re-extend // containier height // Note that we're using the colapsed margin value to get the Y coordinate to extend height to, // as bottom margin may be collapsed with parent $effective_bottom = $line_element->get_top() - $line_element->get_height() - $line_element->get_extra_bottom(); $this->extend_height($effective_bottom); $line_bottom = min($effective_bottom, $line_bottom); } $this->extend_height($line_bottom); // Clear the line box $this->_line = array(); // Reset current X coordinate to the far left $this->_current_x = $this->get_left(); // Extend Y coordinate $this->_current_y = $line_bottom; // Render the deferred floats for ($i = 0, $size = count($this->_deferred_floats); $i < $size; $i++) { $this->_deferred_floats[$i]->reflow_static_float($this, $context); }; // Clear deferred float list $this->_deferred_floats = array(); // modify the current-x value, so that next inline box will not intersect any floating boxes $this->_current_x = $context->float_left_x($this->_current_x, $this->_current_y); $this->_first_line = false; } function append_line(&$item) { $this->_line[] =& $item; } // Line box should be treated as empty in following cases: // 1. It is really empty (so, it contains 0 boxes) // 2. It contains only whitespace boxes function line_box_empty() { $size = count($this->_line); if ($size == 0) { return true; } // Scan line box for ($i=0; $i<$size; $i++) { if (!is_whitespace($this->_line[$i]) && !$this->_line[$i]->is_null()) { return false; }; } // No non-whitespace boxes were found return true; } function reflow_anchors(&$viewport, &$anchors, $page_heights) { GenericFormattedBox::reflow_anchors($viewport, $anchors, $page_heights); $size = count($this->content); for ($i=0; $i<$size; $i++) { $this->content[$i]->reflow_anchors($viewport, $anchors, $page_heights); } } function fitFloats(&$context) { $float_bottom = $context->float_bottom(); if (!is_null($float_bottom)) { $this->extend_height($float_bottom); }; $float_right = $context->float_right(); if (!is_null($float_right)) { $this->extend_width($float_right); }; } function reflow_content(&$context) { $text_indent = $this->get_css_property(CSS_TEXT_INDENT); $this->close_line($context); $this->_first_line = true; // If first child is inline - apply text-indent $first = $this->get_first(); if (!is_null($first)) { if (is_inline($first)) { $this->_current_x += $text_indent->calculate($this); $this->_current_x += $this->_additional_text_indent; }; }; $this->height = 0; // Reset current Y value $this->_current_y = $this->get_top(); $size = count($this->content); for ($i=0; $i < $size; $i++) { $child =& $this->content[$i]; $child->reflow($this, $context); }; $this->close_line($context, true); } function reflow_inline() { $size = count($this->content); for ($i=0; $i<$size; $i++) { $this->content[$i]->reflow_inline(); }; } function reflow_text(&$viewport) { $size = count($this->content); for ($i=0; $i<$size; $i++) { if (is_null($this->content[$i]->reflow_text($viewport))) { return null; }; } return true; } /** * Position/size current box as floating one */ function reflow_static_float(&$parent, &$context) { // Defer the float rendering till the next line box if (!$parent->line_box_empty()) { $parent->add_deferred_float($this); return; }; // Calculate margin values if they have been set as a percentage $this->_calc_percentage_margins($parent); $this->_calc_percentage_padding($parent); // Calculate width value if it have been set as a percentage $this->_calc_percentage_width($parent, $context); // Calculate margins and/or width is 'auto' values have been specified $this->_calc_auto_width_margins($parent); // Determine the actual width of the floating box // Note that get_max_width returns both content and extra width $this->put_full_width($this->get_max_width_natural($context, $this->parent->get_width())); // We need to call this function before determining the horizontal coordinate // as after vertical offset the additional space to the left may apperar $y = $this->apply_clear($parent->_current_y, $context); // determine the position of top-left floating box corner if ($this->get_css_property(CSS_FLOAT) === FLOAT_RIGHT) { $context->float_right_xy($parent, $this->get_full_width(), $x, $y); $x -= $this->get_full_width(); } else { $context->float_left_xy($parent, $this->get_full_width(), $x, $y); }; // Note that $x and $y contain just a free space corner coordinate; // If our float has a margin/padding space, we'll need to offset ot a little; // Remember that float margins are never collapsed! $this->moveto($x + $this->get_extra_left(), $y - $this->get_extra_top()); // Reflow contents. // Note that floating box creates a new float flow context for it children. $context->push_floats(); // Floating box create a separate margin collapsing context $context->push_collapsed_margin(0); $this->reflow_content($context); $context->pop_collapsed_margin(); // Floats and boxes with overflow: hidden // should completely enclose its child floats $this->fitFloats($context); // restore old float flow context $context->pop_floats(); // Add this box to the list of floats in current context $context->add_float($this); // Now fix the value of _current_x for the parent box; it is required // in the following case: // <body><img align="left">some text // in such situation floating image is flown immediately, but it the close_line call have been made before, // so _current_x value of container box will be still equal to ots left content edge; by calling float_left_x again, // we'll force "some text" to be offset to the right $parent->_current_x = $context->float_left_x($parent->_current_x, $parent->_current_y); } function reflow_whitespace(&$linebox_started, &$previous_whitespace) { $previous_whitespace = false; $linebox_started = false; $size = count($this->content); for ($i=0; $i<$size; $i++) { $child =& $this->content[$i]; $child->reflow_whitespace($linebox_started, $previous_whitespace); }; // remove the last whitespace in block box $this->remove_last_whitespace(); // Non-inline box have terminated; we may be sure that line box will be closed // at this moment and new line box after this will be generated if (!is_inline($this)) { $linebox_started = false; }; return; } function remove_last_whitespace() { if (count($this->content) == 0) { return; }; $i = count($this->content)-1; $last = $this->content[$i]; while ($i >= 0 && is_whitespace($this->content[$i])) { $this->remove($this->content[$i]); $i --; if ($i >= 0) { $last = $this->content[$i]; }; }; if ($i >= 0) { if (is_container($this->content[$i])) { $this->content[$i]->remove_last_whitespace(); }; }; } function remove(&$box) { $size = count($this->content); for ($i=0; $i<$size; $i++) { if ($this->content[$i]->uid === $box->uid) { $this->content[$i] = NullBox::create(); }; }; return; } function is_first(&$box) { $first =& $this->get_first(); // Check if there's no first box at all // if (is_null($first)) { return false; }; return $first->uid == $box->uid; } function is_null() { $size = count($this->content); for ($i=0; $i<$size; $i++) { if (!$this->content[$i]->is_null()) { return false; }; }; return true; } // Calculate the available widths - e.g. content width minus space occupied by floats; // as floats may not fill the whole height of this box, this value depends on Y-coordinate. // We use current_Y in calculations // function get_available_width(&$context) { $left_float_width = $context->float_left_x($this->get_left(), $this->_current_y) - $this->get_left(); $right_float_width = $this->get_right() - $context->float_right_x($this->get_right(), $this->_current_y); return $this->get_width() - $left_float_width - $right_float_width; } function pre_reflow_images() { $size = count($this->content); for ($i=0; $i<$size; $i++) { $this->content[$i]->pre_reflow_images(); }; } function _setupClip(&$driver) { if (!is_null($this->parent)) { $this->parent->_setupClip($driver); }; $overflow = $this->get_css_property(CSS_OVERFLOW); if ($overflow !== OVERFLOW_VISIBLE && !$GLOBALS['g_config']['debugnoclip']) { $driver->moveto( $this->get_left_border() , $this->get_top_border()); $driver->lineto( $this->get_right_border(), $this->get_top_border()); $driver->lineto( $this->get_right_border(), $this->get_bottom_border()); $driver->lineto( $this->get_left_border() , $this->get_bottom_border()); $driver->closepath(); $driver->clip(); }; } /** * DOMish functions */ function &get_element_by_id($id) { if (isset($GLOBALS['__html_box_id_map'])) { return $GLOBALS['__html_box_id_map'][$id]; } else { $dummy = null; return $dummy; }; } /* * this is just a fake at the moment */ function get_body() { return $this; } function getChildNodes() { return $this->content; } } ?>