d6e1cd89 by Jeff Balicki

remove dompdf

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent a0ae488a
Showing 276 changed files with 5 additions and 4592 deletions
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
7 } 7 }
8 ], 8 ],
9 "require": { 9 "require": {
10 "dompdf/dompdf": "1.0.2" 10
11 }, 11 },
12 "require-dev": { 12 "require-dev": {
13 "sunra/php-simple-html-dom-parser": "v1.5.0" 13 "sunra/php-simple-html-dom-parser": "v1.5.0"
......
...@@ -4,223 +4,8 @@ ...@@ -4,223 +4,8 @@
4 "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", 4 "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5 "This file is @generated automatically" 5 "This file is @generated automatically"
6 ], 6 ],
7 "content-hash": "50ea98f613e11d72e1ab594e707c71f8", 7 "content-hash": "93c274f4eed4187c43b9bb3922987c5a",
8 "packages": [ 8 "packages": [],
9 {
10 "name": "dompdf/dompdf",
11 "version": "v1.0.2",
12 "source": {
13 "type": "git",
14 "url": "https://github.com/dompdf/dompdf.git",
15 "reference": "8768448244967a46d6e67b891d30878e0e15d25c"
16 },
17 "dist": {
18 "type": "zip",
19 "url": "https://api.github.com/repos/dompdf/dompdf/zipball/8768448244967a46d6e67b891d30878e0e15d25c",
20 "reference": "8768448244967a46d6e67b891d30878e0e15d25c",
21 "shasum": ""
22 },
23 "require": {
24 "ext-dom": "*",
25 "ext-mbstring": "*",
26 "phenx/php-font-lib": "^0.5.2",
27 "phenx/php-svg-lib": "^0.3.3",
28 "php": "^7.1 || ^8.0"
29 },
30 "require-dev": {
31 "mockery/mockery": "^1.3",
32 "phpunit/phpunit": "^7.5 || ^8 || ^9",
33 "squizlabs/php_codesniffer": "^3.5"
34 },
35 "suggest": {
36 "ext-gd": "Needed to process images",
37 "ext-gmagick": "Improves image processing performance",
38 "ext-imagick": "Improves image processing performance",
39 "ext-zlib": "Needed for pdf stream compression"
40 },
41 "type": "library",
42 "extra": {
43 "branch-alias": {
44 "dev-develop": "0.7-dev"
45 }
46 },
47 "autoload": {
48 "psr-4": {
49 "Dompdf\\": "src/"
50 },
51 "classmap": [
52 "lib/"
53 ]
54 },
55 "notification-url": "https://packagist.org/downloads/",
56 "license": [
57 "LGPL-2.1"
58 ],
59 "authors": [
60 {
61 "name": "Fabien Ménager",
62 "email": "fabien.menager@gmail.com"
63 },
64 {
65 "name": "Brian Sweeney",
66 "email": "eclecticgeek@gmail.com"
67 },
68 {
69 "name": "Gabriel Bull",
70 "email": "me@gabrielbull.com"
71 }
72 ],
73 "description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter",
74 "homepage": "https://github.com/dompdf/dompdf",
75 "support": {
76 "issues": "https://github.com/dompdf/dompdf/issues",
77 "source": "https://github.com/dompdf/dompdf/tree/v1.0.2"
78 },
79 "time": "2021-01-08T14:18:52+00:00"
80 },
81 {
82 "name": "phenx/php-font-lib",
83 "version": "0.5.4",
84 "source": {
85 "type": "git",
86 "url": "https://github.com/dompdf/php-font-lib.git",
87 "reference": "dd448ad1ce34c63d09baccd05415e361300c35b4"
88 },
89 "dist": {
90 "type": "zip",
91 "url": "https://api.github.com/repos/dompdf/php-font-lib/zipball/dd448ad1ce34c63d09baccd05415e361300c35b4",
92 "reference": "dd448ad1ce34c63d09baccd05415e361300c35b4",
93 "shasum": ""
94 },
95 "require": {
96 "ext-mbstring": "*"
97 },
98 "require-dev": {
99 "symfony/phpunit-bridge": "^3 || ^4 || ^5"
100 },
101 "type": "library",
102 "autoload": {
103 "psr-4": {
104 "FontLib\\": "src/FontLib"
105 }
106 },
107 "notification-url": "https://packagist.org/downloads/",
108 "license": [
109 "LGPL-3.0"
110 ],
111 "authors": [
112 {
113 "name": "Fabien Ménager",
114 "email": "fabien.menager@gmail.com"
115 }
116 ],
117 "description": "A library to read, parse, export and make subsets of different types of font files.",
118 "homepage": "https://github.com/PhenX/php-font-lib",
119 "support": {
120 "issues": "https://github.com/dompdf/php-font-lib/issues",
121 "source": "https://github.com/dompdf/php-font-lib/tree/0.5.4"
122 },
123 "time": "2021-12-17T19:44:54+00:00"
124 },
125 {
126 "name": "phenx/php-svg-lib",
127 "version": "0.3.4",
128 "source": {
129 "type": "git",
130 "url": "https://github.com/PhenX/php-svg-lib.git",
131 "reference": "f627771eb854aa7f45f80add0f23c6c4d67ea0f2"
132 },
133 "dist": {
134 "type": "zip",
135 "url": "https://api.github.com/repos/PhenX/php-svg-lib/zipball/f627771eb854aa7f45f80add0f23c6c4d67ea0f2",
136 "reference": "f627771eb854aa7f45f80add0f23c6c4d67ea0f2",
137 "shasum": ""
138 },
139 "require": {
140 "php": "^7.4 || ^8.0",
141 "sabberworm/php-css-parser": "^8.3"
142 },
143 "require-dev": {
144 "phpunit/phpunit": "^9.5"
145 },
146 "type": "library",
147 "autoload": {
148 "psr-4": {
149 "Svg\\": "src/Svg"
150 }
151 },
152 "notification-url": "https://packagist.org/downloads/",
153 "license": [
154 "LGPL-3.0"
155 ],
156 "authors": [
157 {
158 "name": "Fabien Ménager",
159 "email": "fabien.menager@gmail.com"
160 }
161 ],
162 "description": "A library to read, parse and export to PDF SVG files.",
163 "homepage": "https://github.com/PhenX/php-svg-lib",
164 "support": {
165 "issues": "https://github.com/PhenX/php-svg-lib/issues",
166 "source": "https://github.com/PhenX/php-svg-lib/tree/0.3.4"
167 },
168 "time": "2021-10-18T02:13:32+00:00"
169 },
170 {
171 "name": "sabberworm/php-css-parser",
172 "version": "8.4.0",
173 "source": {
174 "type": "git",
175 "url": "https://github.com/sabberworm/PHP-CSS-Parser.git",
176 "reference": "e41d2140031d533348b2192a83f02d8dd8a71d30"
177 },
178 "dist": {
179 "type": "zip",
180 "url": "https://api.github.com/repos/sabberworm/PHP-CSS-Parser/zipball/e41d2140031d533348b2192a83f02d8dd8a71d30",
181 "reference": "e41d2140031d533348b2192a83f02d8dd8a71d30",
182 "shasum": ""
183 },
184 "require": {
185 "ext-iconv": "*",
186 "php": ">=5.6.20"
187 },
188 "require-dev": {
189 "codacy/coverage": "^1.4",
190 "phpunit/phpunit": "^4.8.36"
191 },
192 "suggest": {
193 "ext-mbstring": "for parsing UTF-8 CSS"
194 },
195 "type": "library",
196 "autoload": {
197 "psr-4": {
198 "Sabberworm\\CSS\\": "src/"
199 }
200 },
201 "notification-url": "https://packagist.org/downloads/",
202 "license": [
203 "MIT"
204 ],
205 "authors": [
206 {
207 "name": "Raphael Schweikert"
208 }
209 ],
210 "description": "Parser for CSS Files written in PHP",
211 "homepage": "https://www.sabberworm.com/blog/2010/6/10/php-css-parser",
212 "keywords": [
213 "css",
214 "parser",
215 "stylesheet"
216 ],
217 "support": {
218 "issues": "https://github.com/sabberworm/PHP-CSS-Parser/issues",
219 "source": "https://github.com/sabberworm/PHP-CSS-Parser/tree/8.4.0"
220 },
221 "time": "2021-12-11T13:40:54+00:00"
222 }
223 ],
224 "packages-dev": [ 9 "packages-dev": [
225 { 10 {
226 "name": "sunra/php-simple-html-dom-parser", 11 "name": "sunra/php-simple-html-dom-parser",
......
...@@ -7,10 +7,4 @@ $baseDir = dirname($vendorDir); ...@@ -7,10 +7,4 @@ $baseDir = dirname($vendorDir);
7 7
8 return array( 8 return array(
9 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 9 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
10 'Dompdf\\Cpdf' => $vendorDir . '/dompdf/dompdf/lib/Cpdf.php',
11 'HTML5_Data' => $vendorDir . '/dompdf/dompdf/lib/html5lib/Data.php',
12 'HTML5_InputStream' => $vendorDir . '/dompdf/dompdf/lib/html5lib/InputStream.php',
13 'HTML5_Parser' => $vendorDir . '/dompdf/dompdf/lib/html5lib/Parser.php',
14 'HTML5_Tokenizer' => $vendorDir . '/dompdf/dompdf/lib/html5lib/Tokenizer.php',
15 'HTML5_TreeBuilder' => $vendorDir . '/dompdf/dompdf/lib/html5lib/TreeBuilder.php',
16 ); 10 );
......
...@@ -6,8 +6,4 @@ $vendorDir = dirname(__DIR__); ...@@ -6,8 +6,4 @@ $vendorDir = dirname(__DIR__);
6 $baseDir = dirname($vendorDir); 6 $baseDir = dirname($vendorDir);
7 7
8 return array( 8 return array(
9 'Svg\\' => array($vendorDir . '/phenx/php-svg-lib/src/Svg'),
10 'Sabberworm\\CSS\\' => array($vendorDir . '/sabberworm/php-css-parser/src'),
11 'FontLib\\' => array($vendorDir . '/phenx/php-font-lib/src/FontLib'),
12 'Dompdf\\' => array($vendorDir . '/dompdf/dompdf/src'),
13 ); 9 );
......
...@@ -22,8 +22,6 @@ class ComposerAutoloaderInit7eed35e2f38ed1cb03859be433a9922f ...@@ -22,8 +22,6 @@ class ComposerAutoloaderInit7eed35e2f38ed1cb03859be433a9922f
22 return self::$loader; 22 return self::$loader;
23 } 23 }
24 24
25 require __DIR__ . '/platform_check.php';
26
27 spl_autoload_register(array('ComposerAutoloaderInit7eed35e2f38ed1cb03859be433a9922f', 'loadClassLoader'), true, true); 25 spl_autoload_register(array('ComposerAutoloaderInit7eed35e2f38ed1cb03859be433a9922f', 'loadClassLoader'), true, true);
28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
29 spl_autoload_unregister(array('ComposerAutoloaderInit7eed35e2f38ed1cb03859be433a9922f', 'loadClassLoader')); 27 spl_autoload_unregister(array('ComposerAutoloaderInit7eed35e2f38ed1cb03859be433a9922f', 'loadClassLoader'));
......
...@@ -6,41 +6,6 @@ namespace Composer\Autoload; ...@@ -6,41 +6,6 @@ namespace Composer\Autoload;
6 6
7 class ComposerStaticInit7eed35e2f38ed1cb03859be433a9922f 7 class ComposerStaticInit7eed35e2f38ed1cb03859be433a9922f
8 { 8 {
9 public static $prefixLengthsPsr4 = array (
10 'S' =>
11 array (
12 'Svg\\' => 4,
13 'Sabberworm\\CSS\\' => 15,
14 ),
15 'F' =>
16 array (
17 'FontLib\\' => 8,
18 ),
19 'D' =>
20 array (
21 'Dompdf\\' => 7,
22 ),
23 );
24
25 public static $prefixDirsPsr4 = array (
26 'Svg\\' =>
27 array (
28 0 => __DIR__ . '/..' . '/phenx/php-svg-lib/src/Svg',
29 ),
30 'Sabberworm\\CSS\\' =>
31 array (
32 0 => __DIR__ . '/..' . '/sabberworm/php-css-parser/src',
33 ),
34 'FontLib\\' =>
35 array (
36 0 => __DIR__ . '/..' . '/phenx/php-font-lib/src/FontLib',
37 ),
38 'Dompdf\\' =>
39 array (
40 0 => __DIR__ . '/..' . '/dompdf/dompdf/src',
41 ),
42 );
43
44 public static $prefixesPsr0 = array ( 9 public static $prefixesPsr0 = array (
45 'S' => 10 'S' =>
46 array ( 11 array (
...@@ -53,19 +18,11 @@ class ComposerStaticInit7eed35e2f38ed1cb03859be433a9922f ...@@ -53,19 +18,11 @@ class ComposerStaticInit7eed35e2f38ed1cb03859be433a9922f
53 18
54 public static $classMap = array ( 19 public static $classMap = array (
55 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 20 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
56 'Dompdf\\Cpdf' => __DIR__ . '/..' . '/dompdf/dompdf/lib/Cpdf.php',
57 'HTML5_Data' => __DIR__ . '/..' . '/dompdf/dompdf/lib/html5lib/Data.php',
58 'HTML5_InputStream' => __DIR__ . '/..' . '/dompdf/dompdf/lib/html5lib/InputStream.php',
59 'HTML5_Parser' => __DIR__ . '/..' . '/dompdf/dompdf/lib/html5lib/Parser.php',
60 'HTML5_Tokenizer' => __DIR__ . '/..' . '/dompdf/dompdf/lib/html5lib/Tokenizer.php',
61 'HTML5_TreeBuilder' => __DIR__ . '/..' . '/dompdf/dompdf/lib/html5lib/TreeBuilder.php',
62 ); 21 );
63 22
64 public static function getInitializer(ClassLoader $loader) 23 public static function getInitializer(ClassLoader $loader)
65 { 24 {
66 return \Closure::bind(function () use ($loader) { 25 return \Closure::bind(function () use ($loader) {
67 $loader->prefixLengthsPsr4 = ComposerStaticInit7eed35e2f38ed1cb03859be433a9922f::$prefixLengthsPsr4;
68 $loader->prefixDirsPsr4 = ComposerStaticInit7eed35e2f38ed1cb03859be433a9922f::$prefixDirsPsr4;
69 $loader->prefixesPsr0 = ComposerStaticInit7eed35e2f38ed1cb03859be433a9922f::$prefixesPsr0; 26 $loader->prefixesPsr0 = ComposerStaticInit7eed35e2f38ed1cb03859be433a9922f::$prefixesPsr0;
70 $loader->classMap = ComposerStaticInit7eed35e2f38ed1cb03859be433a9922f::$classMap; 27 $loader->classMap = ComposerStaticInit7eed35e2f38ed1cb03859be433a9922f::$classMap;
71 28
......
1 { 1 {
2 "packages": [ 2 "packages": [
3 { 3 {
4 "name": "dompdf/dompdf",
5 "version": "v1.0.2",
6 "version_normalized": "1.0.2.0",
7 "source": {
8 "type": "git",
9 "url": "https://github.com/dompdf/dompdf.git",
10 "reference": "8768448244967a46d6e67b891d30878e0e15d25c"
11 },
12 "dist": {
13 "type": "zip",
14 "url": "https://api.github.com/repos/dompdf/dompdf/zipball/8768448244967a46d6e67b891d30878e0e15d25c",
15 "reference": "8768448244967a46d6e67b891d30878e0e15d25c",
16 "shasum": ""
17 },
18 "require": {
19 "ext-dom": "*",
20 "ext-mbstring": "*",
21 "phenx/php-font-lib": "^0.5.2",
22 "phenx/php-svg-lib": "^0.3.3",
23 "php": "^7.1 || ^8.0"
24 },
25 "require-dev": {
26 "mockery/mockery": "^1.3",
27 "phpunit/phpunit": "^7.5 || ^8 || ^9",
28 "squizlabs/php_codesniffer": "^3.5"
29 },
30 "suggest": {
31 "ext-gd": "Needed to process images",
32 "ext-gmagick": "Improves image processing performance",
33 "ext-imagick": "Improves image processing performance",
34 "ext-zlib": "Needed for pdf stream compression"
35 },
36 "time": "2021-01-08T14:18:52+00:00",
37 "type": "library",
38 "extra": {
39 "branch-alias": {
40 "dev-develop": "0.7-dev"
41 }
42 },
43 "installation-source": "dist",
44 "autoload": {
45 "psr-4": {
46 "Dompdf\\": "src/"
47 },
48 "classmap": [
49 "lib/"
50 ]
51 },
52 "notification-url": "https://packagist.org/downloads/",
53 "license": [
54 "LGPL-2.1"
55 ],
56 "authors": [
57 {
58 "name": "Fabien Ménager",
59 "email": "fabien.menager@gmail.com"
60 },
61 {
62 "name": "Brian Sweeney",
63 "email": "eclecticgeek@gmail.com"
64 },
65 {
66 "name": "Gabriel Bull",
67 "email": "me@gabrielbull.com"
68 }
69 ],
70 "description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter",
71 "homepage": "https://github.com/dompdf/dompdf",
72 "support": {
73 "issues": "https://github.com/dompdf/dompdf/issues",
74 "source": "https://github.com/dompdf/dompdf/tree/v1.0.2"
75 },
76 "install-path": "../dompdf/dompdf"
77 },
78 {
79 "name": "phenx/php-font-lib",
80 "version": "0.5.4",
81 "version_normalized": "0.5.4.0",
82 "source": {
83 "type": "git",
84 "url": "https://github.com/dompdf/php-font-lib.git",
85 "reference": "dd448ad1ce34c63d09baccd05415e361300c35b4"
86 },
87 "dist": {
88 "type": "zip",
89 "url": "https://api.github.com/repos/dompdf/php-font-lib/zipball/dd448ad1ce34c63d09baccd05415e361300c35b4",
90 "reference": "dd448ad1ce34c63d09baccd05415e361300c35b4",
91 "shasum": ""
92 },
93 "require": {
94 "ext-mbstring": "*"
95 },
96 "require-dev": {
97 "symfony/phpunit-bridge": "^3 || ^4 || ^5"
98 },
99 "time": "2021-12-17T19:44:54+00:00",
100 "type": "library",
101 "installation-source": "dist",
102 "autoload": {
103 "psr-4": {
104 "FontLib\\": "src/FontLib"
105 }
106 },
107 "notification-url": "https://packagist.org/downloads/",
108 "license": [
109 "LGPL-3.0"
110 ],
111 "authors": [
112 {
113 "name": "Fabien Ménager",
114 "email": "fabien.menager@gmail.com"
115 }
116 ],
117 "description": "A library to read, parse, export and make subsets of different types of font files.",
118 "homepage": "https://github.com/PhenX/php-font-lib",
119 "support": {
120 "issues": "https://github.com/dompdf/php-font-lib/issues",
121 "source": "https://github.com/dompdf/php-font-lib/tree/0.5.4"
122 },
123 "install-path": "../phenx/php-font-lib"
124 },
125 {
126 "name": "phenx/php-svg-lib",
127 "version": "0.3.4",
128 "version_normalized": "0.3.4.0",
129 "source": {
130 "type": "git",
131 "url": "https://github.com/PhenX/php-svg-lib.git",
132 "reference": "f627771eb854aa7f45f80add0f23c6c4d67ea0f2"
133 },
134 "dist": {
135 "type": "zip",
136 "url": "https://api.github.com/repos/PhenX/php-svg-lib/zipball/f627771eb854aa7f45f80add0f23c6c4d67ea0f2",
137 "reference": "f627771eb854aa7f45f80add0f23c6c4d67ea0f2",
138 "shasum": ""
139 },
140 "require": {
141 "php": "^7.4 || ^8.0",
142 "sabberworm/php-css-parser": "^8.3"
143 },
144 "require-dev": {
145 "phpunit/phpunit": "^9.5"
146 },
147 "time": "2021-10-18T02:13:32+00:00",
148 "type": "library",
149 "installation-source": "dist",
150 "autoload": {
151 "psr-4": {
152 "Svg\\": "src/Svg"
153 }
154 },
155 "notification-url": "https://packagist.org/downloads/",
156 "license": [
157 "LGPL-3.0"
158 ],
159 "authors": [
160 {
161 "name": "Fabien Ménager",
162 "email": "fabien.menager@gmail.com"
163 }
164 ],
165 "description": "A library to read, parse and export to PDF SVG files.",
166 "homepage": "https://github.com/PhenX/php-svg-lib",
167 "support": {
168 "issues": "https://github.com/PhenX/php-svg-lib/issues",
169 "source": "https://github.com/PhenX/php-svg-lib/tree/0.3.4"
170 },
171 "install-path": "../phenx/php-svg-lib"
172 },
173 {
174 "name": "sabberworm/php-css-parser",
175 "version": "8.4.0",
176 "version_normalized": "8.4.0.0",
177 "source": {
178 "type": "git",
179 "url": "https://github.com/sabberworm/PHP-CSS-Parser.git",
180 "reference": "e41d2140031d533348b2192a83f02d8dd8a71d30"
181 },
182 "dist": {
183 "type": "zip",
184 "url": "https://api.github.com/repos/sabberworm/PHP-CSS-Parser/zipball/e41d2140031d533348b2192a83f02d8dd8a71d30",
185 "reference": "e41d2140031d533348b2192a83f02d8dd8a71d30",
186 "shasum": ""
187 },
188 "require": {
189 "ext-iconv": "*",
190 "php": ">=5.6.20"
191 },
192 "require-dev": {
193 "codacy/coverage": "^1.4",
194 "phpunit/phpunit": "^4.8.36"
195 },
196 "suggest": {
197 "ext-mbstring": "for parsing UTF-8 CSS"
198 },
199 "time": "2021-12-11T13:40:54+00:00",
200 "type": "library",
201 "installation-source": "dist",
202 "autoload": {
203 "psr-4": {
204 "Sabberworm\\CSS\\": "src/"
205 }
206 },
207 "notification-url": "https://packagist.org/downloads/",
208 "license": [
209 "MIT"
210 ],
211 "authors": [
212 {
213 "name": "Raphael Schweikert"
214 }
215 ],
216 "description": "Parser for CSS Files written in PHP",
217 "homepage": "https://www.sabberworm.com/blog/2010/6/10/php-css-parser",
218 "keywords": [
219 "css",
220 "parser",
221 "stylesheet"
222 ],
223 "support": {
224 "issues": "https://github.com/sabberworm/PHP-CSS-Parser/issues",
225 "source": "https://github.com/sabberworm/PHP-CSS-Parser/tree/8.4.0"
226 },
227 "install-path": "../sabberworm/php-css-parser"
228 },
229 {
230 "name": "sunra/php-simple-html-dom-parser", 4 "name": "sunra/php-simple-html-dom-parser",
231 "version": "v1.5.0", 5 "version": "v1.5.0",
232 "version_normalized": "1.5.0.0", 6 "version_normalized": "1.5.0.0",
......
...@@ -3,58 +3,22 @@ ...@@ -3,58 +3,22 @@
3 'name' => 'insu/commonwell-corp', 3 'name' => 'insu/commonwell-corp',
4 'pretty_version' => 'dev-master', 4 'pretty_version' => 'dev-master',
5 'version' => 'dev-master', 5 'version' => 'dev-master',
6 'reference' => 'ada974d33e0f5a22e7124905c40b3d111996b970', 6 'reference' => 'a0ae488ac7432224a2caa5b58213e0be46b6f35c',
7 'type' => 'library', 7 'type' => 'library',
8 'install_path' => __DIR__ . '/../../', 8 'install_path' => __DIR__ . '/../../',
9 'aliases' => array(), 9 'aliases' => array(),
10 'dev' => true, 10 'dev' => true,
11 ), 11 ),
12 'versions' => array( 12 'versions' => array(
13 'dompdf/dompdf' => array(
14 'pretty_version' => 'v1.0.2',
15 'version' => '1.0.2.0',
16 'reference' => '8768448244967a46d6e67b891d30878e0e15d25c',
17 'type' => 'library',
18 'install_path' => __DIR__ . '/../dompdf/dompdf',
19 'aliases' => array(),
20 'dev_requirement' => false,
21 ),
22 'insu/commonwell-corp' => array( 13 'insu/commonwell-corp' => array(
23 'pretty_version' => 'dev-master', 14 'pretty_version' => 'dev-master',
24 'version' => 'dev-master', 15 'version' => 'dev-master',
25 'reference' => 'ada974d33e0f5a22e7124905c40b3d111996b970', 16 'reference' => 'a0ae488ac7432224a2caa5b58213e0be46b6f35c',
26 'type' => 'library', 17 'type' => 'library',
27 'install_path' => __DIR__ . '/../../', 18 'install_path' => __DIR__ . '/../../',
28 'aliases' => array(), 19 'aliases' => array(),
29 'dev_requirement' => false, 20 'dev_requirement' => false,
30 ), 21 ),
31 'phenx/php-font-lib' => array(
32 'pretty_version' => '0.5.4',
33 'version' => '0.5.4.0',
34 'reference' => 'dd448ad1ce34c63d09baccd05415e361300c35b4',
35 'type' => 'library',
36 'install_path' => __DIR__ . '/../phenx/php-font-lib',
37 'aliases' => array(),
38 'dev_requirement' => false,
39 ),
40 'phenx/php-svg-lib' => array(
41 'pretty_version' => '0.3.4',
42 'version' => '0.3.4.0',
43 'reference' => 'f627771eb854aa7f45f80add0f23c6c4d67ea0f2',
44 'type' => 'library',
45 'install_path' => __DIR__ . '/../phenx/php-svg-lib',
46 'aliases' => array(),
47 'dev_requirement' => false,
48 ),
49 'sabberworm/php-css-parser' => array(
50 'pretty_version' => '8.4.0',
51 'version' => '8.4.0.0',
52 'reference' => 'e41d2140031d533348b2192a83f02d8dd8a71d30',
53 'type' => 'library',
54 'install_path' => __DIR__ . '/../sabberworm/php-css-parser',
55 'aliases' => array(),
56 'dev_requirement' => false,
57 ),
58 'sunra/php-simple-html-dom-parser' => array( 22 'sunra/php-simple-html-dom-parser' => array(
59 'pretty_version' => 'v1.5.0', 23 'pretty_version' => 'v1.5.0',
60 'version' => '1.5.0.0', 24 'version' => '1.5.0.0',
......
1 <?php
2
3 // platform_check.php @generated by Composer
4
5 $issues = array();
6
7 if (!(PHP_VERSION_ID >= 70400)) {
8 $issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". You are running ' . PHP_VERSION . '.';
9 }
10
11 if ($issues) {
12 if (!headers_sent()) {
13 header('HTTP/1.1 500 Internal Server Error');
14 }
15 if (!ini_get('display_errors')) {
16 if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
17 fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
18 } elseif (!headers_sent()) {
19 echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
20 }
21 }
22 trigger_error(
23 'Composer detected issues in your platform: ' . implode(' ', $issues),
24 E_USER_ERROR
25 );
26 }
1 # How to contribute
2
3 - [Getting help](#getting-help)
4 - [Submitting bug reports](#submitting-bug-reports)
5 - [Contributing code](#contributing-code)
6
7 ## Getting help
8
9 Community discussion, questions, and informal bug reporting is done on the
10 [dompdf Google group](http://groups.google.com/group/dompdf). You may also
11 seek help on
12 [StackOverflow](http://stackoverflow.com/questions/tagged/dompdf).
13
14 ## Submitting bug reports
15
16 The preferred way to report bugs is to use the
17 [GitHub issue tracker](http://github.com/dompdf/dompdf/issues). Before
18 reporting a bug, read these pointers.
19
20 **Please search inside the bug tracker to see if the bug you found is not already reported.**
21
22 **Note:** The issue tracker is for *bugs* and *feature requests*, not requests for help.
23 Questions should be asked on the
24 [dompdf Google group](http://groups.google.com/group/dompdf) instead.
25
26 ### Reporting bugs effectively
27
28 - dompdf is maintained by volunteers. They don't owe you anything, so be
29 polite. Reports with an indignant or belligerent tone tend to be moved to the
30 bottom of the pile.
31
32 - Include information about **the PHP version on which the problem occurred**. Even
33 if you tested several PHP version on different servers, and the problem occurred
34 in all of them, mention this fact in the bug report.
35 Also include the operating system it's installed on. PHP configuration can also help,
36 and server error logs (like Apache logs)
37
38 - Mention which release of dompdf you're using (the zip, the master branch, etc).
39 Preferably, try also with the current development snapshot, to ensure the
40 problem has not already been fixed.
41
42 - Mention very precisely what went wrong. "X is broken" is not a good bug
43 report. What did you expect to happen? What happened instead? Describe the
44 exact steps a maintainer has to take to make the problem occur. We can not
45 fix something that we can not observe.
46
47 - If the problem can not be reproduced in any of the demos included in the
48 dompdf distribution, please provide an HTML document that demonstrates
49 the problem. There are a few options to show us your code:
50 - [JS Fiddle](http://jsfiddle.net/)
51 - [dompdf debug helper](http://eclecticgeek.com/dompdf/debug.php) (provided by @bsweeney)
52 - Include the HTML/CSS inside the bug report, with
53 [code highlighting](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#wiki-code).
54
55 ## Contributing code
56
57 - Make sure you have a [GitHub Account](https://github.com/signup/free)
58 - Fork [dompdf](https://github.com/dompdf/dompdf/)
59 ([how to fork a repo](https://help.github.com/articles/fork-a-repo))
60 - *Make your changes on the `develop` branch* or the most appropriate feature branch. Please only patch
61 the master branch if you are attempting to address an urgent bug in the released code.
62 - Add a simple test file in `www/test/`, with a comprehensive name.
63 - Add a unit test in the ``test/Dompdf/Tests/`` directory.
64 - Submit a pull request
65 ([how to create a pull request](https://help.github.com/articles/fork-a-repo))
1 Dompdf
2 ======
3
4 [![Build Status](https://travis-ci.org/dompdf/dompdf.png?branch=master)](https://travis-ci.org/dompdf/dompdf)
5 [![Latest Stable Version](https://poser.pugx.org/dompdf/dompdf/v/stable.png)](https://packagist.org/packages/dompdf/dompdf)
6 [![Total Downloads](https://poser.pugx.org/dompdf/dompdf/downloads.png)](https://packagist.org/packages/dompdf/dompdf)
7 [![Latest Unstable Version](https://poser.pugx.org/dompdf/dompdf/v/unstable.png)](https://packagist.org/packages/dompdf/dompdf)
8 [![License](https://poser.pugx.org/dompdf/dompdf/license.png)](https://packagist.org/packages/dompdf/dompdf)
9
10 **Dompdf is an HTML to PDF converter**
11
12 At its heart, dompdf is (mostly) a [CSS 2.1](http://www.w3.org/TR/CSS2/) compliant
13 HTML layout and rendering engine written in PHP. It is a style-driven renderer:
14 it will download and read external stylesheets, inline style tags, and the style
15 attributes of individual HTML elements. It also supports most presentational
16 HTML attributes.
17
18 *This document applies to the latest stable code which may not reflect the current
19 release. For released code please
20 [navigate to the appropriate tag](https://github.com/dompdf/dompdf/tags).*
21
22 ----
23
24 **Check out the [demo](https://dompdf.net/examples.php) and ask any
25 question on [StackOverflow](http://stackoverflow.com/questions/tagged/dompdf) or
26 on the [Google Groups](http://groups.google.com/group/dompdf).**
27
28 Follow us on [![Twitter](http://twitter-badges.s3.amazonaws.com/twitter-a.png)](http://www.twitter.com/dompdf).
29
30 ---
31
32
33
34 ## Features
35
36 * Handles most CSS 2.1 and a few CSS3 properties, including @import, @media &
37 @page rules
38 * Supports most presentational HTML 4.0 attributes
39 * Supports external stylesheets, either local or through http/ftp (via
40 fopen-wrappers)
41 * Supports complex tables, including row & column spans, separate & collapsed
42 border models, individual cell styling
43 * Image support (gif, png (8, 24 and 32 bit with alpha channel), bmp & jpeg)
44 * No dependencies on external PDF libraries, thanks to the R&OS PDF class
45 * Inline PHP support
46 * Basic SVG support (see "Limitations" below)
47
48 ## Requirements
49
50 * PHP version 7.1 or higher
51 * DOM extension
52 * MBString extension
53 * php-font-lib
54 * php-svg-lib
55
56 Note that some required dependencies may have further dependencies
57 (notably php-svg-lib requires sabberworm/php-css-parser).
58
59 ### Recommendations
60
61 * OPcache (OPcache, XCache, APC, etc.): improves performance
62 * GD (for image processing)
63 * IMagick or GMagick extension: improves image processing performance
64
65 Visit the wiki for more information:
66 https://github.com/dompdf/dompdf/wiki/Requirements
67
68 ## About Fonts & Character Encoding
69
70 PDF documents internally support the following fonts: Helvetica, Times-Roman,
71 Courier, Zapf-Dingbats, & Symbol. These fonts only support Windows ANSI
72 encoding. In order for a PDF to display characters that are not available in
73 Windows ANSI, you must supply an external font. Dompdf will embed any referenced
74 font in the PDF so long as it has been pre-loaded or is accessible to dompdf and
75 reference in CSS @font-face rules. See the
76 [font overview](https://github.com/dompdf/dompdf/wiki/About-Fonts-and-Character-Encoding)
77 for more information on how to use fonts.
78
79 The [DejaVu TrueType fonts](https://dejavu-fonts.github.io/) have been pre-installed
80 to give dompdf decent Unicode character coverage by default. To use the DejaVu
81 fonts reference the font in your stylesheet, e.g. `body { font-family: DejaVu
82 Sans; }` (for DejaVu Sans). The following DejaVu 2.34 fonts are available:
83 DejaVu Sans, DejaVu Serif, and DejaVu Sans Mono.
84
85 ## Easy Installation
86
87 ### Install with composer
88
89 To install with [Composer](https://getcomposer.org/), simply require the
90 latest version of this package.
91
92 ```bash
93 composer require dompdf/dompdf
94 ```
95
96 Make sure that the autoload file from Composer is loaded.
97
98 ```php
99 // somewhere early in your project's loading, require the Composer autoloader
100 // see: http://getcomposer.org/doc/00-intro.md
101 require 'vendor/autoload.php';
102
103 ```
104
105 ### Download and install
106
107 Download a packaged archive of dompdf and extract it into the
108 directory where dompdf will reside
109
110 * You can download stable copies of dompdf from
111 https://github.com/dompdf/dompdf/releases
112 * Or download a nightly (the latest, unreleased code) from
113 http://eclecticgeek.com/dompdf
114
115 Use the packaged release autoloader to load dompdf, libraries,
116 and helper functions in your PHP:
117
118 ```php
119 // include autoloader
120 require_once 'dompdf/autoload.inc.php';
121 ```
122
123 Note: packaged releases are named according using semantic
124 versioning (_dompdf_MAJOR-MINOR-PATCH.zip_). So the 1.0.0
125 release would be dompdf_1-0-0.zip. This is the only download
126 that includes the autoloader for Dompdf and all its dependencies.
127
128 ### Install with git
129
130 From the command line, switch to the directory where dompdf will
131 reside and run the following commands:
132
133 ```sh
134 git clone https://github.com/dompdf/dompdf.git
135 cd dompdf/lib
136
137 git clone https://github.com/PhenX/php-font-lib.git php-font-lib
138 cd php-font-lib
139 git checkout 0.5.1
140 cd ..
141
142 git clone https://github.com/PhenX/php-svg-lib.git php-svg-lib
143 cd php-svg-lib
144 git checkout v0.3.2
145 cd ..
146
147 git clone https://github.com/sabberworm/PHP-CSS-Parser.git php-css-parser
148 cd php-css-parser
149 git checkout 8.1.0
150 ```
151
152 Require dompdf and it's dependencies in your PHP.
153 For details see the [autoloader in the utils project](https://github.com/dompdf/utils/blob/master/autoload.inc.php).
154
155 ## Quick Start
156
157 Just pass your HTML in to dompdf and stream the output:
158
159 ```php
160 // reference the Dompdf namespace
161 use Dompdf\Dompdf;
162
163 // instantiate and use the dompdf class
164 $dompdf = new Dompdf();
165 $dompdf->loadHtml('hello world');
166
167 // (Optional) Setup the paper size and orientation
168 $dompdf->setPaper('A4', 'landscape');
169
170 // Render the HTML as PDF
171 $dompdf->render();
172
173 // Output the generated PDF to Browser
174 $dompdf->stream();
175 ```
176
177 ### Setting Options
178
179 Set options during dompdf instantiation:
180
181 ```php
182 use Dompdf\Dompdf;
183 use Dompdf\Options;
184
185 $options = new Options();
186 $options->set('defaultFont', 'Courier');
187 $dompdf = new Dompdf($options);
188 ```
189
190 or at run time
191
192 ```php
193 use Dompdf\Dompdf;
194
195 $dompdf = new Dompdf();
196 $options = $dompdf->getOptions();
197 $options->setDefaultFont('Courier');
198 $dompdf->setOptions($options);
199 ```
200
201 See [Dompdf\Options](src/Options.php) for a list of available options.
202
203 ### Resource Reference Requirements
204
205 In order to protect potentially sensitive information Dompdf imposes
206 restrictions on files referenced from the local file system or the web.
207
208 Files accessed through web-based protocols have the following requirements:
209 * The Dompdf option "isRemoteEnabled" must be set to "true"
210 * PHP must either have the curl extension enabled or the
211 allow_url_fopen setting set to true
212
213 Files accessed through the local file system have the following requirement:
214 * The file must fall within the path(s) specified for the Dompdf "chroot" option
215
216 ## Limitations (Known Issues)
217
218 * Dompdf is not particularly tolerant to poorly-formed HTML input. To avoid
219 any unexpected rendering issues you should either enable the built-in HTML5
220 parser at runtime (`$options->setIsHtml5ParserEnabled(true);`)
221 or run your HTML through a HTML validator/cleaner (such as
222 [Tidy](http://tidy.sourceforge.net) or the
223 [W3C Markup Validation Service](http://validator.w3.org)).
224 * Table cells are not pageable, meaning a table row must fit on a single page.
225 * Elements are rendered on the active page when they are parsed.
226 * Embedding "raw" SVG's (`<svg><path...></svg>`) isn't working yet, you need to
227 either link to an external SVG file, or use a DataURI like this:
228 ```php
229 $html = '<img src="data:image/svg+xml;base64,' . base64_encode($svg) . '" ...>';
230 ```
231 Watch https://github.com/dompdf/dompdf/issues/320 for progress
232
233 ---
234
235 [![Donate button](https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif)](http://goo.gl/DSvWf)
236
237 *If you find this project useful, please consider making a donation.
238 Any funds donated will be used to help further development on this project.)*
1 {
2 "name": "dompdf/dompdf",
3 "type": "library",
4 "description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter",
5 "homepage": "https://github.com/dompdf/dompdf",
6 "license": "LGPL-2.1",
7 "authors": [
8 {
9 "name": "Fabien Ménager",
10 "email": "fabien.menager@gmail.com"
11 },
12 {
13 "name": "Brian Sweeney",
14 "email": "eclecticgeek@gmail.com"
15 },
16 {
17 "name": "Gabriel Bull",
18 "email": "me@gabrielbull.com"
19 }
20 ],
21 "autoload": {
22 "psr-4": {
23 "Dompdf\\": "src/"
24 },
25 "classmap": [
26 "lib/"
27 ]
28 },
29 "autoload-dev": {
30 "psr-4": {
31 "Dompdf\\Tests\\": "tests/"
32 }
33 },
34 "require": {
35 "php": "^7.1 || ^8.0",
36 "ext-dom": "*",
37 "ext-mbstring": "*",
38 "phenx/php-font-lib": "^0.5.2",
39 "phenx/php-svg-lib": "^0.3.3"
40 },
41 "require-dev": {
42 "phpunit/phpunit": "^7.5 || ^8 || ^9",
43 "squizlabs/php_codesniffer": "^3.5",
44 "mockery/mockery": "^1.3"
45 },
46 "suggest": {
47 "ext-gd": "Needed to process images",
48 "ext-imagick": "Improves image processing performance",
49 "ext-gmagick": "Improves image processing performance",
50 "ext-zlib": "Needed for pdf stream compression"
51 },
52 "extra": {
53 "branch-alias": {
54 "dev-develop": "0.7-dev"
55 }
56 }
57 }
This diff could not be displayed because it is too large.
1 StartFontMetrics 4.1
2 Comment Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All rights reserved.
3 Comment Creation Date: Thu May 1 15:12:25 1997
4 Comment UniqueID 43064
5 Comment VMusage 30820 39997
6 FontName Symbol
7 FullName Symbol
8 FamilyName Symbol
9 Weight Medium
10 ItalicAngle 0
11 IsFixedPitch false
12 CharacterSet Special
13 FontBBox -180 -293 1090 1010
14 UnderlinePosition -100
15 UnderlineThickness 50
16 Version 001.008
17 Notice Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All rights reserved.
18 EncodingScheme FontSpecific
19 StdHW 92
20 StdVW 85
21 StartCharMetrics 190
22 C 32 ; WX 250 ; N space ; B 0 0 0 0 ;
23 C 33 ; WX 333 ; N exclam ; B 128 -17 240 672 ;
24 C 34 ; WX 713 ; N universal ; B 31 0 681 705 ;
25 C 35 ; WX 500 ; N numbersign ; B 20 -16 481 673 ;
26 C 36 ; WX 549 ; N existential ; B 25 0 478 707 ;
27 C 37 ; WX 833 ; N percent ; B 63 -36 771 655 ;
28 C 38 ; WX 778 ; N ampersand ; B 41 -18 750 661 ;
29 C 39 ; WX 439 ; N suchthat ; B 48 -17 414 500 ;
30 C 40 ; WX 333 ; N parenleft ; B 53 -191 300 673 ;
31 C 41 ; WX 333 ; N parenright ; B 30 -191 277 673 ;
32 C 42 ; WX 500 ; N asteriskmath ; B 65 134 427 551 ;
33 C 43 ; WX 549 ; N plus ; B 10 0 539 533 ;
34 C 44 ; WX 250 ; N comma ; B 56 -152 194 104 ;
35 C 45 ; WX 549 ; N minus ; B 11 233 535 288 ;
36 C 46 ; WX 250 ; N period ; B 69 -17 181 95 ;
37 C 47 ; WX 278 ; N slash ; B 0 -18 254 646 ;
38 C 48 ; WX 500 ; N zero ; B 24 -14 476 685 ;
39 C 49 ; WX 500 ; N one ; B 117 0 390 673 ;
40 C 50 ; WX 500 ; N two ; B 25 0 475 685 ;
41 C 51 ; WX 500 ; N three ; B 43 -14 435 685 ;
42 C 52 ; WX 500 ; N four ; B 15 0 469 685 ;
43 C 53 ; WX 500 ; N five ; B 32 -14 445 690 ;
44 C 54 ; WX 500 ; N six ; B 34 -14 468 685 ;
45 C 55 ; WX 500 ; N seven ; B 24 -16 448 673 ;
46 C 56 ; WX 500 ; N eight ; B 56 -14 445 685 ;
47 C 57 ; WX 500 ; N nine ; B 30 -18 459 685 ;
48 C 58 ; WX 278 ; N colon ; B 81 -17 193 460 ;
49 C 59 ; WX 278 ; N semicolon ; B 83 -152 221 460 ;
50 C 60 ; WX 549 ; N less ; B 26 0 523 522 ;
51 C 61 ; WX 549 ; N equal ; B 11 141 537 390 ;
52 C 62 ; WX 549 ; N greater ; B 26 0 523 522 ;
53 C 63 ; WX 444 ; N question ; B 70 -17 412 686 ;
54 C 64 ; WX 549 ; N congruent ; B 11 0 537 475 ;
55 C 65 ; WX 722 ; N Alpha ; B 4 0 684 673 ;
56 C 66 ; WX 667 ; N Beta ; B 29 0 592 673 ;
57 C 67 ; WX 722 ; N Chi ; B -9 0 704 673 ;
58 C 68 ; WX 612 ; N Delta ; B 6 0 608 688 ;
59 C 69 ; WX 611 ; N Epsilon ; B 32 0 617 673 ;
60 C 70 ; WX 763 ; N Phi ; B 26 0 741 673 ;
61 C 71 ; WX 603 ; N Gamma ; B 24 0 609 673 ;
62 C 72 ; WX 722 ; N Eta ; B 39 0 729 673 ;
63 C 73 ; WX 333 ; N Iota ; B 32 0 316 673 ;
64 C 74 ; WX 631 ; N theta1 ; B 18 -18 623 689 ;
65 C 75 ; WX 722 ; N Kappa ; B 35 0 722 673 ;
66 C 76 ; WX 686 ; N Lambda ; B 6 0 680 688 ;
67 C 77 ; WX 889 ; N Mu ; B 28 0 887 673 ;
68 C 78 ; WX 722 ; N Nu ; B 29 -8 720 673 ;
69 C 79 ; WX 722 ; N Omicron ; B 41 -17 715 685 ;
70 C 80 ; WX 768 ; N Pi ; B 25 0 745 673 ;
71 C 81 ; WX 741 ; N Theta ; B 41 -17 715 685 ;
72 C 82 ; WX 556 ; N Rho ; B 28 0 563 673 ;
73 C 83 ; WX 592 ; N Sigma ; B 5 0 589 673 ;
74 C 84 ; WX 611 ; N Tau ; B 33 0 607 673 ;
75 C 85 ; WX 690 ; N Upsilon ; B -8 0 694 673 ;
76 C 86 ; WX 439 ; N sigma1 ; B 40 -233 436 500 ;
77 C 87 ; WX 768 ; N Omega ; B 34 0 736 688 ;
78 C 88 ; WX 645 ; N Xi ; B 40 0 599 673 ;
79 C 89 ; WX 795 ; N Psi ; B 15 0 781 684 ;
80 C 90 ; WX 611 ; N Zeta ; B 44 0 636 673 ;
81 C 91 ; WX 333 ; N bracketleft ; B 86 -155 299 674 ;
82 C 92 ; WX 863 ; N therefore ; B 163 0 701 487 ;
83 C 93 ; WX 333 ; N bracketright ; B 33 -155 246 674 ;
84 C 94 ; WX 658 ; N perpendicular ; B 15 0 652 674 ;
85 C 95 ; WX 500 ; N underscore ; B -2 -125 502 -75 ;
86 C 96 ; WX 500 ; N radicalex ; B 480 881 1090 917 ;
87 C 97 ; WX 631 ; N alpha ; B 41 -18 622 500 ;
88 C 98 ; WX 549 ; N beta ; B 61 -223 515 741 ;
89 C 99 ; WX 549 ; N chi ; B 12 -231 522 499 ;
90 C 100 ; WX 494 ; N delta ; B 40 -19 481 740 ;
91 C 101 ; WX 439 ; N epsilon ; B 22 -19 427 502 ;
92 C 102 ; WX 521 ; N phi ; B 28 -224 492 673 ;
93 C 103 ; WX 411 ; N gamma ; B 5 -225 484 499 ;
94 C 104 ; WX 603 ; N eta ; B 0 -202 527 514 ;
95 C 105 ; WX 329 ; N iota ; B 0 -17 301 503 ;
96 C 106 ; WX 603 ; N phi1 ; B 36 -224 587 499 ;
97 C 107 ; WX 549 ; N kappa ; B 33 0 558 501 ;
98 C 108 ; WX 549 ; N lambda ; B 24 -17 548 739 ;
99 C 109 ; WX 576 ; N mu ; B 33 -223 567 500 ;
100 C 110 ; WX 521 ; N nu ; B -9 -16 475 507 ;
101 C 111 ; WX 549 ; N omicron ; B 35 -19 501 499 ;
102 C 112 ; WX 549 ; N pi ; B 10 -19 530 487 ;
103 C 113 ; WX 521 ; N theta ; B 43 -17 485 690 ;
104 C 114 ; WX 549 ; N rho ; B 50 -230 490 499 ;
105 C 115 ; WX 603 ; N sigma ; B 30 -21 588 500 ;
106 C 116 ; WX 439 ; N tau ; B 10 -19 418 500 ;
107 C 117 ; WX 576 ; N upsilon ; B 7 -18 535 507 ;
108 C 118 ; WX 713 ; N omega1 ; B 12 -18 671 583 ;
109 C 119 ; WX 686 ; N omega ; B 42 -17 684 500 ;
110 C 120 ; WX 493 ; N xi ; B 27 -224 469 766 ;
111 C 121 ; WX 686 ; N psi ; B 12 -228 701 500 ;
112 C 122 ; WX 494 ; N zeta ; B 60 -225 467 756 ;
113 C 123 ; WX 480 ; N braceleft ; B 58 -183 397 673 ;
114 C 124 ; WX 200 ; N bar ; B 65 -293 135 707 ;
115 C 125 ; WX 480 ; N braceright ; B 79 -183 418 673 ;
116 C 126 ; WX 549 ; N similar ; B 17 203 529 307 ;
117 C 160 ; WX 750 ; N Euro ; B 20 -12 714 685 ;
118 C 161 ; WX 620 ; N Upsilon1 ; B -2 0 610 685 ;
119 C 162 ; WX 247 ; N minute ; B 27 459 228 735 ;
120 C 163 ; WX 549 ; N lessequal ; B 29 0 526 639 ;
121 C 164 ; WX 167 ; N fraction ; B -180 -12 340 677 ;
122 C 165 ; WX 713 ; N infinity ; B 26 124 688 404 ;
123 C 166 ; WX 500 ; N florin ; B 2 -193 494 686 ;
124 C 167 ; WX 753 ; N club ; B 86 -26 660 533 ;
125 C 168 ; WX 753 ; N diamond ; B 142 -36 600 550 ;
126 C 169 ; WX 753 ; N heart ; B 117 -33 631 532 ;
127 C 170 ; WX 753 ; N spade ; B 113 -36 629 548 ;
128 C 171 ; WX 1042 ; N arrowboth ; B 24 -15 1024 511 ;
129 C 172 ; WX 987 ; N arrowleft ; B 32 -15 942 511 ;
130 C 173 ; WX 603 ; N arrowup ; B 45 0 571 910 ;
131 C 174 ; WX 987 ; N arrowright ; B 49 -15 959 511 ;
132 C 175 ; WX 603 ; N arrowdown ; B 45 -22 571 888 ;
133 C 176 ; WX 400 ; N degree ; B 50 385 350 685 ;
134 C 177 ; WX 549 ; N plusminus ; B 10 0 539 645 ;
135 C 178 ; WX 411 ; N second ; B 20 459 413 737 ;
136 C 179 ; WX 549 ; N greaterequal ; B 29 0 526 639 ;
137 C 180 ; WX 549 ; N multiply ; B 17 8 533 524 ;
138 C 181 ; WX 713 ; N proportional ; B 27 123 639 404 ;
139 C 182 ; WX 494 ; N partialdiff ; B 26 -20 462 746 ;
140 C 183 ; WX 460 ; N bullet ; B 50 113 410 473 ;
141 C 184 ; WX 549 ; N divide ; B 10 71 536 456 ;
142 C 185 ; WX 549 ; N notequal ; B 15 -25 540 549 ;
143 C 186 ; WX 549 ; N equivalence ; B 14 82 538 443 ;
144 C 187 ; WX 549 ; N approxequal ; B 14 135 527 394 ;
145 C 188 ; WX 1000 ; N ellipsis ; B 111 -17 889 95 ;
146 C 189 ; WX 603 ; N arrowvertex ; B 280 -120 336 1010 ;
147 C 190 ; WX 1000 ; N arrowhorizex ; B -60 220 1050 276 ;
148 C 191 ; WX 658 ; N carriagereturn ; B 15 -16 602 629 ;
149 C 192 ; WX 823 ; N aleph ; B 175 -18 661 658 ;
150 C 193 ; WX 686 ; N Ifraktur ; B 10 -53 578 740 ;
151 C 194 ; WX 795 ; N Rfraktur ; B 26 -15 759 734 ;
152 C 195 ; WX 987 ; N weierstrass ; B 159 -211 870 573 ;
153 C 196 ; WX 768 ; N circlemultiply ; B 43 -17 733 673 ;
154 C 197 ; WX 768 ; N circleplus ; B 43 -15 733 675 ;
155 C 198 ; WX 823 ; N emptyset ; B 39 -24 781 719 ;
156 C 199 ; WX 768 ; N intersection ; B 40 0 732 509 ;
157 C 200 ; WX 768 ; N union ; B 40 -17 732 492 ;
158 C 201 ; WX 713 ; N propersuperset ; B 20 0 673 470 ;
159 C 202 ; WX 713 ; N reflexsuperset ; B 20 -125 673 470 ;
160 C 203 ; WX 713 ; N notsubset ; B 36 -70 690 540 ;
161 C 204 ; WX 713 ; N propersubset ; B 37 0 690 470 ;
162 C 205 ; WX 713 ; N reflexsubset ; B 37 -125 690 470 ;
163 C 206 ; WX 713 ; N element ; B 45 0 505 468 ;
164 C 207 ; WX 713 ; N notelement ; B 45 -58 505 555 ;
165 C 208 ; WX 768 ; N angle ; B 26 0 738 673 ;
166 C 209 ; WX 713 ; N gradient ; B 36 -19 681 718 ;
167 C 210 ; WX 790 ; N registerserif ; B 50 -17 740 673 ;
168 C 211 ; WX 790 ; N copyrightserif ; B 51 -15 741 675 ;
169 C 212 ; WX 890 ; N trademarkserif ; B 18 293 855 673 ;
170 C 213 ; WX 823 ; N product ; B 25 -101 803 751 ;
171 C 214 ; WX 549 ; N radical ; B 10 -38 515 917 ;
172 C 215 ; WX 250 ; N dotmath ; B 69 210 169 310 ;
173 C 216 ; WX 713 ; N logicalnot ; B 15 0 680 288 ;
174 C 217 ; WX 603 ; N logicaland ; B 23 0 583 454 ;
175 C 218 ; WX 603 ; N logicalor ; B 30 0 578 477 ;
176 C 219 ; WX 1042 ; N arrowdblboth ; B 27 -20 1023 510 ;
177 C 220 ; WX 987 ; N arrowdblleft ; B 30 -15 939 513 ;
178 C 221 ; WX 603 ; N arrowdblup ; B 39 2 567 911 ;
179 C 222 ; WX 987 ; N arrowdblright ; B 45 -20 954 508 ;
180 C 223 ; WX 603 ; N arrowdbldown ; B 44 -19 572 890 ;
181 C 224 ; WX 494 ; N lozenge ; B 18 0 466 745 ;
182 C 225 ; WX 329 ; N angleleft ; B 25 -198 306 746 ;
183 C 226 ; WX 790 ; N registersans ; B 50 -20 740 670 ;
184 C 227 ; WX 790 ; N copyrightsans ; B 49 -15 739 675 ;
185 C 228 ; WX 786 ; N trademarksans ; B 5 293 725 673 ;
186 C 229 ; WX 713 ; N summation ; B 14 -108 695 752 ;
187 C 230 ; WX 384 ; N parenlefttp ; B 24 -293 436 926 ;
188 C 231 ; WX 384 ; N parenleftex ; B 24 -85 108 925 ;
189 C 232 ; WX 384 ; N parenleftbt ; B 24 -293 436 926 ;
190 C 233 ; WX 384 ; N bracketlefttp ; B 0 -80 349 926 ;
191 C 234 ; WX 384 ; N bracketleftex ; B 0 -79 77 925 ;
192 C 235 ; WX 384 ; N bracketleftbt ; B 0 -80 349 926 ;
193 C 236 ; WX 494 ; N bracelefttp ; B 209 -85 445 925 ;
194 C 237 ; WX 494 ; N braceleftmid ; B 20 -85 284 935 ;
195 C 238 ; WX 494 ; N braceleftbt ; B 209 -75 445 935 ;
196 C 239 ; WX 494 ; N braceex ; B 209 -85 284 935 ;
197 C 241 ; WX 329 ; N angleright ; B 21 -198 302 746 ;
198 C 242 ; WX 274 ; N integral ; B 2 -107 291 916 ;
199 C 243 ; WX 686 ; N integraltp ; B 308 -88 675 920 ;
200 C 244 ; WX 686 ; N integralex ; B 308 -88 378 975 ;
201 C 245 ; WX 686 ; N integralbt ; B 11 -87 378 921 ;
202 C 246 ; WX 384 ; N parenrighttp ; B 54 -293 466 926 ;
203 C 247 ; WX 384 ; N parenrightex ; B 382 -85 466 925 ;
204 C 248 ; WX 384 ; N parenrightbt ; B 54 -293 466 926 ;
205 C 249 ; WX 384 ; N bracketrighttp ; B 22 -80 371 926 ;
206 C 250 ; WX 384 ; N bracketrightex ; B 294 -79 371 925 ;
207 C 251 ; WX 384 ; N bracketrightbt ; B 22 -80 371 926 ;
208 C 252 ; WX 494 ; N bracerighttp ; B 48 -85 284 925 ;
209 C 253 ; WX 494 ; N bracerightmid ; B 209 -85 473 935 ;
210 C 254 ; WX 494 ; N bracerightbt ; B 48 -75 284 935 ;
211 C -1 ; WX 790 ; N apple ; B 56 -3 733 808 ;
212 EndCharMetrics
213 EndFontMetrics
1 StartFontMetrics 4.1
2 Comment Copyright (c) 1985, 1987, 1988, 1989, 1997 Adobe Systems Incorporated. All Rights Reserved.
3 Comment Creation Date: Thu May 1 15:14:13 1997
4 Comment UniqueID 43082
5 Comment VMusage 45775 55535
6 FontName ZapfDingbats
7 FullName ITC Zapf Dingbats
8 FamilyName ZapfDingbats
9 Weight Medium
10 ItalicAngle 0
11 IsFixedPitch false
12 CharacterSet Special
13 FontBBox -1 -143 981 820
14 UnderlinePosition -100
15 UnderlineThickness 50
16 Version 002.000
17 Notice Copyright (c) 1985, 1987, 1988, 1989, 1997 Adobe Systems Incorporated. All Rights Reserved.ITC Zapf Dingbats is a registered trademark of International Typeface Corporation.
18 EncodingScheme FontSpecific
19 StdHW 28
20 StdVW 90
21 StartCharMetrics 202
22 C 32 ; WX 278 ; N space ; B 0 0 0 0 ;
23 C 33 ; WX 974 ; N a1 ; B 35 72 939 621 ;
24 C 34 ; WX 961 ; N a2 ; B 35 81 927 611 ;
25 C 35 ; WX 974 ; N a202 ; B 35 72 939 621 ;
26 C 36 ; WX 980 ; N a3 ; B 35 0 945 692 ;
27 C 37 ; WX 719 ; N a4 ; B 34 139 685 566 ;
28 C 38 ; WX 789 ; N a5 ; B 35 -14 755 705 ;
29 C 39 ; WX 790 ; N a119 ; B 35 -14 755 705 ;
30 C 40 ; WX 791 ; N a118 ; B 35 -13 761 705 ;
31 C 41 ; WX 690 ; N a117 ; B 34 138 655 553 ;
32 C 42 ; WX 960 ; N a11 ; B 35 123 925 568 ;
33 C 43 ; WX 939 ; N a12 ; B 35 134 904 559 ;
34 C 44 ; WX 549 ; N a13 ; B 29 -11 516 705 ;
35 C 45 ; WX 855 ; N a14 ; B 34 59 820 632 ;
36 C 46 ; WX 911 ; N a15 ; B 35 50 876 642 ;
37 C 47 ; WX 933 ; N a16 ; B 35 139 899 550 ;
38 C 48 ; WX 911 ; N a105 ; B 35 50 876 642 ;
39 C 49 ; WX 945 ; N a17 ; B 35 139 909 553 ;
40 C 50 ; WX 974 ; N a18 ; B 35 104 938 587 ;
41 C 51 ; WX 755 ; N a19 ; B 34 -13 721 705 ;
42 C 52 ; WX 846 ; N a20 ; B 36 -14 811 705 ;
43 C 53 ; WX 762 ; N a21 ; B 35 0 727 692 ;
44 C 54 ; WX 761 ; N a22 ; B 35 0 727 692 ;
45 C 55 ; WX 571 ; N a23 ; B -1 -68 571 661 ;
46 C 56 ; WX 677 ; N a24 ; B 36 -13 642 705 ;
47 C 57 ; WX 763 ; N a25 ; B 35 0 728 692 ;
48 C 58 ; WX 760 ; N a26 ; B 35 0 726 692 ;
49 C 59 ; WX 759 ; N a27 ; B 35 0 725 692 ;
50 C 60 ; WX 754 ; N a28 ; B 35 0 720 692 ;
51 C 61 ; WX 494 ; N a6 ; B 35 0 460 692 ;
52 C 62 ; WX 552 ; N a7 ; B 35 0 517 692 ;
53 C 63 ; WX 537 ; N a8 ; B 35 0 503 692 ;
54 C 64 ; WX 577 ; N a9 ; B 35 96 542 596 ;
55 C 65 ; WX 692 ; N a10 ; B 35 -14 657 705 ;
56 C 66 ; WX 786 ; N a29 ; B 35 -14 751 705 ;
57 C 67 ; WX 788 ; N a30 ; B 35 -14 752 705 ;
58 C 68 ; WX 788 ; N a31 ; B 35 -14 753 705 ;
59 C 69 ; WX 790 ; N a32 ; B 35 -14 756 705 ;
60 C 70 ; WX 793 ; N a33 ; B 35 -13 759 705 ;
61 C 71 ; WX 794 ; N a34 ; B 35 -13 759 705 ;
62 C 72 ; WX 816 ; N a35 ; B 35 -14 782 705 ;
63 C 73 ; WX 823 ; N a36 ; B 35 -14 787 705 ;
64 C 74 ; WX 789 ; N a37 ; B 35 -14 754 705 ;
65 C 75 ; WX 841 ; N a38 ; B 35 -14 807 705 ;
66 C 76 ; WX 823 ; N a39 ; B 35 -14 789 705 ;
67 C 77 ; WX 833 ; N a40 ; B 35 -14 798 705 ;
68 C 78 ; WX 816 ; N a41 ; B 35 -13 782 705 ;
69 C 79 ; WX 831 ; N a42 ; B 35 -14 796 705 ;
70 C 80 ; WX 923 ; N a43 ; B 35 -14 888 705 ;
71 C 81 ; WX 744 ; N a44 ; B 35 0 710 692 ;
72 C 82 ; WX 723 ; N a45 ; B 35 0 688 692 ;
73 C 83 ; WX 749 ; N a46 ; B 35 0 714 692 ;
74 C 84 ; WX 790 ; N a47 ; B 34 -14 756 705 ;
75 C 85 ; WX 792 ; N a48 ; B 35 -14 758 705 ;
76 C 86 ; WX 695 ; N a49 ; B 35 -14 661 706 ;
77 C 87 ; WX 776 ; N a50 ; B 35 -6 741 699 ;
78 C 88 ; WX 768 ; N a51 ; B 35 -7 734 699 ;
79 C 89 ; WX 792 ; N a52 ; B 35 -14 757 705 ;
80 C 90 ; WX 759 ; N a53 ; B 35 0 725 692 ;
81 C 91 ; WX 707 ; N a54 ; B 35 -13 672 704 ;
82 C 92 ; WX 708 ; N a55 ; B 35 -14 672 705 ;
83 C 93 ; WX 682 ; N a56 ; B 35 -14 647 705 ;
84 C 94 ; WX 701 ; N a57 ; B 35 -14 666 705 ;
85 C 95 ; WX 826 ; N a58 ; B 35 -14 791 705 ;
86 C 96 ; WX 815 ; N a59 ; B 35 -14 780 705 ;
87 C 97 ; WX 789 ; N a60 ; B 35 -14 754 705 ;
88 C 98 ; WX 789 ; N a61 ; B 35 -14 754 705 ;
89 C 99 ; WX 707 ; N a62 ; B 34 -14 673 705 ;
90 C 100 ; WX 687 ; N a63 ; B 36 0 651 692 ;
91 C 101 ; WX 696 ; N a64 ; B 35 0 661 691 ;
92 C 102 ; WX 689 ; N a65 ; B 35 0 655 692 ;
93 C 103 ; WX 786 ; N a66 ; B 34 -14 751 705 ;
94 C 104 ; WX 787 ; N a67 ; B 35 -14 752 705 ;
95 C 105 ; WX 713 ; N a68 ; B 35 -14 678 705 ;
96 C 106 ; WX 791 ; N a69 ; B 35 -14 756 705 ;
97 C 107 ; WX 785 ; N a70 ; B 36 -14 751 705 ;
98 C 108 ; WX 791 ; N a71 ; B 35 -14 757 705 ;
99 C 109 ; WX 873 ; N a72 ; B 35 -14 838 705 ;
100 C 110 ; WX 761 ; N a73 ; B 35 0 726 692 ;
101 C 111 ; WX 762 ; N a74 ; B 35 0 727 692 ;
102 C 112 ; WX 762 ; N a203 ; B 35 0 727 692 ;
103 C 113 ; WX 759 ; N a75 ; B 35 0 725 692 ;
104 C 114 ; WX 759 ; N a204 ; B 35 0 725 692 ;
105 C 115 ; WX 892 ; N a76 ; B 35 0 858 705 ;
106 C 116 ; WX 892 ; N a77 ; B 35 -14 858 692 ;
107 C 117 ; WX 788 ; N a78 ; B 35 -14 754 705 ;
108 C 118 ; WX 784 ; N a79 ; B 35 -14 749 705 ;
109 C 119 ; WX 438 ; N a81 ; B 35 -14 403 705 ;
110 C 120 ; WX 138 ; N a82 ; B 35 0 104 692 ;
111 C 121 ; WX 277 ; N a83 ; B 35 0 242 692 ;
112 C 122 ; WX 415 ; N a84 ; B 35 0 380 692 ;
113 C 123 ; WX 392 ; N a97 ; B 35 263 357 705 ;
114 C 124 ; WX 392 ; N a98 ; B 34 263 357 705 ;
115 C 125 ; WX 668 ; N a99 ; B 35 263 633 705 ;
116 C 126 ; WX 668 ; N a100 ; B 36 263 634 705 ;
117 C 128 ; WX 390 ; N a89 ; B 35 -14 356 705 ;
118 C 129 ; WX 390 ; N a90 ; B 35 -14 355 705 ;
119 C 130 ; WX 317 ; N a93 ; B 35 0 283 692 ;
120 C 131 ; WX 317 ; N a94 ; B 35 0 283 692 ;
121 C 132 ; WX 276 ; N a91 ; B 35 0 242 692 ;
122 C 133 ; WX 276 ; N a92 ; B 35 0 242 692 ;
123 C 134 ; WX 509 ; N a205 ; B 35 0 475 692 ;
124 C 135 ; WX 509 ; N a85 ; B 35 0 475 692 ;
125 C 136 ; WX 410 ; N a206 ; B 35 0 375 692 ;
126 C 137 ; WX 410 ; N a86 ; B 35 0 375 692 ;
127 C 138 ; WX 234 ; N a87 ; B 35 -14 199 705 ;
128 C 139 ; WX 234 ; N a88 ; B 35 -14 199 705 ;
129 C 140 ; WX 334 ; N a95 ; B 35 0 299 692 ;
130 C 141 ; WX 334 ; N a96 ; B 35 0 299 692 ;
131 C 161 ; WX 732 ; N a101 ; B 35 -143 697 806 ;
132 C 162 ; WX 544 ; N a102 ; B 56 -14 488 706 ;
133 C 163 ; WX 544 ; N a103 ; B 34 -14 508 705 ;
134 C 164 ; WX 910 ; N a104 ; B 35 40 875 651 ;
135 C 165 ; WX 667 ; N a106 ; B 35 -14 633 705 ;
136 C 166 ; WX 760 ; N a107 ; B 35 -14 726 705 ;
137 C 167 ; WX 760 ; N a108 ; B 0 121 758 569 ;
138 C 168 ; WX 776 ; N a112 ; B 35 0 741 705 ;
139 C 169 ; WX 595 ; N a111 ; B 34 -14 560 705 ;
140 C 170 ; WX 694 ; N a110 ; B 35 -14 659 705 ;
141 C 171 ; WX 626 ; N a109 ; B 34 0 591 705 ;
142 C 172 ; WX 788 ; N a120 ; B 35 -14 754 705 ;
143 C 173 ; WX 788 ; N a121 ; B 35 -14 754 705 ;
144 C 174 ; WX 788 ; N a122 ; B 35 -14 754 705 ;
145 C 175 ; WX 788 ; N a123 ; B 35 -14 754 705 ;
146 C 176 ; WX 788 ; N a124 ; B 35 -14 754 705 ;
147 C 177 ; WX 788 ; N a125 ; B 35 -14 754 705 ;
148 C 178 ; WX 788 ; N a126 ; B 35 -14 754 705 ;
149 C 179 ; WX 788 ; N a127 ; B 35 -14 754 705 ;
150 C 180 ; WX 788 ; N a128 ; B 35 -14 754 705 ;
151 C 181 ; WX 788 ; N a129 ; B 35 -14 754 705 ;
152 C 182 ; WX 788 ; N a130 ; B 35 -14 754 705 ;
153 C 183 ; WX 788 ; N a131 ; B 35 -14 754 705 ;
154 C 184 ; WX 788 ; N a132 ; B 35 -14 754 705 ;
155 C 185 ; WX 788 ; N a133 ; B 35 -14 754 705 ;
156 C 186 ; WX 788 ; N a134 ; B 35 -14 754 705 ;
157 C 187 ; WX 788 ; N a135 ; B 35 -14 754 705 ;
158 C 188 ; WX 788 ; N a136 ; B 35 -14 754 705 ;
159 C 189 ; WX 788 ; N a137 ; B 35 -14 754 705 ;
160 C 190 ; WX 788 ; N a138 ; B 35 -14 754 705 ;
161 C 191 ; WX 788 ; N a139 ; B 35 -14 754 705 ;
162 C 192 ; WX 788 ; N a140 ; B 35 -14 754 705 ;
163 C 193 ; WX 788 ; N a141 ; B 35 -14 754 705 ;
164 C 194 ; WX 788 ; N a142 ; B 35 -14 754 705 ;
165 C 195 ; WX 788 ; N a143 ; B 35 -14 754 705 ;
166 C 196 ; WX 788 ; N a144 ; B 35 -14 754 705 ;
167 C 197 ; WX 788 ; N a145 ; B 35 -14 754 705 ;
168 C 198 ; WX 788 ; N a146 ; B 35 -14 754 705 ;
169 C 199 ; WX 788 ; N a147 ; B 35 -14 754 705 ;
170 C 200 ; WX 788 ; N a148 ; B 35 -14 754 705 ;
171 C 201 ; WX 788 ; N a149 ; B 35 -14 754 705 ;
172 C 202 ; WX 788 ; N a150 ; B 35 -14 754 705 ;
173 C 203 ; WX 788 ; N a151 ; B 35 -14 754 705 ;
174 C 204 ; WX 788 ; N a152 ; B 35 -14 754 705 ;
175 C 205 ; WX 788 ; N a153 ; B 35 -14 754 705 ;
176 C 206 ; WX 788 ; N a154 ; B 35 -14 754 705 ;
177 C 207 ; WX 788 ; N a155 ; B 35 -14 754 705 ;
178 C 208 ; WX 788 ; N a156 ; B 35 -14 754 705 ;
179 C 209 ; WX 788 ; N a157 ; B 35 -14 754 705 ;
180 C 210 ; WX 788 ; N a158 ; B 35 -14 754 705 ;
181 C 211 ; WX 788 ; N a159 ; B 35 -14 754 705 ;
182 C 212 ; WX 894 ; N a160 ; B 35 58 860 634 ;
183 C 213 ; WX 838 ; N a161 ; B 35 152 803 540 ;
184 C 214 ; WX 1016 ; N a163 ; B 34 152 981 540 ;
185 C 215 ; WX 458 ; N a164 ; B 35 -127 422 820 ;
186 C 216 ; WX 748 ; N a196 ; B 35 94 698 597 ;
187 C 217 ; WX 924 ; N a165 ; B 35 140 890 552 ;
188 C 218 ; WX 748 ; N a192 ; B 35 94 698 597 ;
189 C 219 ; WX 918 ; N a166 ; B 35 166 884 526 ;
190 C 220 ; WX 927 ; N a167 ; B 35 32 892 660 ;
191 C 221 ; WX 928 ; N a168 ; B 35 129 891 562 ;
192 C 222 ; WX 928 ; N a169 ; B 35 128 893 563 ;
193 C 223 ; WX 834 ; N a170 ; B 35 155 799 537 ;
194 C 224 ; WX 873 ; N a171 ; B 35 93 838 599 ;
195 C 225 ; WX 828 ; N a172 ; B 35 104 791 588 ;
196 C 226 ; WX 924 ; N a173 ; B 35 98 889 594 ;
197 C 227 ; WX 924 ; N a162 ; B 35 98 889 594 ;
198 C 228 ; WX 917 ; N a174 ; B 35 0 882 692 ;
199 C 229 ; WX 930 ; N a175 ; B 35 84 896 608 ;
200 C 230 ; WX 931 ; N a176 ; B 35 84 896 608 ;
201 C 231 ; WX 463 ; N a177 ; B 35 -99 429 791 ;
202 C 232 ; WX 883 ; N a178 ; B 35 71 848 623 ;
203 C 233 ; WX 836 ; N a179 ; B 35 44 802 648 ;
204 C 234 ; WX 836 ; N a193 ; B 35 44 802 648 ;
205 C 235 ; WX 867 ; N a180 ; B 35 101 832 591 ;
206 C 236 ; WX 867 ; N a199 ; B 35 101 832 591 ;
207 C 237 ; WX 696 ; N a181 ; B 35 44 661 648 ;
208 C 238 ; WX 696 ; N a200 ; B 35 44 661 648 ;
209 C 239 ; WX 874 ; N a182 ; B 35 77 840 619 ;
210 C 241 ; WX 874 ; N a201 ; B 35 73 840 615 ;
211 C 242 ; WX 760 ; N a183 ; B 35 0 725 692 ;
212 C 243 ; WX 946 ; N a184 ; B 35 160 911 533 ;
213 C 244 ; WX 771 ; N a197 ; B 34 37 736 655 ;
214 C 245 ; WX 865 ; N a185 ; B 35 207 830 481 ;
215 C 246 ; WX 771 ; N a194 ; B 34 37 736 655 ;
216 C 247 ; WX 888 ; N a198 ; B 34 -19 853 712 ;
217 C 248 ; WX 967 ; N a186 ; B 35 124 932 568 ;
218 C 249 ; WX 888 ; N a195 ; B 34 -19 853 712 ;
219 C 250 ; WX 831 ; N a187 ; B 35 113 796 579 ;
220 C 251 ; WX 873 ; N a188 ; B 36 118 838 578 ;
221 C 252 ; WX 927 ; N a189 ; B 35 150 891 542 ;
222 C 253 ; WX 970 ; N a190 ; B 35 76 931 616 ;
223 C 254 ; WX 918 ; N a191 ; B 34 99 884 593 ;
224 EndCharMetrics
225 EndFontMetrics
1 <?php
2 $distFontDir = $rootDir . '/lib/fonts';
3 return [
4 'sans-serif' =>
5 [
6 'normal' => $distFontDir . '/Helvetica',
7 'bold' => $distFontDir . '/Helvetica-Bold',
8 'italic' => $distFontDir . '/Helvetica-Oblique',
9 'bold_italic' => $distFontDir . '/Helvetica-BoldOblique'
10 ],
11 'times' =>
12 [
13 'normal' => $distFontDir . '/Times-Roman',
14 'bold' => $distFontDir . '/Times-Bold',
15 'italic' => $distFontDir . '/Times-Italic',
16 'bold_italic' => $distFontDir . '/Times-BoldItalic'
17 ],
18 'times-roman' =>
19 [
20 'normal' => $distFontDir . '/Times-Roman',
21 'bold' => $distFontDir . '/Times-Bold',
22 'italic' => $distFontDir . '/Times-Italic',
23 'bold_italic' => $distFontDir . '/Times-BoldItalic'
24 ],
25 'courier' =>
26 [
27 'normal' => $distFontDir . '/Courier',
28 'bold' => $distFontDir . '/Courier-Bold',
29 'italic' => $distFontDir . '/Courier-Oblique',
30 'bold_italic' => $distFontDir . '/Courier-BoldOblique'
31 ],
32 'helvetica' =>
33 [
34 'normal' => $distFontDir . '/Helvetica',
35 'bold' => $distFontDir . '/Helvetica-Bold',
36 'italic' => $distFontDir . '/Helvetica-Oblique',
37 'bold_italic' => $distFontDir . '/Helvetica-BoldOblique'
38 ],
39 'zapfdingbats' =>
40 [
41 'normal' => $distFontDir . '/ZapfDingbats',
42 'bold' => $distFontDir . '/ZapfDingbats',
43 'italic' => $distFontDir . '/ZapfDingbats',
44 'bold_italic' => $distFontDir . '/ZapfDingbats'
45 ],
46 'symbol' =>
47 [
48 'normal' => $distFontDir . '/Symbol',
49 'bold' => $distFontDir . '/Symbol',
50 'italic' => $distFontDir . '/Symbol',
51 'bold_italic' => $distFontDir . '/Symbol'
52 ],
53 'serif' =>
54 [
55 'normal' => $distFontDir . '/Times-Roman',
56 'bold' => $distFontDir . '/Times-Bold',
57 'italic' => $distFontDir . '/Times-Italic',
58 'bold_italic' => $distFontDir . '/Times-BoldItalic'
59 ],
60 'monospace' =>
61 [
62 'normal' => $distFontDir . '/Courier',
63 'bold' => $distFontDir . '/Courier-Bold',
64 'italic' => $distFontDir . '/Courier-Oblique',
65 'bold_italic' => $distFontDir . '/Courier-BoldOblique'
66 ],
67 'fixed' =>
68 [
69 'normal' => $distFontDir . '/Courier',
70 'bold' => $distFontDir . '/Courier-Bold',
71 'italic' => $distFontDir . '/Courier-Oblique',
72 'bold_italic' => $distFontDir . '/Courier-BoldOblique'
73 ],
74 'dejavu sans' =>
75 [
76 'bold' => $distFontDir . '/DejaVuSans-Bold',
77 'bold_italic' => $distFontDir . '/DejaVuSans-BoldOblique',
78 'italic' => $distFontDir . '/DejaVuSans-Oblique',
79 'normal' => $distFontDir . '/DejaVuSans'
80 ],
81 'dejavu sans mono' =>
82 [
83 'bold' => $distFontDir . '/DejaVuSansMono-Bold',
84 'bold_italic' => $distFontDir . '/DejaVuSansMono-BoldOblique',
85 'italic' => $distFontDir . '/DejaVuSansMono-Oblique',
86 'normal' => $distFontDir . '/DejaVuSansMono'
87 ],
88 'dejavu serif' =>
89 [
90 'bold' => $distFontDir . '/DejaVuSerif-Bold',
91 'bold_italic' => $distFontDir . '/DejaVuSerif-BoldItalic',
92 'italic' => $distFontDir . '/DejaVuSerif-Italic',
93 'normal' => $distFontDir . '/DejaVuSerif'
94 ]
95 ];
...\ No newline at end of file ...\ No newline at end of file
1 <html>
2 <head>
3 <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
4 <meta name="generator" content="Adobe GoLive 4">
5 <title>Core 14 AFM Files - ReadMe</title>
6 </head>
7 <body bgcolor="white">
8 <font color="white">or</font>
9 <table border="0" cellpadding="0" cellspacing="2">
10 <tr>
11 <td width="40"></td>
12 <td width="300">This file and the 14 PostScript(R) AFM files it accompanies may be used, copied, and distributed for any purpose and without charge, with or without modification, provided that all copyright notices are retained; that the AFM files are not distributed without this file; that all modifications to this file or any of the AFM files are prominently noted in the modified file(s); and that this paragraph is not modified. Adobe Systems has no responsibility or obligation to support the use of the AFM files. <font color="white">Col</font></td>
13 </tr>
14 </table>
15 <p>Source <a href="http://www.adobe.com/devnet/font/#pcfi">http://www.adobe.com/devnet/font/#pcfi</a></p>
16 </body>
17 </html>
...\ No newline at end of file ...\ No newline at end of file
1 <?php
2
3 // warning: this file is encoded in UTF-8!
4
5 class HTML5_Data
6 {
7
8 // at some point this should be moved to a .ser file. Another
9 // possible optimization is to give UTF-8 bytes, not Unicode
10 // codepoints
11 // XXX: Not quite sure why it's named this; this is
12 // actually the numeric entity dereference table.
13 protected static $realCodepointTable = [
14 0x00 => 0xFFFD, // REPLACEMENT CHARACTER
15 0x0D => 0x000A, // LINE FEED (LF)
16 0x80 => 0x20AC, // EURO SIGN ('€')
17 0x81 => 0x0081, // <control>
18 0x82 => 0x201A, // SINGLE LOW-9 QUOTATION MARK ('‚')
19 0x83 => 0x0192, // LATIN SMALL LETTER F WITH HOOK ('ƒ')
20 0x84 => 0x201E, // DOUBLE LOW-9 QUOTATION MARK ('„')
21 0x85 => 0x2026, // HORIZONTAL ELLIPSIS ('…')
22 0x86 => 0x2020, // DAGGER ('†')
23 0x87 => 0x2021, // DOUBLE DAGGER ('‡')
24 0x88 => 0x02C6, // MODIFIER LETTER CIRCUMFLEX ACCENT ('ˆ')
25 0x89 => 0x2030, // PER MILLE SIGN ('‰')
26 0x8A => 0x0160, // LATIN CAPITAL LETTER S WITH CARON ('Š')
27 0x8B => 0x2039, // SINGLE LEFT-POINTING ANGLE QUOTATION MARK ('‹')
28 0x8C => 0x0152, // LATIN CAPITAL LIGATURE OE ('Œ')
29 0x8D => 0x008D, // <control>
30 0x8E => 0x017D, // LATIN CAPITAL LETTER Z WITH CARON ('Ž')
31 0x8F => 0x008F, // <control>
32 0x90 => 0x0090, // <control>
33 0x91 => 0x2018, // LEFT SINGLE QUOTATION MARK ('‘')
34 0x92 => 0x2019, // RIGHT SINGLE QUOTATION MARK ('’')
35 0x93 => 0x201C, // LEFT DOUBLE QUOTATION MARK ('“')
36 0x94 => 0x201D, // RIGHT DOUBLE QUOTATION MARK ('”')
37 0x95 => 0x2022, // BULLET ('•')
38 0x96 => 0x2013, // EN DASH ('–')
39 0x97 => 0x2014, // EM DASH ('—')
40 0x98 => 0x02DC, // SMALL TILDE ('˜')
41 0x99 => 0x2122, // TRADE MARK SIGN ('™')
42 0x9A => 0x0161, // LATIN SMALL LETTER S WITH CARON ('š')
43 0x9B => 0x203A, // SINGLE RIGHT-POINTING ANGLE QUOTATION MARK ('›')
44 0x9C => 0x0153, // LATIN SMALL LIGATURE OE ('œ')
45 0x9D => 0x009D, // <control>
46 0x9E => 0x017E, // LATIN SMALL LETTER Z WITH CARON ('ž')
47 0x9F => 0x0178, // LATIN CAPITAL LETTER Y WITH DIAERESIS ('Ÿ')
48 ];
49
50 protected static $namedCharacterReferences;
51
52 protected static $namedCharacterReferenceMaxLength;
53
54 /**
55 * Returns the "real" Unicode codepoint of a malformed character
56 * reference.
57 */
58 public static function getRealCodepoint($ref) {
59 if (!isset(self::$realCodepointTable[$ref])) {
60 return false;
61 } else {
62 return self::$realCodepointTable[$ref];
63 }
64 }
65
66 public static function getNamedCharacterReferences() {
67 if (!self::$namedCharacterReferences) {
68 self::$namedCharacterReferences = unserialize(
69 file_get_contents(dirname(__FILE__) . '/named-character-references.ser'));
70 }
71 return self::$namedCharacterReferences;
72 }
73
74 /**
75 * Converts a Unicode codepoint to sequence of UTF-8 bytes.
76 * @note Shamelessly stolen from HTML Purifier, which is also
77 * shamelessly stolen from Feyd (which is in public domain).
78 */
79 public static function utf8chr($code) {
80 /* We don't care: we live dangerously
81 * if($code > 0x10FFFF or $code < 0x0 or
82 ($code >= 0xD800 and $code <= 0xDFFF) ) {
83 // bits are set outside the "valid" range as defined
84 // by UNICODE 4.1.0
85 return "\xEF\xBF\xBD";
86 }*/
87
88 $y = $z = $w = 0;
89 if ($code < 0x80) {
90 // regular ASCII character
91 $x = $code;
92 } else {
93 // set up bits for UTF-8
94 $x = ($code & 0x3F) | 0x80;
95 if ($code < 0x800) {
96 $y = (($code & 0x7FF) >> 6) | 0xC0;
97 } else {
98 $y = (($code & 0xFC0) >> 6) | 0x80;
99 if ($code < 0x10000) {
100 $z = (($code >> 12) & 0x0F) | 0xE0;
101 } else {
102 $z = (($code >> 12) & 0x3F) | 0x80;
103 $w = (($code >> 18) & 0x07) | 0xF0;
104 }
105 }
106 }
107 // set up the actual character
108 $ret = '';
109 if ($w) {
110 $ret .= chr($w);
111 }
112 if ($z) {
113 $ret .= chr($z);
114 }
115 if ($y) {
116 $ret .= chr($y);
117 }
118 $ret .= chr($x);
119
120 return $ret;
121 }
122
123 }
1 <?php
2
3 require_once dirname(__FILE__) . '/Data.php';
4 require_once dirname(__FILE__) . '/InputStream.php';
5 require_once dirname(__FILE__) . '/TreeBuilder.php';
6 require_once dirname(__FILE__) . '/Tokenizer.php';
7
8 /**
9 * Outwards facing interface for HTML5.
10 */
11 class HTML5_Parser
12 {
13 /**
14 * Parses a full HTML document.
15 * @param $text | HTML text to parse
16 * @param $builder | Custom builder implementation
17 * @return DOMDocument|DOMNodeList Parsed HTML as DOMDocument
18 */
19 public static function parse($text, $builder = null) {
20 $tokenizer = new HTML5_Tokenizer($text, $builder);
21 $tokenizer->parse();
22 return $tokenizer->save();
23 }
24
25 /**
26 * Parses an HTML fragment.
27 * @param $text | HTML text to parse
28 * @param $context String name of context element to pretend parsing is in.
29 * @param $builder | Custom builder implementation
30 * @return DOMDocument|DOMNodeList Parsed HTML as DOMDocument
31 */
32 public static function parseFragment($text, $context = null, $builder = null) {
33 $tokenizer = new HTML5_Tokenizer($text, $builder);
34 $tokenizer->parseFragment($context);
35 return $tokenizer->save();
36 }
37 }
1 <?xml version="1.0"?>
2 <svg width="64" height="64" xmlns="http://www.w3.org/2000/svg">
3 <g>
4 <rect stroke="#666666" id="svg_1" height="60.499994" width="60.166667" y="1.666669" x="1.999998" stroke-width="1.5" fill="none"/>
5 <line stroke-linecap="butt" stroke-linejoin="miter" id="svg_3" y2="59.333253" x2="59.749916" y1="4.333415" x1="4.250079" stroke-width="1.5" stroke="#999999" fill="none"/>
6 <line stroke-linecap="butt" stroke-linejoin="miter" id="svg_4" y2="59.999665" x2="4.062838" y1="3.750342" x1="60.062164" stroke-width="1.5" stroke="#999999" fill="none"/>
7 </g>
8 </svg>
...\ No newline at end of file ...\ No newline at end of file
1 /**
2 * dompdf default stylesheet.
3 *
4 * @package dompdf
5 * @link http://dompdf.github.com/
6 * @author Benj Carson <benjcarson@digitaljunkies.ca>
7 * @author Blake Ross <BlakeR1234@aol.com>
8 * @author Fabien Ménager <fabien.menager@gmail.com>
9 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
10 *
11 * Portions from Mozilla
12 * @link https://dxr.mozilla.org/mozilla-central/source/layout/style/res/html.css
13 * @license http://mozilla.org/MPL/2.0/ Mozilla Public License, v. 2.0
14 *
15 * Portions from W3C
16 * @link https://drafts.csswg.org/css-ui-3/#default-style-sheet
17 *
18 */
19
20 @page {
21 margin: 1.2cm;
22 }
23
24 html {
25 display: -dompdf-page !important;
26 counter-reset: page;
27 }
28
29 /* blocks */
30
31 article,
32 aside,
33 details,
34 div,
35 dt,
36 figcaption,
37 footer,
38 form,
39 header,
40 hgroup,
41 main,
42 nav,
43 noscript,
44 section,
45 summary {
46 display: block;
47 }
48
49 body {
50 page-break-before: avoid;
51 display: block !important;
52 counter-increment: page;
53 }
54
55 p, dl, multicol {
56 display: block;
57 margin: 1em 0;
58 }
59
60 dd {
61 display: block;
62 margin-left: 40px;
63 }
64
65 blockquote, figure {
66 display: block;
67 margin: 1em 40px;
68 }
69
70 address {
71 display: block;
72 font-style: italic;
73 }
74
75 center {
76 display: block;
77 text-align: center;
78 }
79
80 blockquote[type=cite] {
81 display: block;
82 margin: 1em 0;
83 padding-left: 1em;
84 border-left: solid;
85 border-color: blue;
86 border-width: thin;
87 }
88
89 h1, h2, h3, h4, h5, h6 {
90 display: block;
91 font-weight: bold;
92 }
93
94 h1 {
95 font-size: 2em;
96 margin: .67em 0;
97 }
98
99 h2 {
100 font-size: 1.5em;
101 margin: .83em 0;
102 }
103
104 h3 {
105 font-size: 1.17em;
106 margin: 1em 0;
107 }
108
109 h4 {
110 margin: 1.33em 0;
111 }
112
113 h5 {
114 font-size: 0.83em;
115 margin: 1.67em 0;
116 }
117
118 h6 {
119 font-size: 0.67em;
120 margin: 2.33em 0;
121 }
122
123 listing {
124 display: block;
125 font-family: fixed;
126 font-size: medium;
127 white-space: pre;
128 margin: 1em 0;
129 }
130
131 plaintext, pre, xmp {
132 display: block;
133 font-family: fixed;
134 white-space: pre;
135 margin: 1em 0;
136 }
137
138 /* tables */
139
140 table {
141 display: table;
142 border-spacing: 2px;
143 border-collapse: separate;
144 margin-top: 0;
145 margin-bottom: 0;
146 text-indent: 0;
147 text-align: left; /* quirk */
148 }
149
150 table[border] {
151 border-style: outset;
152 border-color: gray;
153 }
154
155 /* This won't work (???) */
156 /*
157 table[border] td,
158 table[border] th {
159 border: 1pt solid grey;
160 }*/
161
162 /* make sure backgrounds are inherited in tables -- see bug 4510 */
163 td, th, tr {
164 background-color: inherit;
165 background-image: inherit;
166 background-image-resolution: inherit;
167 background-position: inherit;
168 background-repeat: inherit;
169 background-size: inherit;
170 }
171
172 /* caption inherits from table not table-outer */
173 caption {
174 display: table-caption;
175 text-align: center;
176 }
177
178 tr {
179 display: table-row;
180 vertical-align: inherit;
181 }
182
183 col {
184 display: table-column;
185 }
186
187 colgroup {
188 display: table-column-group;
189 }
190
191 tbody {
192 display: table-row-group;
193 vertical-align: middle;
194 }
195
196 thead {
197 display: table-header-group;
198 vertical-align: middle;
199 }
200
201 tfoot {
202 display: table-footer-group;
203 vertical-align: middle;
204 }
205
206 /* To simulate tbody auto-insertion */
207 table > tr {
208 vertical-align: middle;
209 }
210
211 td {
212 display: table-cell;
213 vertical-align: inherit;
214 text-align: inherit;
215 padding: 1px;
216 }
217
218 th {
219 display: table-cell;
220 vertical-align: inherit;
221 text-align: center;
222 font-weight: bold;
223 padding: 1px;
224 }
225
226 /* inlines */
227 q {
228 quotes: '"' '"' "'" "'"; /* FIXME only the first level is used */
229 }
230
231 q:before {
232 content: open-quote;
233 }
234
235 q:after {
236 content: close-quote;
237 }
238
239 :link {
240 color: #00c;
241 text-decoration: underline;
242 }
243
244 b, strong {
245 font-weight: bolder;
246 }
247
248 i, cite, em, var, dfn {
249 font-style: italic;
250 }
251
252 tt, code, kbd, samp {
253 font-family: fixed;
254 }
255
256 u, ins {
257 text-decoration: underline;
258 }
259
260 s, strike, del {
261 text-decoration: line-through;
262 }
263
264 big {
265 font-size: larger;
266 }
267
268 small {
269 font-size: smaller;
270 }
271
272 sub {
273 vertical-align: sub;
274 font-size: smaller;
275 line-height: normal;
276 }
277
278 sup {
279 vertical-align: super;
280 font-size: smaller;
281 line-height: normal;
282 }
283
284 nobr {
285 white-space: nowrap;
286 }
287
288 mark {
289 background: yellow;
290 color: black;
291 }
292
293 /* titles */
294
295 abbr[title], acronym[title] {
296 text-decoration: dotted underline;
297 }
298
299 /* lists */
300
301 ul, menu, dir {
302 display: block;
303 list-style-type: disc;
304 margin: 1em 0;
305 padding-left: 40px;
306 }
307
308 ol {
309 display: block;
310 list-style-type: decimal;
311 margin: 1em 0;
312 padding-left: 40px;
313 }
314
315 li {
316 display: list-item;
317 }
318
319 /*li:before {
320 display: -dompdf-list-bullet !important;
321 content: counter(-dompdf-default-counter) ". ";
322 padding-right: 0.5em;
323 }*/
324
325 /* nested lists have no top/bottom margins */
326 :matches(ul, ol, dir, menu, dl) ul,
327 :matches(ul, ol, dir, menu, dl) ol,
328 :matches(ul, ol, dir, menu, dl) dir,
329 :matches(ul, ol, dir, menu, dl) menu,
330 :matches(ul, ol, dir, menu, dl) dl {
331 margin-top: 0;
332 margin-bottom: 0;
333 }
334
335 /* 2 deep unordered lists use a circle */
336 :matches(ul, ol, dir, menu) ul,
337 :matches(ul, ol, dir, menu) ul,
338 :matches(ul, ol, dir, menu) ul,
339 :matches(ul, ol, dir, menu) ul {
340 list-style-type: circle;
341 }
342
343 /* 3 deep (or more) unordered lists use a square */
344 :matches(ul, ol, dir, menu) :matches(ul, ol, dir, menu) ul,
345 :matches(ul, ol, dir, menu) :matches(ul, ol, dir, menu) menu,
346 :matches(ul, ol, dir, menu) :matches(ul, ol, dir, menu) dir {
347 list-style-type: square;
348 }
349
350 /* forms */
351 /* From https://drafts.csswg.org/css-ui-3/#default-style-sheet */
352 form {
353 display: block;
354 }
355
356 input, button, select {
357 display: inline-block;
358 font-family: sans-serif;
359 }
360
361 input[type=text],
362 input[type=password],
363 select {
364 width: 12em;
365 }
366
367 input[type=text],
368 input[type=password],
369 input[type=button],
370 input[type=submit],
371 input[type=reset],
372 input[type=file],
373 button,
374 textarea,
375 select {
376 background: #FFF;
377 border: 1px solid #999;
378 padding: 2px;
379 margin: 2px;
380 }
381
382 input[type=button],
383 input[type=submit],
384 input[type=reset],
385 input[type=file],
386 button {
387 background: #CCC;
388 text-align: center;
389 }
390
391 input[type=file] {
392 width: 8em;
393 }
394
395 input[type=text]:before,
396 input[type=button]:before,
397 input[type=submit]:before,
398 input[type=reset]:before {
399 content: attr(value);
400 }
401
402 input[type=file]:before {
403 content: "Choose a file";
404 }
405
406 input[type=password][value]:before {
407 font-family: "DejaVu Sans" !important;
408 content: "\2022\2022\2022\2022\2022\2022\2022\2022";
409 line-height: 1em;
410 }
411
412 input[type=checkbox],
413 input[type=radio],
414 select:after {
415 font-family: "DejaVu Sans" !important;
416 font-size: 18px;
417 line-height: 1;
418 }
419
420 input[type=checkbox]:before {
421 content: "\2610";
422 }
423
424 input[type=checkbox][checked]:before {
425 content: "\2611";
426 }
427
428 input[type=radio]:before {
429 content: "\25CB";
430 }
431
432 input[type=radio][checked]:before {
433 content: "\25C9";
434 }
435
436 textarea {
437 display: block;
438 height: 3em;
439 overflow: hidden;
440 font-family: monospace;
441 white-space: pre-wrap;
442 word-wrap: break-word;
443 }
444
445 select {
446 position: relative!important;
447 overflow: hidden!important;
448 }
449
450 select:after {
451 position: absolute;
452 right: 0;
453 top: 0;
454 height: 5em;
455 width: 1.4em;
456 text-align: center;
457 background: #CCC;
458 content: "\25BE";
459 }
460
461 select option {
462 display: none;
463 }
464
465 select option[selected] {
466 display: inline;
467 }
468
469 fieldset {
470 display: block;
471 margin: 0.6em 2px 2px;
472 padding: 0.75em;
473 border: 1pt groove #666;
474 position: relative;
475 }
476
477 fieldset > legend {
478 position: absolute;
479 top: -0.6em;
480 left: 0.75em;
481 padding: 0 0.3em;
482 background: white;
483 }
484
485 legend {
486 display: inline-block;
487 }
488
489 /* leafs */
490
491 hr {
492 display: block;
493 height: 0;
494 border: 1px inset;
495 margin: 0.5em auto 0.5em auto;
496 }
497
498 hr[size="1"] {
499 border-style: solid none none none;
500 }
501
502 iframe {
503 border: 2px inset;
504 }
505
506 noframes {
507 display: block;
508 }
509
510 br {
511 display: -dompdf-br;
512 }
513
514 img, img_generated {
515 display: -dompdf-image !important;
516 }
517
518 dompdf_generated {
519 display: inline;
520 }
521
522 /* hidden elements */
523 area, base, basefont, head, meta, script, style, title,
524 noembed, param {
525 display: none;
526 -dompdf-keep: yes;
527 }
1 <?xml version="1.0"?>
2 <!--suppress XmlUnboundNsPrefix -->
3 <ruleset name="PHP-SDK">
4 <description>Coding standard ruleset based on the PSR-2 coding standard.</description>
5 <rule ref="PSR2"/>
6 <rule ref="Generic.Files.LineLength.TooLong">
7 <severity>0</severity>
8 </rule>
9 <rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps">
10 <severity>0</severity>
11 </rule>
12 <rule ref="PSR2.Methods.MethodDeclaration.Underscore">
13 <severity>0</severity>
14 </rule>
15 <rule ref="PSR2.Classes.PropertyDeclaration.Underscore">
16 <severity>0</severity>
17 </rule>
18 <rule ref="Squiz.Scope.MethodScope.Missing">
19 <severity>0</severity>
20 </rule>
21 <rule ref="PSR2.ControlStructures.SwitchDeclaration.TerminatingComment">
22 <severity>0</severity>
23 </rule>
24 <rule ref="PEAR.Functions.ValidDefaultValue.NotAtEnd">
25 <severity>0</severity>
26 </rule>
27 <rule ref="PSR1.Files.SideEffects.FoundWithSymbols">
28 <severity>0</severity>
29 </rule>
30 <rule ref="PSR2.Classes.PropertyDeclaration.ScopeMissing">
31 <severity>0</severity>
32 </rule>
33 <!-- These can be fixed automatically by phpcbf -->
34 <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine">
35 <severity>0</severity>
36 </rule>
37 <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine">
38 <severity>0</severity>
39 </rule>
40 <rule ref="Squiz.WhiteSpace.ControlStructureSpacing.SpacingAfterOpen">
41 <severity>0</severity>
42 </rule>
43 <rule ref="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose">
44 <severity>0</severity>
45 </rule>
46 <rule ref="Generic.ControlStructures.InlineControlStructure.NotAllowed">
47 <severity>0</severity>
48 </rule>
49 <rule ref="Squiz.ControlStructures.ControlSignature.SpaceBeforeSemicolon">
50 <severity>0</severity>
51 </rule>
52 <rule ref="PSR2.Files.EndFileNewline.NoneFound">
53 <severity>0</severity>
54 </rule>
55 <rule ref="PSR2.Classes.ClassDeclaration.CloseBraceAfterBody">
56 <severity>0</severity>
57 </rule>
58 <rule ref="PSR2.ControlStructures.ElseIfDeclaration.NotAllowed">
59 <severity>0</severity>
60 </rule>
61 <rule ref="PSR2.Methods.FunctionCallSignature.CloseBracketLine">
62 <severity>0</severity>
63 </rule>
64 <rule ref="PSR2.Methods.FunctionCallSignature.Indent">
65 <severity>0</severity>
66 </rule>
67 <rule ref="PSR2.ControlStructures.ElseIfDeclaration.NotAllowed">
68 <severity>0</severity>
69 </rule>
70 <rule ref="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace">
71 <severity>0</severity>
72 </rule>
73 <rule ref="PSR2.ControlStructures.ControlStructureSpacing.SpaceBeforeCloseBrace">
74 <severity>0</severity>
75 </rule>
76 <rule ref="PSR2.Methods.FunctionCallSignature.ContentAfterOpenBracket">
77 <severity>0</severity>
78 </rule>
79 <rule ref="Squiz.WhiteSpace.ControlStructureSpacing.SpacingAfterOpenBrace">
80 <severity>0</severity>
81 </rule>
82 <rule ref="PSR2.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace">
83 <severity>0</severity>
84 </rule>
85 <rule ref="PSR2.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace">
86 <severity>0</severity>
87 </rule>
88 <rule ref="Generic.Functions.FunctionCallArgumentSpacing.SpaceBeforeComma">
89 <severity>0</severity>
90 </rule>
91 <rule ref="Squiz.WhiteSpace.ScopeClosingBrace.ContentBefore">
92 <severity>0</severity>
93 </rule>
94 <rule ref="Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace">
95 <severity>0</severity>
96 </rule>
97 <rule ref="PSR2.Methods.FunctionCallSignature.SpaceBeforeCloseBracket">
98 <severity>0</severity>
99 </rule>
100 <rule ref="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis">
101 <severity>0</severity>
102 </rule>
103 <rule ref="PSR2.ControlStructures.SwitchDeclaration.SpaceBeforeColonCASE">
104 <severity>0</severity>
105 </rule>
106 <rule ref="PSR2.Methods.FunctionCallSignature.MultipleArguments">
107 <severity>0</severity>
108 </rule>
109 <rule ref="PSR2.Methods.FunctionCallSignature.SpaceAfterOpenBracket">
110 <severity>0</severity>
111 </rule>
112 <rule ref="Generic.WhiteSpace.ScopeIndent.Incorrect">
113 <severity>0</severity>
114 </rule>
115 <rule ref="Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword">
116 <severity>0</severity>
117 </rule>
118 <rule ref="PSR2.Classes.ClassDeclaration.OpenBraceNewLine">
119 <severity>0</severity>
120 </rule>
121 <rule ref="Squiz.Functions.MultiLineFunctionDeclaration.SpaceAfterFunction">
122 <severity>0</severity>
123 </rule>
124 <rule ref="Generic.Formatting.DisallowMultipleStatements.SameLine">
125 <severity>0</severity>
126 </rule>
127 <rule ref="PSR2.ControlStructures.SwitchDeclaration.BodyOnNextLineCASE">
128 <severity>0</severity>
129 </rule>
130 <rule ref="PSR2.Files.EndFileNewline.TooMany">
131 <severity>0</severity>
132 </rule>
133 <rule ref="Squiz.Functions.MultiLineFunctionDeclaration.ContentAfterBrace">
134 <severity>0</severity>
135 </rule>
136 <rule ref="PSR2.Methods.MethodDeclaration.StaticBeforeVisibility">
137 <severity>0</severity>
138 </rule>
139 <rule ref="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine">
140 <severity>0</severity>
141 </rule>
142 </ruleset>
1 <?php
2 namespace Dompdf;
3
4 /**
5 * Autoloads Dompdf classes
6 *
7 * @package Dompdf
8 */
9 class Autoloader
10 {
11 const PREFIX = 'Dompdf';
12
13 /**
14 * Register the autoloader
15 */
16 public static function register()
17 {
18 spl_autoload_register([new self, 'autoload']);
19 }
20
21 /**
22 * Autoloader
23 *
24 * @param string
25 */
26 public static function autoload($class)
27 {
28 if ($class === 'Dompdf\Cpdf') {
29 require_once __DIR__ . "/../lib/Cpdf.php";
30 return;
31 }
32
33 $prefixLength = strlen(self::PREFIX);
34 if (0 === strncmp(self::PREFIX, $class, $prefixLength)) {
35 $file = str_replace('\\', '/', substr($class, $prefixLength));
36 $file = realpath(__DIR__ . (empty($file) ? '' : '/') . $file . '.php');
37 if (file_exists($file)) {
38 require_once $file;
39 }
40 }
41 }
42 }
...\ No newline at end of file ...\ No newline at end of file
1 <?php
2 /**
3 * @package dompdf
4 * @link http://dompdf.github.com/
5 * @author Benj Carson <benjcarson@digitaljunkies.ca>
6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7 */
8 namespace Dompdf;
9
10 /**
11 * Create canvas instances
12 *
13 * The canvas factory creates canvas instances based on the
14 * availability of rendering backends and config options.
15 *
16 * @package dompdf
17 */
18 class CanvasFactory
19 {
20 /**
21 * Constructor is private: this is a static class
22 */
23 private function __construct()
24 {
25 }
26
27 /**
28 * @param Dompdf $dompdf
29 * @param string|array $paper
30 * @param string $orientation
31 * @param string $class
32 *
33 * @return Canvas
34 */
35 static function get_instance(Dompdf $dompdf, $paper = null, $orientation = null, $class = null)
36 {
37 $backend = strtolower($dompdf->getOptions()->getPdfBackend());
38
39 if (isset($class) && class_exists($class, false)) {
40 $class .= "_Adapter";
41 } else {
42 if (($backend === "auto" || $backend === "pdflib") &&
43 class_exists("PDFLib", false)
44 ) {
45 $class = "Dompdf\\Adapter\\PDFLib";
46 }
47
48 else {
49 if ($backend === "gd" && extension_loaded('gd')) {
50 $class = "Dompdf\\Adapter\\GD";
51 } else {
52 $class = "Dompdf\\Adapter\\CPDF";
53 }
54 }
55 }
56
57 return new $class($paper, $orientation, $dompdf);
58 }
59 }
This diff could not be displayed because it is too large.
1 <?php
2 /**
3 * @package dompdf
4 * @link http://dompdf.github.com/
5 * @author Benj Carson <benjcarson@digitaljunkies.ca>
6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7 */
8
9 namespace Dompdf;
10
11 /**
12 * Standard exception thrown by DOMPDF classes
13 *
14 * @package dompdf
15 */
16 class Exception extends \Exception
17 {
18
19 /**
20 * Class constructor
21 *
22 * @param string $message Error message
23 * @param int $code Error code
24 */
25 public function __construct($message = null, $code = 0)
26 {
27 parent::__construct($message, $code);
28 }
29 }
1 <?php
2 /**
3 * @package dompdf
4 * @link http://dompdf.github.com/
5 * @author Benj Carson <benjcarson@digitaljunkies.ca>
6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7 */
8 namespace Dompdf\Exception;
9
10 use Dompdf\Exception;
11
12 /**
13 * Image exception thrown by DOMPDF
14 *
15 * @package dompdf
16 */
17 class ImageException extends Exception
18 {
19
20 /**
21 * Class constructor
22 *
23 * @param string $message Error message
24 * @param int $code Error code
25 */
26 function __construct($message = null, $code = 0)
27 {
28 parent::__construct($message, $code);
29 }
30
31 }
1 <?php
2 /**
3 * @package dompdf
4 * @link http://dompdf.github.com/
5 * @author Benj Carson <benjcarson@digitaljunkies.ca>
6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7 */
8 namespace Dompdf\Frame;
9
10 use Dompdf\Css\Style;
11 use Dompdf\Dompdf;
12 use Dompdf\Exception;
13 use Dompdf\Frame;
14 use Dompdf\FrameDecorator\AbstractFrameDecorator;
15 use DOMXPath;
16 use Dompdf\FrameDecorator\Page as PageFrameDecorator;
17 use Dompdf\FrameReflower\Page as PageFrameReflower;
18 use Dompdf\Positioner\AbstractPositioner;
19
20 /**
21 * Contains frame decorating logic
22 *
23 * This class is responsible for assigning the correct {@link AbstractFrameDecorator},
24 * {@link AbstractPositioner}, and {@link AbstractFrameReflower} objects to {@link Frame}
25 * objects. This is determined primarily by the Frame's display type, but
26 * also by the Frame's node's type (e.g. DomElement vs. #text)
27 *
28 * @access private
29 * @package dompdf
30 */
31 class Factory
32 {
33
34 /**
35 * Array of positioners for specific frame types
36 *
37 * @var AbstractPositioner[]
38 */
39 protected static $_positioners;
40
41 /**
42 * Decorate the root Frame
43 *
44 * @param $root Frame The frame to decorate
45 * @param $dompdf Dompdf The dompdf instance
46 *
47 * @return PageFrameDecorator
48 */
49 static function decorate_root(Frame $root, Dompdf $dompdf)
50 {
51 $frame = new PageFrameDecorator($root, $dompdf);
52 $frame->set_reflower(new PageFrameReflower($frame));
53 $root->set_decorator($frame);
54
55 return $frame;
56 }
57
58 /**
59 * Decorate a Frame
60 *
61 * @param Frame $frame The frame to decorate
62 * @param Dompdf $dompdf The dompdf instance
63 * @param Frame $root The frame to decorate
64 *
65 * @throws Exception
66 * @return AbstractFrameDecorator
67 * FIXME: this is admittedly a little smelly...
68 */
69 static function decorate_frame(Frame $frame, Dompdf $dompdf, Frame $root = null)
70 {
71 if (is_null($dompdf)) {
72 throw new Exception("The DOMPDF argument is required");
73 }
74
75 $style = $frame->get_style();
76
77 // Floating (and more generally out-of-flow) elements are blocks
78 // http://coding.smashingmagazine.com/2007/05/01/css-float-theory-things-you-should-know/
79 if (!$frame->is_in_flow() && in_array($style->display, Style::$INLINE_TYPES)) {
80 $style->display = "block";
81 }
82
83 $display = $style->display;
84
85 switch ($display) {
86
87 case "flex": //FIXME: display type not yet supported
88 case "table-caption": //FIXME: display type not yet supported
89 case "block":
90 $positioner = "Block";
91 $decorator = "Block";
92 $reflower = "Block";
93 break;
94
95 case "inline-flex": //FIXME: display type not yet supported
96 case "inline-block":
97 $positioner = "Inline";
98 $decorator = "Block";
99 $reflower = "Block";
100 break;
101
102 case "inline":
103 $positioner = "Inline";
104 if ($frame->is_text_node()) {
105 $decorator = "Text";
106 $reflower = "Text";
107 } else {
108 if ($style->float !== "none") {
109 $decorator = "Block";
110 $reflower = "Block";
111 } else {
112 $decorator = "Inline";
113 $reflower = "Inline";
114 }
115 }
116 break;
117
118 case "table":
119 $positioner = "Block";
120 $decorator = "Table";
121 $reflower = "Table";
122 break;
123
124 case "inline-table":
125 $positioner = "Inline";
126 $decorator = "Table";
127 $reflower = "Table";
128 break;
129
130 case "table-row-group":
131 case "table-header-group":
132 case "table-footer-group":
133 $positioner = "NullPositioner";
134 $decorator = "TableRowGroup";
135 $reflower = "TableRowGroup";
136 break;
137
138 case "table-row":
139 $positioner = "NullPositioner";
140 $decorator = "TableRow";
141 $reflower = "TableRow";
142 break;
143
144 case "table-cell":
145 $positioner = "TableCell";
146 $decorator = "TableCell";
147 $reflower = "TableCell";
148 break;
149
150 case "list-item":
151 $positioner = "Block";
152 $decorator = "Block";
153 $reflower = "Block";
154 break;
155
156 case "-dompdf-list-bullet":
157 if ($style->list_style_position === "inside") {
158 $positioner = "Inline";
159 } else {
160 $positioner = "ListBullet";
161 }
162
163 if ($style->list_style_image !== "none") {
164 $decorator = "ListBulletImage";
165 } else {
166 $decorator = "ListBullet";
167 }
168
169 $reflower = "ListBullet";
170 break;
171
172 case "-dompdf-image":
173 $positioner = "Inline";
174 $decorator = "Image";
175 $reflower = "Image";
176 break;
177
178 case "-dompdf-br":
179 $positioner = "Inline";
180 $decorator = "Inline";
181 $reflower = "Inline";
182 break;
183
184 default:
185 // FIXME: should throw some sort of warning or something?
186 case "none":
187 if ($style->_dompdf_keep !== "yes") {
188 // Remove the node and the frame
189 $frame->get_parent()->remove_child($frame);
190 return;
191 }
192
193 $positioner = "NullPositioner";
194 $decorator = "NullFrameDecorator";
195 $reflower = "NullFrameReflower";
196 break;
197 }
198
199 // Handle CSS position
200 $position = $style->position;
201
202 if ($position === "absolute") {
203 $positioner = "Absolute";
204 } else {
205 if ($position === "fixed") {
206 $positioner = "Fixed";
207 }
208 }
209
210 $node = $frame->get_node();
211
212 // Handle nodeName
213 if ($node->nodeName === "img") {
214 $style->display = "-dompdf-image";
215 $decorator = "Image";
216 $reflower = "Image";
217 }
218
219 $decorator = "Dompdf\\FrameDecorator\\$decorator";
220 $reflower = "Dompdf\\FrameReflower\\$reflower";
221
222 /** @var AbstractFrameDecorator $deco */
223 $deco = new $decorator($frame, $dompdf);
224
225 $deco->set_positioner(self::getPositionerInstance($positioner));
226 $deco->set_reflower(new $reflower($deco, $dompdf->getFontMetrics()));
227
228 if ($root) {
229 $deco->set_root($root);
230 }
231
232 if ($display === "list-item") {
233 // Insert a list-bullet frame
234 $xml = $dompdf->getDom();
235 $bullet_node = $xml->createElement("bullet"); // arbitrary choice
236 $b_f = new Frame($bullet_node);
237
238 $node = $frame->get_node();
239 $parent_node = $node->parentNode;
240
241 if ($parent_node) {
242 if (!$parent_node->hasAttribute("dompdf-children-count")) {
243 $xpath = new DOMXPath($xml);
244 $count = $xpath->query("li", $parent_node)->length;
245 $parent_node->setAttribute("dompdf-children-count", $count);
246 }
247
248 if (is_numeric($node->getAttribute("value"))) {
249 $index = intval($node->getAttribute("value"));
250 } else {
251 if (!$parent_node->hasAttribute("dompdf-counter")) {
252 $index = ($parent_node->hasAttribute("start") ? $parent_node->getAttribute("start") : 1);
253 } else {
254 $index = (int)$parent_node->getAttribute("dompdf-counter") + 1;
255 }
256 }
257
258 $parent_node->setAttribute("dompdf-counter", $index);
259 $bullet_node->setAttribute("dompdf-counter", $index);
260 }
261
262 $new_style = $dompdf->getCss()->create_style();
263 $new_style->display = "-dompdf-list-bullet";
264 $new_style->inherit($style);
265 $b_f->set_style($new_style);
266
267 $deco->prepend_child(Factory::decorate_frame($b_f, $dompdf, $root));
268 }
269
270 return $deco;
271 }
272
273 /**
274 * Creates Positioners
275 *
276 * @param string $type type of positioner to use
277 * @return AbstractPositioner
278 */
279 protected static function getPositionerInstance($type)
280 {
281 if (!isset(self::$_positioners[$type])) {
282 $class = '\\Dompdf\\Positioner\\'.$type;
283 self::$_positioners[$type] = new $class();
284 }
285 return self::$_positioners[$type];
286 }
287 }
1 <?php
2 namespace Dompdf\Frame;
3
4 use Dompdf\Frame;
5 use IteratorAggregate;
6
7 /**
8 * Linked-list IteratorAggregate
9 *
10 * @access private
11 * @package dompdf
12 */
13 class FrameList implements IteratorAggregate
14 {
15 /**
16 * @var Frame
17 */
18 protected $_frame;
19
20 /**
21 * @param Frame $frame
22 */
23 function __construct($frame)
24 {
25 $this->_frame = $frame;
26 }
27
28 /**
29 * @return FrameListIterator
30 */
31 function getIterator()
32 {
33 return new FrameListIterator($this->_frame);
34 }
35 }
1 <?php
2 namespace Dompdf\Frame;
3
4 use Iterator;
5 use Dompdf\Frame;
6
7 /**
8 * Linked-list Iterator
9 *
10 * Returns children in order and allows for list to change during iteration,
11 * provided the changes occur to or after the current element
12 *
13 * @access private
14 * @package dompdf
15 */
16 class FrameListIterator implements Iterator
17 {
18
19 /**
20 * @var Frame
21 */
22 protected $_parent;
23
24 /**
25 * @var Frame
26 */
27 protected $_cur;
28
29 /**
30 * @var int
31 */
32 protected $_num;
33
34 /**
35 * @param Frame $frame
36 */
37 public function __construct(Frame $frame)
38 {
39 $this->_parent = $frame;
40 $this->_cur = $frame->get_first_child();
41 $this->_num = 0;
42 }
43
44 /**
45 *
46 */
47 public function rewind()
48 {
49 $this->_cur = $this->_parent->get_first_child();
50 $this->_num = 0;
51 }
52
53 /**
54 * @return bool
55 */
56 public function valid()
57 {
58 return isset($this->_cur); // && ($this->_cur->get_prev_sibling() === $this->_prev);
59 }
60
61 /**
62 * @return int
63 */
64 public function key()
65 {
66 return $this->_num;
67 }
68
69 /**
70 * @return Frame
71 */
72 public function current()
73 {
74 return $this->_cur;
75 }
76
77 /**
78 * @return Frame
79 */
80 public function next()
81 {
82 $ret = $this->_cur;
83 if (!$ret) {
84 return null;
85 }
86
87 $this->_cur = $this->_cur->get_next_sibling();
88 $this->_num++;
89 return $ret;
90 }
91 }
...\ No newline at end of file ...\ No newline at end of file
1 <?php
2
3 namespace Dompdf\Frame;
4
5 use DOMDocument;
6 use DOMNode;
7 use DOMElement;
8 use DOMXPath;
9
10 use Dompdf\Exception;
11 use Dompdf\Frame;
12
13 /**
14 * @package dompdf
15 * @link http://dompdf.github.com/
16 * @author Benj Carson <benjcarson@digitaljunkies.ca>
17 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
18 */
19
20 /**
21 * Represents an entire document as a tree of frames
22 *
23 * The FrameTree consists of {@link Frame} objects each tied to specific
24 * DOMNode objects in a specific DomDocument. The FrameTree has the same
25 * structure as the DomDocument, but adds additional capabilities for
26 * styling and layout.
27 *
28 * @package dompdf
29 */
30 class FrameTree
31 {
32 /**
33 * Tags to ignore while parsing the tree
34 *
35 * @var array
36 */
37 protected static $HIDDEN_TAGS = [
38 "area",
39 "base",
40 "basefont",
41 "head",
42 "style",
43 "meta",
44 "title",
45 "colgroup",
46 "noembed",
47 "param",
48 "#comment"
49 ];
50
51 /**
52 * The main DomDocument
53 *
54 * @see http://ca2.php.net/manual/en/ref.dom.php
55 * @var DOMDocument
56 */
57 protected $_dom;
58
59 /**
60 * The root node of the FrameTree.
61 *
62 * @var Frame
63 */
64 protected $_root;
65
66 /**
67 * Subtrees of absolutely positioned elements
68 *
69 * @var array of Frames
70 */
71 protected $_absolute_frames;
72
73 /**
74 * A mapping of {@link Frame} objects to DOMNode objects
75 *
76 * @var array
77 */
78 protected $_registry;
79
80 /**
81 * Class constructor
82 *
83 * @param DOMDocument $dom the main DomDocument object representing the current html document
84 */
85 public function __construct(DomDocument $dom)
86 {
87 $this->_dom = $dom;
88 $this->_root = null;
89 $this->_registry = [];
90 }
91
92 /**
93 * Returns the DOMDocument object representing the current html document
94 *
95 * @return DOMDocument
96 */
97 public function get_dom()
98 {
99 return $this->_dom;
100 }
101
102 /**
103 * Returns the root frame of the tree
104 *
105 * @return Frame
106 */
107 public function get_root()
108 {
109 return $this->_root;
110 }
111
112 /**
113 * Returns a specific frame given its id
114 *
115 * @param string $id
116 *
117 * @return Frame|null
118 */
119 public function get_frame($id)
120 {
121 return isset($this->_registry[$id]) ? $this->_registry[$id] : null;
122 }
123
124 /**
125 * Returns a post-order iterator for all frames in the tree
126 *
127 * @return FrameTreeList|Frame[]
128 */
129 public function get_frames()
130 {
131 return new FrameTreeList($this->_root);
132 }
133
134 /**
135 * Builds the tree
136 */
137 public function build_tree()
138 {
139 $html = $this->_dom->getElementsByTagName("html")->item(0);
140 if (is_null($html)) {
141 $html = $this->_dom->firstChild;
142 }
143
144 if (is_null($html)) {
145 throw new Exception("Requested HTML document contains no data.");
146 }
147
148 $this->fix_tables();
149
150 $this->_root = $this->_build_tree_r($html);
151 }
152
153 /**
154 * Adds missing TBODYs around TR
155 */
156 protected function fix_tables()
157 {
158 $xp = new DOMXPath($this->_dom);
159
160 // Move table caption before the table
161 // FIXME find a better way to deal with it...
162 $captions = $xp->query('//table/caption');
163 foreach ($captions as $caption) {
164 $table = $caption->parentNode;
165 $table->parentNode->insertBefore($caption, $table);
166 }
167
168 $firstRows = $xp->query('//table/tr[1]');
169 /** @var DOMElement $tableChild */
170 foreach ($firstRows as $tableChild) {
171 $tbody = $this->_dom->createElement('tbody');
172 $tableNode = $tableChild->parentNode;
173 do {
174 if ($tableChild->nodeName === 'tr') {
175 $tmpNode = $tableChild;
176 $tableChild = $tableChild->nextSibling;
177 $tableNode->removeChild($tmpNode);
178 $tbody->appendChild($tmpNode);
179 } else {
180 if ($tbody->hasChildNodes() === true) {
181 $tableNode->insertBefore($tbody, $tableChild);
182 $tbody = $this->_dom->createElement('tbody');
183 }
184 $tableChild = $tableChild->nextSibling;
185 }
186 } while ($tableChild);
187 if ($tbody->hasChildNodes() === true) {
188 $tableNode->appendChild($tbody);
189 }
190 }
191 }
192
193 // FIXME: temporary hack, preferably we will improve rendering of sequential #text nodes
194 /**
195 * Remove a child from a node
196 *
197 * Remove a child from a node. If the removed node results in two
198 * adjacent #text nodes then combine them.
199 *
200 * @param DOMNode $node the current DOMNode being considered
201 * @param array $children an array of nodes that are the children of $node
202 * @param int $index index from the $children array of the node to remove
203 */
204 protected function _remove_node(DOMNode $node, array &$children, $index)
205 {
206 $child = $children[$index];
207 $previousChild = $child->previousSibling;
208 $nextChild = $child->nextSibling;
209 $node->removeChild($child);
210 if (isset($previousChild, $nextChild)) {
211 if ($previousChild->nodeName === "#text" && $nextChild->nodeName === "#text") {
212 $previousChild->nodeValue .= $nextChild->nodeValue;
213 $this->_remove_node($node, $children, $index+1);
214 }
215 }
216 array_splice($children, $index, 1);
217 }
218
219 /**
220 * Recursively adds {@link Frame} objects to the tree
221 *
222 * Recursively build a tree of Frame objects based on a dom tree.
223 * No layout information is calculated at this time, although the
224 * tree may be adjusted (i.e. nodes and frames for generated content
225 * and images may be created).
226 *
227 * @param DOMNode $node the current DOMNode being considered
228 *
229 * @return Frame
230 */
231 protected function _build_tree_r(DOMNode $node)
232 {
233 $frame = new Frame($node);
234 $id = $frame->get_id();
235 $this->_registry[$id] = $frame;
236
237 if (!$node->hasChildNodes()) {
238 return $frame;
239 }
240
241 // Store the children in an array so that the tree can be modified
242 $children = [];
243 $length = $node->childNodes->length;
244 for ($i = 0; $i < $length; $i++) {
245 $children[] = $node->childNodes->item($i);
246 }
247 $index = 0;
248 // INFO: We don't advance $index if a node is removed to avoid skipping nodes
249 while ($index < count($children)) {
250 $child = $children[$index];
251 $nodeName = strtolower($child->nodeName);
252
253 // Skip non-displaying nodes
254 if (in_array($nodeName, self::$HIDDEN_TAGS)) {
255 if ($nodeName !== "head" && $nodeName !== "style") {
256 $this->_remove_node($node, $children, $index);
257 } else {
258 $index++;
259 }
260 continue;
261 }
262 // Skip empty text nodes
263 if ($nodeName === "#text" && $child->nodeValue === "") {
264 $this->_remove_node($node, $children, $index);
265 continue;
266 }
267 // Skip empty image nodes
268 if ($nodeName === "img" && $child->getAttribute("src") === "") {
269 $this->_remove_node($node, $children, $index);
270 continue;
271 }
272
273 if (is_object($child)) {
274 $frame->append_child($this->_build_tree_r($child), false);
275 }
276 $index++;
277 }
278
279 return $frame;
280 }
281
282 /**
283 * @param DOMElement $node
284 * @param DOMElement $new_node
285 * @param string $pos
286 *
287 * @return mixed
288 */
289 public function insert_node(DOMElement $node, DOMElement $new_node, $pos)
290 {
291 if ($pos === "after" || !$node->firstChild) {
292 $node->appendChild($new_node);
293 } else {
294 $node->insertBefore($new_node, $node->firstChild);
295 }
296
297 $this->_build_tree_r($new_node);
298
299 $frame_id = $new_node->getAttribute("frame_id");
300 $frame = $this->get_frame($frame_id);
301
302 $parent_id = $node->getAttribute("frame_id");
303 $parent = $this->get_frame($parent_id);
304
305 if ($parent) {
306 if ($pos === "before") {
307 $parent->prepend_child($frame, false);
308 } else {
309 $parent->append_child($frame, false);
310 }
311 }
312
313 return $frame_id;
314 }
315 }
...\ No newline at end of file ...\ No newline at end of file
1 <?php
2 namespace Dompdf\Frame;
3
4 use Iterator;
5 use Dompdf\Frame;
6
7 /**
8 * Pre-order Iterator
9 *
10 * Returns frames in preorder traversal order (parent then children)
11 *
12 * @access private
13 * @package dompdf
14 */
15 class FrameTreeIterator implements Iterator
16 {
17 /**
18 * @var Frame
19 */
20 protected $_root;
21
22 /**
23 * @var array
24 */
25 protected $_stack = [];
26
27 /**
28 * @var int
29 */
30 protected $_num;
31
32 /**
33 * @param Frame $root
34 */
35 public function __construct(Frame $root)
36 {
37 $this->_stack[] = $this->_root = $root;
38 $this->_num = 0;
39 }
40
41 /**
42 *
43 */
44 public function rewind()
45 {
46 $this->_stack = [$this->_root];
47 $this->_num = 0;
48 }
49
50 /**
51 * @return bool
52 */
53 public function valid()
54 {
55 return count($this->_stack) > 0;
56 }
57
58 /**
59 * @return int
60 */
61 public function key()
62 {
63 return $this->_num;
64 }
65
66 /**
67 * @return Frame
68 */
69 public function current()
70 {
71 return end($this->_stack);
72 }
73
74 /**
75 * @return Frame
76 */
77 public function next()
78 {
79 $b = end($this->_stack);
80
81 // Pop last element
82 unset($this->_stack[key($this->_stack)]);
83 $this->_num++;
84
85 // Push all children onto the stack in reverse order
86 if ($c = $b->get_last_child()) {
87 $this->_stack[] = $c;
88 while ($c = $c->get_prev_sibling()) {
89 $this->_stack[] = $c;
90 }
91 }
92
93 return $b;
94 }
95 }
96
1 <?php
2 namespace Dompdf\Frame;
3
4 use IteratorAggregate;
5 use Dompdf\Frame;
6
7 /**
8 * Pre-order IteratorAggregate
9 *
10 * @access private
11 * @package dompdf
12 */
13 class FrameTreeList implements IteratorAggregate
14 {
15 /**
16 * @var \Dompdf\Frame
17 */
18 protected $_root;
19
20 /**
21 * @param \Dompdf\Frame $root
22 */
23 public function __construct(Frame $root)
24 {
25 $this->_root = $root;
26 }
27
28 /**
29 * @return FrameTreeIterator
30 */
31 public function getIterator()
32 {
33 return new FrameTreeIterator($this->_root);
34 }
35 }
1 <?php
2 /**
3 * @package dompdf
4 * @link http://dompdf.github.com/
5 * @author Benj Carson <benjcarson@digitaljunkies.ca>
6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7 */
8 namespace Dompdf\FrameDecorator;
9
10 use Dompdf\Dompdf;
11 use Dompdf\Frame;
12 use Dompdf\LineBox;
13
14 /**
15 * Decorates frames for block layout
16 *
17 * @access private
18 * @package dompdf
19 */
20 class Block extends AbstractFrameDecorator
21 {
22 /**
23 * Current line index
24 *
25 * @var int
26 */
27 protected $_cl;
28
29 /**
30 * The block's line boxes
31 *
32 * @var LineBox[]
33 */
34 protected $_line_boxes;
35
36 /**
37 * Block constructor.
38 * @param Frame $frame
39 * @param Dompdf $dompdf
40 */
41 function __construct(Frame $frame, Dompdf $dompdf)
42 {
43 parent::__construct($frame, $dompdf);
44
45 $this->_line_boxes = [new LineBox($this)];
46 $this->_cl = 0;
47 }
48
49 /**
50 *
51 */
52 function reset()
53 {
54 parent::reset();
55
56 $this->_line_boxes = [new LineBox($this)];
57 $this->_cl = 0;
58 }
59
60 /**
61 * @return LineBox
62 */
63 function get_current_line_box()
64 {
65 return $this->_line_boxes[$this->_cl];
66 }
67
68 /**
69 * @return integer
70 */
71 function get_current_line_number()
72 {
73 return $this->_cl;
74 }
75
76 /**
77 * @return LineBox[]
78 */
79 function get_line_boxes()
80 {
81 return $this->_line_boxes;
82 }
83
84 /**
85 * @param integer $line_number
86 * @return integer
87 */
88 function set_current_line_number($line_number)
89 {
90 $line_boxes_count = count($this->_line_boxes);
91 $cl = max(min($line_number, $line_boxes_count), 0);
92 return ($this->_cl = $cl);
93 }
94
95 /**
96 * @param integer $i
97 */
98 function clear_line($i)
99 {
100 if (isset($this->_line_boxes[$i])) {
101 unset($this->_line_boxes[$i]);
102 }
103 }
104
105 /**
106 * @param Frame $frame
107 */
108 function add_frame_to_line(Frame $frame)
109 {
110 if (!$frame->is_in_flow()) {
111 return;
112 }
113
114 $style = $frame->get_style();
115
116 $frame->set_containing_line($this->_line_boxes[$this->_cl]);
117
118 /*
119 // Adds a new line after a block, only if certain conditions are met
120 if ((($frame instanceof Inline && $frame->get_node()->nodeName !== "br") ||
121 $frame instanceof Text && trim($frame->get_text())) &&
122 ($frame->get_prev_sibling() && $frame->get_prev_sibling()->get_style()->display === "block" &&
123 $this->_line_boxes[$this->_cl]->w > 0 )) {
124
125 $this->maximize_line_height( $style->length_in_pt($style->line_height), $frame );
126 $this->add_line();
127
128 // Add each child of the inline frame to the line individually
129 foreach ($frame->get_children() as $child)
130 $this->add_frame_to_line( $child );
131 }
132 else*/
133
134 // Handle inline frames (which are effectively wrappers)
135 if ($frame instanceof Inline) {
136 // Handle line breaks
137 if ($frame->get_node()->nodeName === "br") {
138 $this->maximize_line_height($style->line_height, $frame);
139 $this->add_line(true);
140 }
141
142 return;
143 }
144
145 // Trim leading text if this is an empty line. Kinda a hack to put it here,
146 // but what can you do...
147 if ($this->get_current_line_box()->w == 0 &&
148 $frame->is_text_node() &&
149 !$frame->is_pre()
150 ) {
151 $frame->set_text(ltrim($frame->get_text()));
152 $frame->recalculate_width();
153 }
154
155 $w = $frame->get_margin_width();
156
157 // FIXME: Why? Doesn't quite seem to be the correct thing to do,
158 // but does appear to be necessary. Hack to handle wrapped white space?
159 if ($w == 0 && $frame->get_node()->nodeName !== "hr" && !$frame->is_pre()) {
160 return;
161 }
162
163 // Debugging code:
164 /*
165 Helpers::pre_r("\n<h3>Adding frame to line:</h3>");
166
167 // Helpers::pre_r("Me: " . $this->get_node()->nodeName . " (" . spl_object_hash($this->get_node()) . ")");
168 // Helpers::pre_r("Node: " . $frame->get_node()->nodeName . " (" . spl_object_hash($frame->get_node()) . ")");
169 if ( $frame->is_text_node() )
170 Helpers::pre_r('"'.$frame->get_node()->nodeValue.'"');
171
172 Helpers::pre_r("Line width: " . $this->_line_boxes[$this->_cl]->w);
173 Helpers::pre_r("Frame: " . get_class($frame));
174 Helpers::pre_r("Frame width: " . $w);
175 Helpers::pre_r("Frame height: " . $frame->get_margin_height());
176 Helpers::pre_r("Containing block width: " . $this->get_containing_block("w"));
177 */
178 // End debugging
179
180 $line = $this->_line_boxes[$this->_cl];
181 if ($line->left + $line->w + $line->right + $w > $this->get_containing_block("w")) {
182 $this->add_line();
183 }
184
185 $frame->position();
186
187 $current_line = $this->_line_boxes[$this->_cl];
188 $current_line->add_frame($frame);
189
190 if ($frame->is_text_node()) {
191 // split the text into words (used to determine spacing between words on justified lines)
192 // The regex splits on everything that's a separator (^\S double negative), excluding nbsp (\xa0)
193 // This currently excludes the "narrow nbsp" character
194 $words = preg_split('/[^\S\xA0]+/u', trim($frame->get_text()));
195 $current_line->wc += count($words);
196 }
197
198 $this->increase_line_width($w);
199
200 $this->maximize_line_height($frame->get_margin_height(), $frame);
201 }
202
203 /**
204 * @param Frame $frame
205 */
206 function remove_frames_from_line(Frame $frame)
207 {
208 // Search backwards through the lines for $frame
209 $i = $this->_cl;
210 $j = null;
211
212 while ($i >= 0) {
213 if (($j = in_array($frame, $this->_line_boxes[$i]->get_frames(), true)) !== false) {
214 break;
215 }
216
217 $i--;
218 }
219
220 if ($j === false) {
221 return;
222 }
223
224 // Remove $frame and all frames that follow
225 while ($j < count($this->_line_boxes[$i]->get_frames())) {
226 $frames = $this->_line_boxes[$i]->get_frames();
227 $f = $frames[$j];
228 $frames[$j] = null;
229 unset($frames[$j]);
230 $j++;
231 $this->_line_boxes[$i]->w -= $f->get_margin_width();
232 }
233
234 // Recalculate the height of the line
235 $h = 0;
236 foreach ($this->_line_boxes[$i]->get_frames() as $f) {
237 $h = max($h, $f->get_margin_height());
238 }
239
240 $this->_line_boxes[$i]->h = $h;
241
242 // Remove all lines that follow
243 while ($this->_cl > $i) {
244 $this->_line_boxes[$this->_cl] = null;
245 unset($this->_line_boxes[$this->_cl]);
246 $this->_cl--;
247 }
248 }
249
250 /**
251 * @param float $w
252 */
253 function increase_line_width($w)
254 {
255 $this->_line_boxes[$this->_cl]->w += $w;
256 }
257
258 /**
259 * @param $val
260 * @param Frame $frame
261 */
262 function maximize_line_height($val, Frame $frame)
263 {
264 if ($val > $this->_line_boxes[$this->_cl]->h) {
265 $this->_line_boxes[$this->_cl]->tallest_frame = $frame;
266 $this->_line_boxes[$this->_cl]->h = $val;
267 }
268 }
269
270 /**
271 * @param bool $br
272 */
273 function add_line($br = false)
274 {
275 $this->_line_boxes[$this->_cl]->br = $br;
276 $y = $this->_line_boxes[$this->_cl]->y + $this->_line_boxes[$this->_cl]->h;
277
278 $new_line = new LineBox($this, $y);
279
280 $this->_line_boxes[++$this->_cl] = $new_line;
281 }
282
283 //........................................................................
284 }
1 <?php
2 /**
3 * @package dompdf
4 * @link http://dompdf.github.com/
5 * @author Benj Carson <benjcarson@digitaljunkies.ca>
6 * @author Fabien Ménager <fabien.menager@gmail.com>
7 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
8 */
9 namespace Dompdf\FrameDecorator;
10
11 use Dompdf\Dompdf;
12 use Dompdf\Frame;
13 use Dompdf\Image\Cache;
14
15 /**
16 * Decorates frames for image layout and rendering
17 *
18 * @package dompdf
19 */
20 class Image extends AbstractFrameDecorator
21 {
22
23 /**
24 * The path to the image file (note that remote images are
25 * downloaded locally to Options:tempDir).
26 *
27 * @var string
28 */
29 protected $_image_url;
30
31 /**
32 * The image's file error message
33 *
34 * @var string
35 */
36 protected $_image_msg;
37
38 /**
39 * Class constructor
40 *
41 * @param Frame $frame the frame to decorate
42 * @param DOMPDF $dompdf the document's dompdf object (required to resolve relative & remote urls)
43 */
44 function __construct(Frame $frame, Dompdf $dompdf)
45 {
46 parent::__construct($frame, $dompdf);
47 $url = $frame->get_node()->getAttribute("src");
48
49 $debug_png = $dompdf->getOptions()->getDebugPng();
50 if ($debug_png) {
51 print '[__construct ' . $url . ']';
52 }
53
54 list($this->_image_url, /*$type*/, $this->_image_msg) = Cache::resolve_url(
55 $url,
56 $dompdf->getProtocol(),
57 $dompdf->getBaseHost(),
58 $dompdf->getBasePath(),
59 $dompdf
60 );
61
62 if (Cache::is_broken($this->_image_url) &&
63 $alt = $frame->get_node()->getAttribute("alt")
64 ) {
65 $style = $frame->get_style();
66 $style->width = (4 / 3) * $dompdf->getFontMetrics()->getTextWidth($alt, $style->font_family, $style->font_size, $style->word_spacing);
67 $style->height = $dompdf->getFontMetrics()->getFontHeight($style->font_family, $style->font_size);
68 }
69 }
70
71 /**
72 * Return the image's url
73 *
74 * @return string The url of this image
75 */
76 function get_image_url()
77 {
78 return $this->_image_url;
79 }
80
81 /**
82 * Return the image's error message
83 *
84 * @return string The image's error message
85 */
86 function get_image_msg()
87 {
88 return $this->_image_msg;
89 }
90
91 }
1 <?php
2 /**
3 * @package dompdf
4 * @link http://dompdf.github.com/
5 * @author Benj Carson <benjcarson@digitaljunkies.ca>
6 * @author Helmut Tischer <htischer@weihenstephan.org>
7 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
8 */
9 namespace Dompdf\FrameDecorator;
10
11 use DOMElement;
12 use Dompdf\Dompdf;
13 use Dompdf\Frame;
14 use Dompdf\Exception;
15
16 /**
17 * Decorates frames for inline layout
18 *
19 * @access private
20 * @package dompdf
21 */
22 class Inline extends AbstractFrameDecorator
23 {
24
25 /**
26 * Inline constructor.
27 * @param Frame $frame
28 * @param Dompdf $dompdf
29 */
30 function __construct(Frame $frame, Dompdf $dompdf)
31 {
32 parent::__construct($frame, $dompdf);
33 }
34
35 /**
36 * @param Frame|null $frame
37 * @param bool $force_pagebreak
38 * @throws Exception
39 */
40 function split(Frame $frame = null, $force_pagebreak = false)
41 {
42 if (is_null($frame)) {
43 $this->get_parent()->split($this, $force_pagebreak);
44 return;
45 }
46
47 if ($frame->get_parent() !== $this) {
48 throw new Exception("Unable to split: frame is not a child of this one.");
49 }
50
51 $node = $this->_frame->get_node();
52
53 if ($node instanceof DOMElement && $node->hasAttribute("id")) {
54 $node->setAttribute("data-dompdf-original-id", $node->getAttribute("id"));
55 $node->removeAttribute("id");
56 }
57
58 $split = $this->copy($node->cloneNode());
59 // if this is a generated node don't propagate the content style
60 if ($split->get_node()->nodeName == "dompdf_generated") {
61 $split->get_style()->content = "normal";
62 }
63 $this->get_parent()->insert_child_after($split, $this);
64
65 // Unset the current node's right style properties
66 $style = $this->_frame->get_style();
67 $style->margin_right = 0;
68 $style->padding_right = 0;
69 $style->border_right_width = 0;
70
71 // Unset the split node's left style properties since we don't want them
72 // to propagate
73 $style = $split->get_style();
74 $style->margin_left = 0;
75 $style->padding_left = 0;
76 $style->border_left_width = 0;
77
78 //On continuation of inline element on next line,
79 //don't repeat non-vertically repeatble background images
80 //See e.g. in testcase image_variants, long desriptions
81 if (($url = $style->background_image) && $url !== "none"
82 && ($repeat = $style->background_repeat) && $repeat !== "repeat" && $repeat !== "repeat-y"
83 ) {
84 $style->background_image = "none";
85 }
86
87 // Add $frame and all following siblings to the new split node
88 $iter = $frame;
89 while ($iter) {
90 $frame = $iter;
91 $iter = $iter->get_next_sibling();
92 $frame->reset();
93 $split->append_child($frame);
94 }
95
96 $page_breaks = ["always", "left", "right"];
97 $frame_style = $frame->get_style();
98 if ($force_pagebreak ||
99 in_array($frame_style->page_break_before, $page_breaks) ||
100 in_array($frame_style->page_break_after, $page_breaks)
101 ) {
102 $this->get_parent()->split($split, true);
103 }
104 }
105
106 }
1 <?php
2 /**
3 * @package dompdf
4 * @link http://dompdf.github.com/
5 * @author Benj Carson <benjcarson@digitaljunkies.ca>
6 * @author Helmut Tischer <htischer@weihenstephan.org>
7 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
8 */
9 namespace Dompdf\FrameDecorator;
10
11 use Dompdf\Dompdf;
12 use Dompdf\Frame;
13
14 /**
15 * Decorates frames for list bullet rendering
16 *
17 * @package dompdf
18 */
19 class ListBullet extends AbstractFrameDecorator
20 {
21
22 const BULLET_PADDING = 1; // Distance from bullet to text in pt
23 // As fraction of font size (including descent). See also DECO_THICKNESS.
24 const BULLET_THICKNESS = 0.04; // Thickness of bullet outline. Screen: 0.08, print: better less, e.g. 0.04
25 const BULLET_DESCENT = 0.3; //descent of font below baseline. Todo: Guessed for now.
26 const BULLET_SIZE = 0.35; // bullet diameter. For now 0.5 of font_size without descent.
27
28 static $BULLET_TYPES = ["disc", "circle", "square"];
29
30 /**
31 * ListBullet constructor.
32 * @param Frame $frame
33 * @param Dompdf $dompdf
34 */
35 function __construct(Frame $frame, Dompdf $dompdf)
36 {
37 parent::__construct($frame, $dompdf);
38 }
39
40 /**
41 * @return float|int
42 */
43 function get_margin_width()
44 {
45 $style = $this->_frame->get_style();
46
47 if ($style->list_style_type === "none") {
48 return 0;
49 }
50
51 return $style->font_size * self::BULLET_SIZE + 2 * self::BULLET_PADDING;
52 }
53
54 /**
55 * hits only on "inset" lists items, to increase height of box
56 *
57 * @return float|int
58 */
59 function get_margin_height()
60 {
61 $style = $this->_frame->get_style();
62
63 if ($style->list_style_type === "none") {
64 return 0;
65 }
66
67 return $style->font_size * self::BULLET_SIZE + 2 * self::BULLET_PADDING;
68 }
69
70 /**
71 * @return float|int
72 */
73 function get_width()
74 {
75 return $this->get_margin_width();
76 }
77
78 /**
79 * @return float|int
80 */
81 function get_height()
82 {
83 return $this->get_margin_height();
84 }
85
86 //........................................................................
87 }
1 <?php
2 /**
3 * @package dompdf
4 * @link http://dompdf.github.com/
5 * @author Benj Carson <benjcarson@digitaljunkies.ca>
6 * @author Helmut Tischer <htischer@weihenstephan.org>
7 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
8 */
9 namespace Dompdf\FrameDecorator;
10
11 use Dompdf\Dompdf;
12 use Dompdf\Frame;
13 use Dompdf\Helpers;
14 use Dompdf\Image\Cache;
15
16 /**
17 * Decorates frames for list bullets with custom images
18 *
19 * @package dompdf
20 */
21 class ListBulletImage extends AbstractFrameDecorator
22 {
23
24 /**
25 * The underlying image frame
26 *
27 * @var Image
28 */
29 protected $_img;
30
31 /**
32 * The image's width in pixels
33 *
34 * @var int
35 */
36 protected $_width;
37
38 /**
39 * The image's height in pixels
40 *
41 * @var int
42 */
43 protected $_height;
44
45 /**
46 * Class constructor
47 *
48 * @param Frame $frame the bullet frame to decorate
49 * @param Dompdf $dompdf the document's dompdf object
50 */
51 function __construct(Frame $frame, Dompdf $dompdf)
52 {
53 $style = $frame->get_style();
54 $url = $style->list_style_image;
55 $frame->get_node()->setAttribute("src", $url);
56 $this->_img = new Image($frame, $dompdf);
57 parent::__construct($this->_img, $dompdf);
58
59 if (Cache::is_broken($this->_img->get_image_url())) {
60 $width = 0;
61 $height = 0;
62 } else {
63 list($width, $height) = Helpers::dompdf_getimagesize($this->_img->get_image_url(), $dompdf->getHttpContext());
64 }
65
66 // Resample the bullet image to be consistent with 'auto' sized images
67 // See also Image::get_min_max_width
68 // Tested php ver: value measured in px, suffix "px" not in value: rtrim unnecessary.
69 $dpi = $this->_dompdf->getOptions()->getDpi();
70 $this->_width = ((float)rtrim($width, "px") * 72) / $dpi;
71 $this->_height = ((float)rtrim($height, "px") * 72) / $dpi;
72
73 //If an image is taller as the containing block/box, the box should be extended.
74 //Neighbour elements are overwriting the overlapping image areas.
75 //Todo: Where can the box size be extended?
76 //Code below has no effect.
77 //See block_frame_reflower _calculate_restricted_height
78 //See generated_frame_reflower, Dompdf:render() "list-item", "-dompdf-list-bullet"S.
79 //Leave for now
80 //if ($style->min_height < $this->_height ) {
81 // $style->min_height = $this->_height;
82 //}
83 //$style->height = "auto";
84 }
85
86 /**
87 * Return the bullet's width
88 *
89 * @return int
90 */
91 function get_width()
92 {
93 //ignore image width, use same width as on predefined bullet ListBullet
94 //for proper alignment of bullet image and text. Allow image to not fitting on left border.
95 //This controls the distance between bullet image and text
96 //return $this->_width;
97 return $this->_frame->get_style()->font_size * ListBullet::BULLET_SIZE +
98 2 * ListBullet::BULLET_PADDING;
99 }
100
101 /**
102 * Return the bullet's height
103 *
104 * @return int
105 */
106 function get_height()
107 {
108 //based on image height
109 if ($this->_height == 0) {
110 $style = $this->_frame->get_style();
111
112 if ($style->list_style_type === "none") {
113 return 0;
114 }
115
116 return $style->font_size * ListBullet::BULLET_SIZE + 2 * ListBullet::BULLET_PADDING;
117 } else {
118 return $this->_height;
119 }
120 }
121
122 /**
123 * Override get_margin_width
124 *
125 * @return int
126 */
127 function get_margin_width()
128 {
129 //ignore image width, use same width as on predefined bullet ListBullet
130 //for proper alignment of bullet image and text. Allow image to not fitting on left border.
131 //This controls the extra indentation of text to make room for the bullet image.
132 //Here use actual image size, not predefined bullet size
133 //return $this->_frame->get_style()->font_size*ListBullet::BULLET_SIZE +
134 // 2 * ListBullet::BULLET_PADDING;
135
136 // Small hack to prevent indenting of list text
137 // Image might not exist, then position like on list_bullet_frame_decorator fallback to none.
138 if ($this->_frame->get_style()->list_style_position === "outside" || $this->_width == 0) {
139 return 0;
140 }
141 //This aligns the "inside" image position with the text.
142 //The text starts to the right of the image.
143 //Between the image and the text there is an added margin of image width.
144 //Where this comes from is unknown.
145 //The corresponding ListBullet sets a smaller margin. bullet size?
146 return $this->_width + 2 * ListBullet::BULLET_PADDING;
147 }
148
149 /**
150 * Override get_margin_height()
151 *
152 * @return int
153 */
154 function get_margin_height()
155 {
156 //Hits only on "inset" lists items, to increase height of box
157 //based on image height
158 return $this->_height + 2 * ListBullet::BULLET_PADDING;
159 }
160
161 /**
162 * Return image url
163 *
164 * @return string
165 */
166 function get_image_url()
167 {
168 return $this->_img->get_image_url();
169 }
170
171 }
1 <?php
2 /**
3 * @package dompdf
4 * @link http://dompdf.github.com/
5 * @author Benj Carson <benjcarson@digitaljunkies.ca>
6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7 */
8 namespace Dompdf\FrameDecorator;
9
10 use Dompdf\Dompdf;
11 use Dompdf\Frame;
12
13 /**
14 * Dummy decorator
15 *
16 * @package dompdf
17 */
18 class NullFrameDecorator extends AbstractFrameDecorator
19 {
20 /**
21 * NullFrameDecorator constructor.
22 * @param Frame $frame
23 * @param Dompdf $dompdf
24 */
25 function __construct(Frame $frame, Dompdf $dompdf)
26 {
27 parent::__construct($frame, $dompdf);
28 $style = $this->_frame->get_style();
29 $style->width = 0;
30 $style->height = 0;
31 $style->margin = 0;
32 $style->padding = 0;
33 }
34 }
1 <?php
2 /**
3 * @package dompdf
4 * @link http://dompdf.github.com/
5 * @author Benj Carson <benjcarson@digitaljunkies.ca>
6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7 */
8 namespace Dompdf\FrameDecorator;
9
10 use Dompdf\Dompdf;
11 use Dompdf\Frame;
12 use Dompdf\FrameDecorator\Block as BlockFrameDecorator;
13
14 /**
15 * Decorates table cells for layout
16 *
17 * @package dompdf
18 */
19 class TableCell extends BlockFrameDecorator
20 {
21
22 protected $_resolved_borders;
23 protected $_content_height;
24
25 //........................................................................
26
27 /**
28 * TableCell constructor.
29 * @param Frame $frame
30 * @param Dompdf $dompdf
31 */
32 function __construct(Frame $frame, Dompdf $dompdf)
33 {
34 parent::__construct($frame, $dompdf);
35 $this->_resolved_borders = [];
36 $this->_content_height = 0;
37 }
38
39 //........................................................................
40
41 function reset()
42 {
43 parent::reset();
44 $this->_resolved_borders = [];
45 $this->_content_height = 0;
46 $this->_frame->reset();
47 }
48
49 /**
50 * @return int
51 */
52 function get_content_height()
53 {
54 return $this->_content_height;
55 }
56
57 /**
58 * @param $height
59 */
60 function set_content_height($height)
61 {
62 $this->_content_height = $height;
63 }
64
65 /**
66 * @param $height
67 */
68 function set_cell_height($height)
69 {
70 $style = $this->get_style();
71 $v_space = (float)$style->length_in_pt(
72 [
73 $style->margin_top,
74 $style->padding_top,
75 $style->border_top_width,
76 $style->border_bottom_width,
77 $style->padding_bottom,
78 $style->margin_bottom
79 ],
80 (float)$style->length_in_pt($style->height)
81 );
82
83 $new_height = $height - $v_space;
84 $style->height = $new_height;
85
86 if ($new_height > $this->_content_height) {
87 $y_offset = 0;
88
89 // Adjust our vertical alignment
90 switch ($style->vertical_align) {
91 default:
92 case "baseline":
93 // FIXME: this isn't right
94
95 case "top":
96 // Don't need to do anything
97 return;
98
99 case "middle":
100 $y_offset = ($new_height - $this->_content_height) / 2;
101 break;
102
103 case "bottom":
104 $y_offset = $new_height - $this->_content_height;
105 break;
106 }
107
108 if ($y_offset) {
109 // Move our children
110 foreach ($this->get_line_boxes() as $line) {
111 foreach ($line->get_frames() as $frame) {
112 $frame->move(0, $y_offset);
113 }
114 }
115 }
116 }
117 }
118
119 /**
120 * @param $side
121 * @param $border_spec
122 */
123 function set_resolved_border($side, $border_spec)
124 {
125 $this->_resolved_borders[$side] = $border_spec;
126 }
127
128 /**
129 * @param $side
130 * @return mixed
131 */
132 function get_resolved_border($side)
133 {
134 return $this->_resolved_borders[$side];
135 }
136
137 /**
138 * @return array
139 */
140 function get_resolved_borders()
141 {
142 return $this->_resolved_borders;
143 }
144 }
1 <?php
2 /**
3 * @package dompdf
4 * @link http://dompdf.github.com/
5 * @author Benj Carson <benjcarson@digitaljunkies.ca>
6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7 */
8 namespace Dompdf\FrameDecorator;
9
10 use Dompdf\Dompdf;
11 use Dompdf\Frame;
12 use Dompdf\FrameDecorator\Table as TableFrameDecorator;
13
14 /**
15 * Decorates Frames for table row layout
16 *
17 * @package dompdf
18 */
19 class TableRow extends AbstractFrameDecorator
20 {
21 /**
22 * TableRow constructor.
23 * @param Frame $frame
24 * @param Dompdf $dompdf
25 */
26 function __construct(Frame $frame, Dompdf $dompdf)
27 {
28 parent::__construct($frame, $dompdf);
29 }
30
31 //........................................................................
32
33 /**
34 * Remove all non table-cell frames from this row and move them after
35 * the table.
36 */
37 function normalise()
38 {
39 // Find our table parent
40 $p = TableFrameDecorator::find_parent_table($this);
41
42 $erroneous_frames = [];
43 foreach ($this->get_children() as $child) {
44 $display = $child->get_style()->display;
45
46 if ($display !== "table-cell") {
47 $erroneous_frames[] = $child;
48 }
49 }
50
51 // dump the extra nodes after the table.
52 foreach ($erroneous_frames as $frame) {
53 $p->move_after($frame);
54 }
55 }
56
57 function split(Frame $child = null, $force_pagebreak = false)
58 {
59 $this->_already_pushed = true;
60
61 if (is_null($child)) {
62 parent::split();
63 return;
64 }
65
66 parent::split($child, $force_pagebreak);
67 }
68 }
1 <?php
2 /**
3 * @package dompdf
4 * @link http://dompdf.github.com/
5 * @author Benj Carson <benjcarson@digitaljunkies.ca>
6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7 */
8 namespace Dompdf\FrameDecorator;
9
10 use Dompdf\Dompdf;
11 use Dompdf\Frame;
12
13 /**
14 * Table row group decorator
15 *
16 * Overrides split() method for tbody, thead & tfoot elements
17 *
18 * @package dompdf
19 */
20 class TableRowGroup extends AbstractFrameDecorator
21 {
22
23 /**
24 * Class constructor
25 *
26 * @param Frame $frame Frame to decorate
27 * @param Dompdf $dompdf Current dompdf instance
28 */
29 function __construct(Frame $frame, Dompdf $dompdf)
30 {
31 parent::__construct($frame, $dompdf);
32 }
33
34 /**
35 * Override split() to remove all child rows and this element from the cellmap
36 *
37 * @param Frame $child
38 * @param bool $force_pagebreak
39 *
40 * @return void
41 */
42 function split(Frame $child = null, $force_pagebreak = false)
43 {
44 if (is_null($child)) {
45 parent::split();
46 return;
47 }
48
49 // Remove child & all subsequent rows from the cellmap
50 $cellmap = $this->get_parent()->get_cellmap();
51 $iter = $child;
52
53 while ($iter) {
54 $cellmap->remove_row($iter);
55 $iter = $iter->get_next_sibling();
56 }
57
58 // If we are splitting at the first child remove the
59 // table-row-group from the cellmap as well
60 if ($child === $this->get_first_child()) {
61 $cellmap->remove_row_group($this);
62 parent::split();
63 return;
64 }
65
66 $cellmap->update_row_group($this, $child->get_prev_sibling());
67 parent::split($child);
68 }
69 }
70
1 <?php
2 /**
3 * @package dompdf
4 * @link http://dompdf.github.com/
5 * @author Benj Carson <benjcarson@digitaljunkies.ca>
6 * @author Brian Sweeney <eclecticgeek@gmail.com>
7 * @author Fabien Ménager <fabien.menager@gmail.com>
8 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
9 */
10 namespace Dompdf\FrameDecorator;
11
12 use Dompdf\Dompdf;
13 use Dompdf\Frame;
14 use Dompdf\Exception;
15
16 /**
17 * Decorates Frame objects for text layout
18 *
19 * @access private
20 * @package dompdf
21 */
22 class Text extends AbstractFrameDecorator
23 {
24
25 // protected members
26 protected $_text_spacing;
27
28 /**
29 * Text constructor.
30 * @param Frame $frame
31 * @param Dompdf $dompdf
32 * @throws Exception
33 */
34 function __construct(Frame $frame, Dompdf $dompdf)
35 {
36 if (!$frame->is_text_node()) {
37 throw new Exception("Text_Decorator can only be applied to #text nodes.");
38 }
39
40 parent::__construct($frame, $dompdf);
41 $this->_text_spacing = null;
42 }
43
44 function reset()
45 {
46 parent::reset();
47 $this->_text_spacing = null;
48 }
49
50 // Accessor methods
51
52 /**
53 * @return null
54 */
55 function get_text_spacing()
56 {
57 return $this->_text_spacing;
58 }
59
60 /**
61 * @return string
62 */
63 function get_text()
64 {
65 // FIXME: this should be in a child class (and is incorrect)
66 // if ( $this->_frame->get_style()->content !== "normal" ) {
67 // $this->_frame->get_node()->data = $this->_frame->get_style()->content;
68 // $this->_frame->get_style()->content = "normal";
69 // }
70
71 // Helpers::pre_r("---");
72 // $style = $this->_frame->get_style();
73 // var_dump($text = $this->_frame->get_node()->data);
74 // var_dump($asc = utf8_decode($text));
75 // for ($i = 0; $i < strlen($asc); $i++)
76 // Helpers::pre_r("$i: " . $asc[$i] . " - " . ord($asc[$i]));
77 // Helpers::pre_r("width: " . $this->_dompdf->getFontMetrics()->getTextWidth($text, $style->font_family, $style->font_size));
78
79 return $this->_frame->get_node()->data;
80 }
81
82 //........................................................................
83
84 /**
85 * Vertical margins & padding do not apply to text frames
86 *
87 * http://www.w3.org/TR/CSS21/visudet.html#inline-non-replaced:
88 *
89 * The vertical padding, border and margin of an inline, non-replaced box
90 * start at the top and bottom of the content area, not the
91 * 'line-height'. But only the 'line-height' is used to calculate the
92 * height of the line box.
93 *
94 * @return float|int
95 */
96 function get_margin_height()
97 {
98 // This function is called in add_frame_to_line() and is used to
99 // determine the line height, so we actually want to return the
100 // 'line-height' property, not the actual margin box
101 $style = $this->get_style();
102 $font = $style->font_family;
103 $size = $style->font_size;
104
105 /*
106 Helpers::pre_r('-----');
107 Helpers::pre_r($style->line_height);
108 Helpers::pre_r($style->font_size);
109 Helpers::pre_r($this->_dompdf->getFontMetrics()->getFontHeight($font, $size));
110 Helpers::pre_r(($style->line_height / $size) * $this->_dompdf->getFontMetrics()->getFontHeight($font, $size));
111 */
112
113 return ($style->line_height / ($size > 0 ? $size : 1)) * $this->_dompdf->getFontMetrics()->getFontHeight($font, $size);
114 }
115
116 /**
117 * @return array
118 */
119 function get_padding_box()
120 {
121 $style = $this->_frame->get_style();
122 $pb = $this->_frame->get_padding_box();
123 $pb[3] = $pb["h"] = $style->length_in_pt($style->height);
124 return $pb;
125 }
126
127 /**
128 * @param $spacing
129 */
130 function set_text_spacing($spacing)
131 {
132 $style = $this->_frame->get_style();
133
134 $this->_text_spacing = $spacing;
135 $char_spacing = (float)$style->length_in_pt($style->letter_spacing);
136
137 // Re-adjust our width to account for the change in spacing
138 $style->width = $this->_dompdf->getFontMetrics()->getTextWidth($this->get_text(), $style->font_family, $style->font_size, $spacing, $char_spacing);
139 }
140
141 /**
142 * Recalculate the text width
143 *
144 * @return float
145 */
146 function recalculate_width()
147 {
148 $style = $this->get_style();
149 $text = $this->get_text();
150 $size = $style->font_size;
151 $font = $style->font_family;
152 $word_spacing = (float)$style->length_in_pt($style->word_spacing);
153 $char_spacing = (float)$style->length_in_pt($style->letter_spacing);
154
155 return $style->width = $this->_dompdf->getFontMetrics()->getTextWidth($text, $font, $size, $word_spacing, $char_spacing);
156 }
157
158 // Text manipulation methods
159
160 /**
161 * split the text in this frame at the offset specified. The remaining
162 * text is added a sibling frame following this one and is returned.
163 *
164 * @param $offset
165 * @return Frame|null
166 */
167 function split_text($offset)
168 {
169 if ($offset == 0) {
170 return null;
171 }
172
173 $split = $this->_frame->get_node()->splitText($offset);
174 if ($split === false) {
175 return null;
176 }
177
178 $deco = $this->copy($split);
179
180 $p = $this->get_parent();
181 $p->insert_child_after($deco, $this, false);
182
183 if ($p instanceof Inline) {
184 $p->split($deco);
185 }
186
187 return $deco;
188 }
189
190 /**
191 * @param $offset
192 * @param $count
193 */
194 function delete_text($offset, $count)
195 {
196 $this->_frame->get_node()->deleteData($offset, $count);
197 }
198
199 /**
200 * @param $text
201 */
202 function set_text($text)
203 {
204 $this->_frame->get_node()->data = $text;
205 }
206 }