The code looks like this: spireDoc.SaveToFile(outputFile + ".docx", FileFormat.Docx2010);
The error exception looks like this:
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. at System.Collections.Generic.Dictionary`2.get_Item(TKey key) at ck.b(nm A_0) at ck.c(nm A_0) at ck.i(ParagraphBase A_0) at ck.c(Paragraph A_0) at ck.a(Paragraph A_0, Boolean A_1) at ck.e(TableCell A_0) at ck.a(CellCollection A_0) at ck.a(TableRow A_0, Boolean A_1, Boolean A_2) at ck.a(RowCollection A_0) at ck.f(Table A_0) at ck.a(BodyRegionCollection A_0, Boolean A_1) at ck.h(Section A_0) at ck.ai() at ck.ap() at ck.a(Stream A_0, Document A_1) at Spire.Doc.Document.SaveToFile(Stream stream, FileFormat fileFormat)
I have attached a zip file with the offending document template. <PlaceHolders> in this document are replaced using SpireDoc.Replace function before calling SaveToFile
We are using Spire.Doc version 4.4.30
A prompt resolution would be greatly appreciated
p.s. when I tried to upgrade to the latest version (4.5), I got the 3 compilation errors below:
'Spire.Doc.FileFormat' does not contain a definition for 'PDF'
'Spire.Doc.Document' does not contain a definition for 'SaveToImages' and no extension method 'SaveToImages' accepting a first argument of type 'Spire.Doc.Document' could be found (are you missing a using directive or an assembly reference?)
'Spire.Doc.FileFormat' does not contain a definition for 'Html'