Hello!
I've installed a trial version of Spire.Office. I am using Spire.Xls and Spire.Doc in a web application that I have created with Visual Studio 2015. It runs fine locally, but I am getting a "Parameter is not valid" error running from our web server. The stack trace indicates that the error occurs on a call to the SaveToImages method:
at spr5315.0(PageSetup A_0, ImageType A_1, MemoryStream A_2, Int32 A_3, GraphicsUnit A_4)
at spr5315.0(PageSetup A_0, ImageType A_1, MemoryStream A_2, Int32 A_3)
at spr5315.18()
at spr5315.1(IDocument A_0)
at spr6628.0(Int32 A_0, Document A_1, ImageFormat A_2)
at Spire.Doc.Document.SaveToImages(Int32 pageIndex, ImageFormat imageFormat)
at csi_projects.courtroomsciences.com.Entrenchment.CreateEntrenchmentPage(Int64 projectID, Int64 surveyID, String reportDescription, Int32 questionNumber) in C:\Source\Web\Sites\csi-project.courtroomsciences.com\csi-projects.courtroomsciences.com\Entrenchment.aspx.cs:line 336
This is the section of code that appears to be the problem:
Spire.Doc.Document sd = new Spire.Doc.Document();
sd.Document.LoadFromFile(docPath, Spire.Doc.FileFormat.Docx);
Drawing.Image image = Drawing.Image.FromStream(sd.SaveToImages(0, Drawing.Imaging.ImageFormat.Png));
Any suggestions would be greatly appreciated!
Thanks,
Bill Logan