I am currently evaluating your Spire Doc for .NET. The code to implement seems simple enough, but I keep getting object reference errors. I am running on the latest hot fix/patch release 4.7.12. The Word .DOCM document has form fields in it.
My code is:
// LOAD WORD DOCUMENT
Spire.Doc.Document doc = new Spire.Doc.Document();
doc.LoadFromFile(path1);
// CONVERT FROM WORD TO PDF
doc.SaveToFile(path2, FileFormat.PDF);
When doc.SaveToFile() is called I get an object reference error:
Object reference not set to an instance of an object.
at Spire.Doc.Fields.DocPicture.CreateLayoutInfo()
at Spire.Doc.DocumentBase.Spire.Doc.Layout.IDocumentBase.get_LayoutInfo()
at ᣙ.ᜃ()
at ᣙ.ᜀ(RectangleF A_0)
at .ᜃ(ᧉ A_0)
at ᣙ.ᜀ(RectangleF A_0)
at ᣙ.ᜃ(ᧉ A_0)
at ᣙ.ᜀ(RectangleF A_0)
at ᣙ.ᜃ(ᧉ A_0)
at ᣙ.ᜀ(RectangleF A_0)
at ឬ.ᜀ(ᤶ A_0, ផ A_1, ᝀ A_2)
at ᤜ.ᜒ()
at ᤜ.ᜁ(IDocument A_0)
at ᤈ.ᜀ(Document A_0)
at Spire.Doc.Document.ᜂ(String A_0)
at Spire.Doc.Document.SaveToFile(String fileName, FileFormat fileFormat)
at CMIS.BLLayer.CaseDocument.ConvertToPdf(CaseDocument document, String& path) in C:\<my class path>.cs:line 422