Server Error in '/' Application.

Index and length must refer to a location within the string.
Parameter name: length

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length]
   System.String.Substring(Int32 startIndex, Int32 length) +15054200
   Micado.Pdf.RenderingSupport._Closure$__40-0._Lambda$__0() +57
   Micado.Pdf.RenderingSupport.ParagraphRenderer.CreateBlocks() +421
   Micado.Pdf.RenderingSupport.ParagraphRenderer..ctor(String text, XFont font, XParagraphAlignment align, XRect layoutRectangle, Int32 overflowY, XBrush brush, XGraphics graphics, Boolean htmlEnabled, Double lineHeight, Double rotation, Double spaceCorrection) +490
   Micado.Pdf.Dom.Text.GetRenderer(XRect layoutRect, Double overflowY, XGraphics& graphics) +585
   Micado.Pdf.Dom.Document.RenderContainer(XGraphics graphics, IContainer container, Int32 pageIndex, XRect containerArea) +1102
   Micado.Pdf.Dom.Document.RenderContainer(XGraphics graphics, IContainer container, Int32 pageIndex, XRect containerArea) +6933
   Micado.Pdf.Dom.Document.RenderContainer(XGraphics graphics, IContainer container, Int32 pageIndex, XRect containerArea) +3783
   Micado.Pdf.Dom.Document.RenderWithPdfSharp(PdfDocument& doc, PdfDocument& template) +1090
   Micado.Pdf.Dom.Document.RenderToBytes() +136
   SchmiedeSteidl.Support.Product.StreamPDFToHTTPReponse() +1471
   SchmiedeSteidl.Support.HttpHandler.ProductHandler.ProcessRequest(HttpContext context) +91
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +790
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +195
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +88


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.4087.0