Welcome Guest Search | Active Topics | Sign In | Register

NullReferenceException in v2026 with GenerateTags=true and base64 encoded image Options
Talogy Development
Posted: Thursday, February 5, 2026 5:25:16 PM
Rank: Newbie
Groups: Member

Joined: 5/24/2019
Posts: 7
There is a bug in the 26.x.x versions of EO.PDF that is throwing a NullReferenceException when your code has GenerateTags=true and the HTML includes a base64 encoded string. This is not happening if we downgrade back to the latest 25.x.x version. Here is a simple code snippet to reproduce (sorry about the escaping on the html tags):

Code: C#
using var outputStream = new MemoryStream();
var doc1 = new EO.Pdf.PdfDocument();
string html = @"
<html>
<body>
<img  src=""data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAEElEQVR4nGI68pkTEAAA//8ERwHDHBUFcAAAAABJRU5ErkJggg==""
/>
</body>
</html>
";
HtmlToPdf.ConvertHtml(html, doc1, new HtmlToPdfOptions { GenerateTags = true });

// NullReferenceException thrown
doc1.Save(outputStream);


Please confirm the defect and let us know when it can be expected to be fixed.
eo_support
Posted: Friday, February 6, 2026 12:14:51 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,460
Thanks for letting us know. We have found the root of the problem. This will be fixed in our next build and we will reply here again when the new build is available.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.