printpdf
printpdf copied to clipboard
Some HTML tags cannot be parsed correctly
hello, I have some problem when use printpdf-0.8.2 。 html=r#"
this is printpdf "#
but I get :
Result::unwrap() on an Err value: "Error constructing DOM: Error rendering DOM: Unknown component: "br""
Yeah, the HTML parser is not really for production.
It doesn't know what the "br" tag corresponds to, i.e. internally it has "components" that take the node and generate a simplified layout for it, for example to transform
<ol>
<li>
<p></p>
</li>
</ol>
into
<div class='__internal__ol'>
<div class='__internal_li'>
<p></p>
</div>
</div>