^ null
Unable to get the size of the image [/images/astucesInfo/bg-doc-interne.png] (500 Internal Server Error)

Symfony Exception

ImageException

HTTP 500 Internal Server Error

Unable to get the size of the image [/images/astucesInfo/bg-doc-interne.png]

Exception

Spipu\Html2Pdf\Exception\ ImageException

  1.         dump($this->parsingCss->checkValidPath($src));
  2.         // if the image does not exist, or can not be loaded
  3.         if (!is_array($infos) || count($infos)<2) {
  4.             if ($this->_testIsImage) {
  5.                 $e = new ImageException('Unable to get the size of the image ['.$src.']');
  6.                 $e->setImage($src);
  7.                 throw $e;
  8.             }
  9.             // display a gray rectangle
in vendor/spipu/html2pdf/src/Html2Pdf.php->_drawImage (line 5783)
  1.         $this->parsingCss->value['background'] = array('color' => null'image' => null'position' => null'repeat' => null);
  2.         $this->parsingCss->analyse('img'$param);
  3.         $this->parsingCss->setPosition();
  4.         $this->parsingCss->fontSet();
  5.         $res $this->_drawImage($src, isset($param['sub_li']));
  6.         if (!$res) {
  7.             return $res;
  8.         }
in vendor/spipu/html2pdf/src/Html2Pdf.php->_tag_open_IMG (line 1439)
  1.                 $res $tagObject->close($properties);
  2.             } else {
  3.                 $res $tagObject->open($properties);
  4.             }
  5.         } elseif (is_callable(array($this$fnc))) {
  6.             $res $this->{$fnc}($properties);
  7.         } else {
  8.             $e = new HtmlParsingException(
  9.                 'The html tag ['.$action->getName().'] is not known by Html2Pdf. '.
  10.                 'You can create it and push it on the Html2Pdf GitHub project.'
  11.             );
in vendor/spipu/html2pdf/src/Html2Pdf.php->_executeAction (line 1393)
  1.                 $this->_tempPos $this->_parsePos;
  2.                 // foreach elements, while we are in the opened tag
  3.                 while (isset($this->parsingHtml->code[$this->_tempPos]) && !($this->parsingHtml->code[$this->_tempPos]->getName() == $tagOpen && $this->parsingHtml->code[$this->_tempPos]->isClose())) {
  4.                     // make the action
  5.                     $this->_executeAction($this->parsingHtml->code[$this->_tempPos]);
  6.                     $this->_tempPos++;
  7.                 }
  8.                 // execute the closure of the tag
  9.                 if (isset($this->parsingHtml->code[$this->_tempPos])) {
in vendor/spipu/html2pdf/src/Html2Pdf.php->_makeHTMLcode (line 595)
  1.     public function writeHTML($html)
  2.     {
  3.         $html $this->parsingHtml->prepareHtml($html);
  4.         $html $this->parsingCss->extractStyle($html);
  5.         $this->parsingHtml->parse($this->lexer->tokenize($html));
  6.         $this->_makeHTMLcode();
  7.         return $this;
  8.     }
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>') in src/Service/PdfGenerator.php (line 36)
  1.         );
  2.     }
  3.     public function generatePdf($template$name)
  4.     {
  5.       $this->pdf->writeHTML($template);
  6.       return $this->pdf->Output($name.'.pdf');
  7.     }
  8. }
PdfGenerator->generatePdf(object(Response), 'test PDF') in src/Controller/BlogController.php (line 48)
  1.         $oTemplate $this->render('blog/infoAstuces/divers/pdf.html.twig');
  2.         $oHtml2pdf = new PdfGenerator('P''A4''fr'true'UTF-8', array(10151015));
  3.         $oHtml2pdf->create('P''A4''fr'true'UTF-8', array(10151015));
  4.       return $oHtml2pdf->generatePdf($oTemplate"test PDF");
  5.     }
  6. }
in vendor/symfony/http-kernel/HttpKernel.php->generatePdfAction (line 158)
  1.         $this->dispatcher->dispatch($eventKernelEvents::CONTROLLER_ARGUMENTS);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response $controller(...$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new ViewEvent($this$request$type$response);
  9.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  1.     public function handle(Request $request$type HttpKernelInterface::MASTER_REQUEST$catch true)
  2.     {
  3.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
Kernel->handle(object(Request)) in public/index.php (line 35)
  1. }
  2. /*$kernel = new Kernel($_SERVER['APP_ENV'] ?? 'dev', $_SERVER['APP_DEBUG'] ?? ('prod' !== ($_SERVER['APP_ENV'] ?? 'dev')));*/
  3. $kernel = new Kernel($_SERVER['APP_ENV'] ?? 'prod'$_SERVER['APP_DEBUG'] ?? false);
  4. $request Request::createFromGlobals();
  5. $response $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request$response);
  8.  

Stack Trace

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

&lt;page style=&quot;font-size: 10pt&quot;&gt;    &lt;p&gt;        Bonjour, ceci est un test &lt;b&gt;de gras&lt;/b&gt;, &lt;i&gt;d\'italic&lt;/i&gt;, &lt;b&gt;&lt;i&gt;et des 2 ensembles&lt;/i&gt;&lt;/b&gt;.&lt;br&gt;    &lt;/p&gt;    &lt;table style=&quot;background: #000022; color: #000022; border: 3px solid #555555;&quot;&gt;        &lt;img style=&quot;height:100%;width:100%&quot; src=&quot;/images/astucesInfo/bg-doc-interne.png&quot;/&gt;        &lt;tr&gt;            &lt;td style=&quot;width: 40mm; border: solid 1px #000000; color: #003300&quot;&gt;Case A1&lt;/td&gt;            &lt;td style=&quot;width: 50mm; border: solid 1px #000000;font-weight: bold;&quot;&gt;Case A2&lt;/td&gt;            &lt;td style=&quot;width: 60mm; border: solid 1px #000000;font-size: 20px;&quot;&gt;Case A3&lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td style=&quot;border: solid 1px #000000; text-align: left;vertical-align: top; &quot;&gt;Case B1&lt;/td&gt;            &lt;td style=&quot;border: solid 1px #000000; text-align: center;vertical-align: middle; height: 20mm&quot;&gt;Case B2&lt;hr style=&quot;color: #22AA22&quot;&gt;test de hr&lt;/td&gt;            &lt;td style=&quot;border: solid 1px #000000; text-align: right;  vertical-align: bottom; border-radius: 3mm; &quot;&gt;Case B3&lt;/td&gt;        &lt;/tr&gt;    &lt;/table&gt;&lt;/page&gt;')
     (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)