Skip to content

Error with empty anchors #176

Description

@sven5

When html content contains an empty anchor like the following

<a title="something" href="#">some other thing</a>

an error is thrown:
The value cannot be null. Parameter name: elementId ( at TheArtOfDev.HtmlRenderer.Core.HtmlContainerInt.GetElementRectangle(String elementId) at TheArtOfDev.HtmlRenderer.PdfSharp.HtmlContainer.GetElementRectangle(String elementId) at TheArtOfDev.HtmlRenderer.PdfSharp.PdfGenerator.HandleLinks(PdfDocument document, HtmlContainer container, XSize orgPageSize, XSize pageSize) at TheArtOfDev.HtmlRenderer.PdfSharp.PdfGenerator.AddPdfPages(PdfDocument document, String html, PdfGenerateConfig config, CssData cssData, EventHandler1 stylesheetLoad, EventHandler1 imageLoad) at TheArtOfDev.HtmlRenderer.PdfSharp.PdfGenerator.GeneratePdf(String html, PageSize pageSize, Int32 margin, CssData cssData, EventHandler1 stylesheetLoad, EventHandler1 imageLoad)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions