Welcome to the ASP.NET MVC feedback portal. We’re happy you’re here! If you have feedback on how to improve the ASP.NET MVC, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

I noticed this bug while trying to convert a Docx document to PDF. The Docx is generated from a template that is filled in by the end user. In this instance I had a field that contained the value:

\r\n------------\r\n


It seems that whenever there's a string terminated by a newline in the Docx, some string-splitting logic fails and results in a null reference exception. Here's the stack trace:

   at 
Syncfusion.DocIO.DLS.WTextFormField.SetTextRangeValue(WTextRange 
textRange)
   at 
Syncfusion.DocIO.DLS.WParagraph.SplitByLineBreak(ParagraphItemCollection
 paraItems)
   at 
Syncfusion.DocIO.DLS.WidgetBase.Syncfusion.Layouting.IWidget.get_LayoutInfo()
   at Syncfusion.Layouting.LCContainer.CreateNextChildContext()
   at Syncfusion.Layouting.LCContainer.Layout(RectangleF rect)
   at Syncfusion.Layouting.LCTable.LayoutCell(LayoutContext 
childContext, RectangleF cellArea, Boolean isSkip)
   at Syncfusion.Layouting.LCTable.LayoutRow(IWidget rowWidget)
   at Syncfusion.Layouting.LCTable.Layout(RectangleF rect)
   at Syncfusion.Layouting.LCContainer.DoLayoutChild(LayoutContext 
childContext)
   at Syncfusion.Layouting.LCContainer.Layout(RectangleF rect)
   at Syncfusion.Layouting.LCContainer.DoLayoutChild(LayoutContext 
childContext)
   at Syncfusion.Layouting.LCContainer.Layout(RectangleF rect)
   at Syncfusion.Layouting.Layouter.Layout(IWidgetContainer widget, 
ILayoutProcessHandler handler, IDrawingContext dc, Int32 currPageIndex)
   at Syncfusion.DocIO.DLS.Rendering.DocumentLayouter.LayoutPages()
   at 
Syncfusion.DocIO.DLS.Rendering.DocumentLayouter.Layout(IWordDocument 
doc)
   at Syncfusion.DocIORenderer.DocIORenderer.ConvertToPDF(WordDocument 
wordDocument)
   at Horsa.Reporting.Docx.DocxProcessor.ToPdf(String inputDocx, String 
outputPdf, Boolean overwrite)


Since my problem is fixed by sanitizing the user's input, I do not require further assistance on this matter.