If the text box contains a background image (stretched to fill, or tiled) a NullReferenceException is thrown when, for example,
- Code: Select all
var docx = new Document(docxFilePath, FileFormat.Docx2013)
A solid color works. A gradient fill doesn't throw an error but the background is transparent when saved to either a DOCX or PDF file.
Please let me know if there's any other information I can provide to help repro the issue.
- Code: Select all
Object reference not set to an instance of an object.
at spr2727.2(String A_0)
at spr2377.1(spr1664 A_0, spr1209 A_1)
at spr2377.1(spr1209 A_0, spr1664 A_1)
at spr2377.1(spr1209 A_0)
at spr2377.2(spr1209 A_0)
at spr1503.5(MemoryStream A_0)
at spr1503.0(MemoryStream A_0, MemoryStream A_1)
at spr1503.0(XmlReader A_0, ParagraphItemCollection A_1, MemoryStream A_2)
at spr1503.8(XmlReader A_0, ParagraphItemCollection A_1)
at spr1503.16(XmlReader A_0, ParagraphItemCollection A_1)
at spr1503.14(XmlReader A_0, IDocumentObject A_1)
at spr1503.13(Stream A_0)
at spr1503.1(spr395 A_0)
at spr1503.1(Document A_0)
at spr1503.1(Stream A_0, Document A_1)
at spr1503.0(String A_0, Document A_1)
at Spire.Doc.Document.16(String A_0)
at Spire.Doc.Document.LoadFromFile(String fileName, FileFormat fileFormat, String password)
at Spire.Doc.Document..ctor(String fileName, FileFormat type)
at SampleProject.SampleForm.LoadTemplate(String templateFilename) in C:\src\sample-project\SampleForm.cs:line 42