Hello I’m facing an error when trying to generate a pdf from HTML using dompdf with laravel,
and is give me an error on this path:
…vendordompdfdompdflibhtml5libTreeBuilder.php3203
more specificaly on insertElement function:
> private function insertElement($token, $append = true) {
$el = $this->dom->createElementNS(self::NS_HTML, $token['name']);
if (!empty($token['attr'])) {
foreach ($token['attr'] as $attr) {
if (!$el->hasAttribute($attr['name']) && preg_match("/^[a-zA-Z_:]/", $attr['name'])) {
$el->setAttribute($attr['name'], $attr['value']);
}
}
}
if ($append) {
$this->appendToRealParent($el);
$this->stack[] = $el;
}
return $el;
}
and I have on DB styles to display on HTML attribute like:
<ul style='box-sizing: border-box; margin-top: 0px; margin-bottom: 8.5px; color: rgb(112, 109, 109); font-family: "Noto Sans", sans-serif, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;'><li style="box-sizing: border-box;">Analyse du besoin en tenant compte des exigences internes et réglementaires</li><li style="box-sizing: border-box;">Mise en oeuvre du cahier des charges</li><li style="box-sizing: border-box;">Proposition des solutions techniques pour les applications répondant au cahier des charges</li><li style="box-sizing: border-box;">Respect de la planification du projet de développement et participation aux réunion projets d'état d’avancement</li><li style="box-sizing: border-box;">Conception du prototype,programmation,Réalisation des interfaces et création des bases de données</li><li style="box-sizing: border-box;">Élaboration des protocoles d'essais et réalisation des tests</li><li style="box-sizing: border-box;">Réalisation des notices techniques et des guides d'installation et d'utilisation</li><li style="box-sizing: border-box;">Traitement des anomalies de fonctionnement et résolutions des problèmes</li><li style="box-sizing: border-box;">Maintenance des applications dont suivi des modifications ou évolutions.</li></ul>
I’am using:
“php”: “>=7.0.0”,
“barryvdh/laravel-dompdf”: “^0.8.2”,
if someone have an idea please you can contribute here and thanks
Best regard