From 06e7b1c5c4d44d776dc6037c54a6d898cf5fc55d Mon Sep 17 00:00:00 2001 From: Dmitriy Detyuk Date: Thu, 12 Sep 2013 16:53:14 +0300 Subject: [PATCH 1/4] fixed issue "Fatal error: Class 'HTML5_Tokenizer' not found " when enable_html5parser option enabled --- src/DOMPDFModule/Service/DOMPDFFactory.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/DOMPDFModule/Service/DOMPDFFactory.php b/src/DOMPDFModule/Service/DOMPDFFactory.php index 40008de..f9519fe 100644 --- a/src/DOMPDFModule/Service/DOMPDFFactory.php +++ b/src/DOMPDFModule/Service/DOMPDFFactory.php @@ -107,7 +107,11 @@ public function createService(ServiceLocatorInterface $serviceLocator) define(static::$configCompatMapping[$key], $value); } - + + if ($config['enable_html5parser']) { + require_once DOMPDF_LIB_DIR . '/html5lib/Parser.php'; + } + require_once DOMPDF_INC_DIR . '/functions.inc.php'; require_once __DIR__ . '/../../../config/module.compat.php'; From a3924f8b0954011309c6e414459a6971a88cf0ff Mon Sep 17 00:00:00 2001 From: Dmitriy Detyuk Date: Wed, 18 Sep 2013 22:18:01 +0300 Subject: [PATCH 2/4] Update DOMPDFFactory.php just call require_once DOMPDF_LIB_DIR . '/html5lib/Parser.php'; for define HTML5_Tokenizer --- src/DOMPDFModule/Service/DOMPDFFactory.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/DOMPDFModule/Service/DOMPDFFactory.php b/src/DOMPDFModule/Service/DOMPDFFactory.php index f9519fe..7b98650 100644 --- a/src/DOMPDFModule/Service/DOMPDFFactory.php +++ b/src/DOMPDFModule/Service/DOMPDFFactory.php @@ -108,10 +108,7 @@ public function createService(ServiceLocatorInterface $serviceLocator) define(static::$configCompatMapping[$key], $value); } - if ($config['enable_html5parser']) { - require_once DOMPDF_LIB_DIR . '/html5lib/Parser.php'; - } - + require_once DOMPDF_LIB_DIR . "/html5lib/Parser.php"; require_once DOMPDF_INC_DIR . '/functions.inc.php'; require_once __DIR__ . '/../../../config/module.compat.php'; From 14820667e138f36f465b8e5227550dd9196f24f5 Mon Sep 17 00:00:00 2001 From: Dmitriy Detyuk Date: Wed, 18 Sep 2013 22:18:56 +0300 Subject: [PATCH 3/4] Update DOMPDFFactory.php --- src/DOMPDFModule/Service/DOMPDFFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DOMPDFModule/Service/DOMPDFFactory.php b/src/DOMPDFModule/Service/DOMPDFFactory.php index 7b98650..be78f48 100644 --- a/src/DOMPDFModule/Service/DOMPDFFactory.php +++ b/src/DOMPDFModule/Service/DOMPDFFactory.php @@ -108,7 +108,7 @@ public function createService(ServiceLocatorInterface $serviceLocator) define(static::$configCompatMapping[$key], $value); } - require_once DOMPDF_LIB_DIR . "/html5lib/Parser.php"; + require_once DOMPDF_LIB_DIR . '/html5lib/Parser.php'; require_once DOMPDF_INC_DIR . '/functions.inc.php'; require_once __DIR__ . '/../../../config/module.compat.php'; From ea2738b9ff964915fc246047fae46d8500babc7b Mon Sep 17 00:00:00 2001 From: Dmitriy Detyuk Date: Wed, 18 Sep 2013 22:18:01 +0300 Subject: [PATCH 4/4] Update DOMPDFFactory.php just call require_once DOMPDF_LIB_DIR . '/html5lib/Parser.php'; for define HTML5_Tokenizer --- src/DOMPDFModule/Service/DOMPDFFactory.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/DOMPDFModule/Service/DOMPDFFactory.php b/src/DOMPDFModule/Service/DOMPDFFactory.php index f9519fe..be78f48 100644 --- a/src/DOMPDFModule/Service/DOMPDFFactory.php +++ b/src/DOMPDFModule/Service/DOMPDFFactory.php @@ -108,10 +108,7 @@ public function createService(ServiceLocatorInterface $serviceLocator) define(static::$configCompatMapping[$key], $value); } - if ($config['enable_html5parser']) { - require_once DOMPDF_LIB_DIR . '/html5lib/Parser.php'; - } - + require_once DOMPDF_LIB_DIR . '/html5lib/Parser.php'; require_once DOMPDF_INC_DIR . '/functions.inc.php'; require_once __DIR__ . '/../../../config/module.compat.php';