Search code examples
phppdflaraveldom-node

Laravel thujohn/pdf ID already defined in DOM


I get this error while generating a pdf with the thoujohn/pdf library:

DOMNode::cloneNode(): ID doc-content already defined

I have my view with only one <div id="doc-content"> so i don't know what I'm missing.

My view does not extend any other layout, so sure there is no other html entities involved. The only other mention of this id is inside the <style> tag where i give this element its style.

Can someone guide me please?


Solution

  • I did a workaround by replacing the div's id by a class and reference this class in the style sheet.