System.TypeInitializationException on loading image to DOC

Technical support for Spire.Doc

Moderator: iceblue support

Re: System.TypeInitializationException on loading image to D

Postby Betsy » Fri Mar 27, 2015 3:24 am

Hello,

I have read your last post and know the problem error/exception still happened on your side, but I failed to reproduce the issue on our side, so I provide you the test project to see if it can work on your side. How is it?
Can you please provide the dedicated test project you created and your system environment information for us?

Thanks,
Betsy
E-iceblue support team
User avatar
Betsy
 
Posts: 804
Joined: Mon Jan 19, 2015 6:14 am

Re: System.TypeInitializationException on loading image to D

Postby manrysj » Sat Oct 31, 2015 12:41 pm

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
manrysj
 
Posts: 2
Joined: Wed Feb 18, 2015 11:26 pm

Re: System.TypeInitializationException on loading image to D

Postby amy.zhao » Mon Nov 02, 2015 3:12 am

Hi,

Thanks for your inquiry.
Please ensure all Spire.PDF.dll, Spire.Doc.dll and Spire.License.dll in your project have been updated to new version.
If you still have the issue after did it, please provide us your project to help us recreate it and resolve it soon, you can also send it to amy.zhao@e-iceblue.com
Thank you.

Best Regards,
Amy
E-iceblue support team
User avatar
amy.zhao
 
Posts: 2195
Joined: Wed Jun 27, 2012 8:50 am

Re: System.TypeInitializationException on loading image to D

Postby amy.zhao » Fri Nov 06, 2015 7:51 am

Hi,

Has your issue been resolved?
Thanks for your feedback.

Best Regards,
Amy
E-iceblue support team
User avatar
amy.zhao
 
Posts: 2195
Joined: Wed Jun 27, 2012 8:50 am

Re: System.TypeInitializationException on loading image to D

Postby manrysj » Thu Nov 12, 2015 2:06 pm

Thanks for the follow-up Amy!

I did check everything that you mentioned and I don't recall being able to get it to work. So, I went a different direction with this piece of the project. I am still using your product but for what I was trying to do I am not.

Thanks,

Bo
manrysj
 
Posts: 2
Joined: Wed Feb 18, 2015 11:26 pm

Re: System.TypeInitializationException on loading image to D

Postby amy.zhao » Fri Nov 13, 2015 1:42 am

Hi,

Thanks for your reply. Please feel free to write us if you have any problems when you use our products. We are here to help you.

Best Regards,
Amy
E-iceblue support team
User avatar
amy.zhao
 
Posts: 2195
Joined: Wed Jun 27, 2012 8:50 am

Re: System.TypeInitializationException on loading image to D

Postby dongdiem94 » Sat Jul 01, 2017 3:17 pm

I'm using free Spire.Office
Please support fix issue:

An unhandled exception of type 'System.TypeInitializationException' occurred in Spire.XLS.dll
Additional information: The type initializer for 'spr601' threw an exception.

Thanks!
dongdiem94
 
Posts: 1
Joined: Sat Jul 01, 2017 2:58 pm

Re: System.TypeInitializationException on loading image to D

Postby Betsy.jiang » Mon Jul 03, 2017 5:42 am

Dear dongdiem94,

Sorry for late reply as weekend.
Please tell us where you got the exception and offer us the input files and the code you were using for testing.

Thanks,
Betsy
E-iceblue support team
User avatar
Betsy.jiang
 
Posts: 1321
Joined: Tue Sep 06, 2016 8:30 am

Re: System.TypeInitializationException on loading image to D

Postby Betsy.jiang » Tue Jul 04, 2017 7:25 am

Dear dongdiem94,

How is the issue now ?
Could you please give us some feedback at your convenience ?

Thanks,
Betsy
E-iceblue support team
User avatar
Betsy.jiang
 
Posts: 1321
Joined: Tue Sep 06, 2016 8:30 am

Previous

Return to Spire.Doc

Who is online

Users browsing this forum: No registered users and 1 guest