diff --git a/application/Espo/Tools/Pdf/Tcpdf/TcpdfCollectionPrinter.php b/application/Espo/Tools/Pdf/Tcpdf/TcpdfCollectionPrinter.php index c2621fa90f..85d4a8c21e 100644 --- a/application/Espo/Tools/Pdf/Tcpdf/TcpdfCollectionPrinter.php +++ b/application/Espo/Tools/Pdf/Tcpdf/TcpdfCollectionPrinter.php @@ -30,8 +30,6 @@ namespace Espo\Tools\Pdf\Tcpdf; use Espo\Core\{ - Utils\Config, - Htmlizer\Factory as HtmlizerFactory, Pdf\Tcpdf, }; @@ -48,15 +46,9 @@ class TcpdfCollectionPrinter implements CollectionPrinter { protected $entityProcessor; - protected $config; - protected $htmlizerFactory; - - public function __construct(Config $config, HtmlizerFactory $htmlizerFactory) + public function __construct(EntityProcessor $entityProcessor) { - $this->config = $config; - $this->htmlizerFactory = $htmlizerFactory; - - $this->entityProcessor = new EntityProcessor($config, $htmlizerFactory); + $this->entityProcessor = $entityProcessor; } public function print(Template $template, Collection $collection, Data $data) : Contents diff --git a/application/Espo/Tools/Pdf/Tcpdf/TcpdfEntityPrinter.php b/application/Espo/Tools/Pdf/Tcpdf/TcpdfEntityPrinter.php index 470cc04387..1de50714b8 100644 --- a/application/Espo/Tools/Pdf/Tcpdf/TcpdfEntityPrinter.php +++ b/application/Espo/Tools/Pdf/Tcpdf/TcpdfEntityPrinter.php @@ -30,8 +30,6 @@ namespace Espo\Tools\Pdf\Tcpdf; use Espo\Core\{ - Utils\Config, - Htmlizer\Factory as HtmlizerFactory, Pdf\Tcpdf, }; @@ -47,15 +45,9 @@ class TcpdfEntityPrinter implements EntityPrinter { protected $entityProcessor; - protected $config; - protected $htmlizerFactory; - - public function __construct(Config $config, HtmlizerFactory $htmlizerFactory) + public function __construct(EntityProcessor $entityProcessor) { - $this->config = $config; - $this->htmlizerFactory = $htmlizerFactory; - - $this->entityProcessor = new EntityProcessor($config, $htmlizerFactory); + $this->entityProcessor = $entityProcessor; } public function print(Template $template, Entity $entity, Data $data) : Contents