^ null
dump($this->parsingCss->checkValidPath($src)); // if the image does not exist, or can not be loaded if (!is_array($infos) || count($infos)<2) { if ($this->_testIsImage) { $e = new ImageException('Unable to get the size of the image ['.$src.']'); $e->setImage($src); throw $e; } // display a gray rectangle $this->parsingCss->value['background'] = array('color' => null, 'image' => null, 'position' => null, 'repeat' => null); $this->parsingCss->analyse('img', $param); $this->parsingCss->setPosition(); $this->parsingCss->fontSet(); $res = $this->_drawImage($src, isset($param['sub_li'])); if (!$res) { return $res; } $res = $tagObject->close($properties); } else { $res = $tagObject->open($properties); } } elseif (is_callable(array($this, $fnc))) { $res = $this->{$fnc}($properties); } else { $e = new HtmlParsingException( 'The html tag ['.$action->getName().'] is not known by Html2Pdf. '. 'You can create it and push it on the Html2Pdf GitHub project.' ); $this->_tempPos = $this->_parsePos; // foreach elements, while we are in the opened tag while (isset($this->parsingHtml->code[$this->_tempPos]) && !($this->parsingHtml->code[$this->_tempPos]->getName() == $tagOpen && $this->parsingHtml->code[$this->_tempPos]->isClose())) { // make the action $this->_executeAction($this->parsingHtml->code[$this->_tempPos]); $this->_tempPos++; } // execute the closure of the tag if (isset($this->parsingHtml->code[$this->_tempPos])) { $this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS); $controller = $event->getController(); $arguments = $event->getArguments(); // call controller $response = $controller(...$arguments); // view if (!$response instanceof Response) { $event = new ViewEvent($this, $request, $type, $response); $this->dispatcher->dispatch($event, KernelEvents::VIEW); public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) { $request->headers->set('X-Php-Ob-Level', (string) ob_get_level()); try { return $this->handleRaw($request, $type); } catch (\Exception $e) { if ($e instanceof RequestExceptionInterface) { $e = new BadRequestHttpException($e->getMessage(), $e); } if (false === $catch) {}/*$kernel = new Kernel($_SERVER['APP_ENV'] ?? 'dev', $_SERVER['APP_DEBUG'] ?? ('prod' !== ($_SERVER['APP_ENV'] ?? 'dev')));*/$kernel = new Kernel($_SERVER['APP_ENV'] ?? 'prod', $_SERVER['APP_DEBUG'] ?? false);$request = Request::createFromGlobals();$response = $kernel->handle($request);$response->send();$kernel->terminate($request, $response);
ImageException |
|---|
Spipu\Html2Pdf\Exception\ImageException:
Unable to get the size of the image [/images/astucesInfo/bg-doc-interne.png]
at vendor/spipu/html2pdf/src/Html2Pdf.php:1524
at Spipu\Html2Pdf\Html2Pdf->_drawImage('/images/astucesInfo/bg-doc-interne.png', false)
(vendor/spipu/html2pdf/src/Html2Pdf.php:5783)
at Spipu\Html2Pdf\Html2Pdf->_tag_open_IMG(array('style' => array('height' => '100%', 'width' => '100%'), 'alt' => '', 'src' => '/images/astucesInfo/bg-doc-interne.png', 'num' => 1))
(vendor/spipu/html2pdf/src/Html2Pdf.php:1439)
at Spipu\Html2Pdf\Html2Pdf->_executeAction(object(Node))
(vendor/spipu/html2pdf/src/Html2Pdf.php:1393)
at Spipu\Html2Pdf\Html2Pdf->_makeHTMLcode()
(vendor/spipu/html2pdf/src/Html2Pdf.php:595)
at Spipu\Html2Pdf\Html2Pdf->writeHTML('HTTP/1.0 200 OK
Cache-Control: no-cache, private
Date: Wed, 19 Aug 2026 16:06:29 GMT
<page style="font-size: 10pt"> <p> Bonjour, ceci est un test <b>de gras</b>, <i>d\'italic</i>, <b><i>et des 2 ensembles</i></b>.<br> </p> <table style="background: #000022; color: #000022; border: 3px solid #555555;"> <img style="height:100%;width:100%" src="/images/astucesInfo/bg-doc-interne.png"/> <tr> <td style="width: 40mm; border: solid 1px #000000; color: #003300">Case A1</td> <td style="width: 50mm; border: solid 1px #000000;font-weight: bold;">Case A2</td> <td style="width: 60mm; border: solid 1px #000000;font-size: 20px;">Case A3</td> </tr> <tr> <td style="border: solid 1px #000000; text-align: left;vertical-align: top; ">Case B1</td> <td style="border: solid 1px #000000; text-align: center;vertical-align: middle; height: 20mm">Case B2<hr style="color: #22AA22">test de hr</td> <td style="border: solid 1px #000000; text-align: right; vertical-align: bottom; border-radius: 3mm; ">Case B3</td> </tr> </table></page>')
(src/Service/PdfGenerator.php:36)
at App\Service\PdfGenerator->generatePdf(object(Response), 'test PDF')
(src/Controller/BlogController.php:48)
at App\Controller\BlogController->generatePdfAction()
(vendor/symfony/http-kernel/HttpKernel.php:158)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
(vendor/symfony/http-kernel/HttpKernel.php:80)
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
(vendor/symfony/http-kernel/Kernel.php:201)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(public/index.php:35)
|