I am a current paying subscriber of the Spire.Doc components version # 5.5.141.
I too have the same problem with AppendPicture throwing the following error:
The type initializer for 'sprᩀ' threw an exception.
Method not found: 'Int32 sprἀ.ᜂ(Double)
This was previously working and now it is not. I haven't changed the code at all so I am not sure what this issue might be other than an update to Spire.Doc. The code is really simple and is as follows:
- Code: Select all
var document = new Document();
Section sectionMain = document.AddSection();
Paragraph paragraphMain = sectionMain.AddParagraph();
sectionMain.PageSetup.Margins.All = 0f;
Image iTemp = null;
iTemp = GlobalService.BytesToImage(template.PreviewBackImage);
iTemp = GlobalService.ResizeImage(iTemp, 600, 462);
paragraphMain.AppendPicture(iTemp);
I can confirm that iTemp is loaded properly and can be displayed on the screen without using Spire.Doc period. I am doing other stuff after the AppendPicture is why I am using Spire.Doc.
Please reply as soon as possible as we have updates to our software waiting on this fix.
Thanks,
Bo