ArthurHub / ArthurHub/HTML-Renderer
Error with empty anchors
- Lingua principale
- C#
- Stelle
- 1.4k
- Fork
- 550
- Merge medio
- 14g 9h
- PR unite (30g)
- 1
Descrizione
When html content contains an empty anchor like the following
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, EventHandler`1 stylesheetLoad, EventHandler`1 imageLoad)
at TheArtOfDev.HtmlRenderer.PdfSharp.PdfGenerator.GeneratePdf(String html, PageSize pageSize, Int32 margin, CssData cssData, EventHandler`1 stylesheetLoad, EventHandler`1 imageLoad)
`
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Reproduce the failure with the HTML anchor shown in the issue and trace the PDF link-handling path beginning at PdfGenerator.HandleLinks and HtmlContainer.GetElementRectangle. Check how the empty fragment href is passed as elementId; done means PDF generation completes without the null-parameter exception for this input.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp
- Ambito
- desktop-dev
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100