Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with empty anchors #176

Open
sven5 opened this issue Oct 2, 2020 · 0 comments
Open

Error with empty anchors #176

sven5 opened this issue Oct 2, 2020 · 0 comments

Comments

@sven5
Copy link

sven5 commented Oct 2, 2020

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant