Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Mon Jun 05, 2023 3:22 am

Hi support,

I already sent an email regarding this 2 days ago, but we haven't heard back. We are receiving evaluation warning despite purchasing new license for Spire.Office. Here is a snippet of code below to show that it's working for excel (Therefore the license is correct, but not for Spire Doc). Can you please help?

Version: Spire.Office 8.5.3
.Net 7.0

Code: Select all
       
        var xls2 = new Workbook();
        xls2.LoadFromFile($"{path}/b.xlsx");
        xls2.SaveToFile($"{path}/b{DateTime.Now.Ticks}.xlsx");
        // As expected, it generated a spreadsheet with evaluation

        Spire.License.LicenseProvider.SetLicenseKey($"{licenseKey}");
        var xls = new Workbook();
        xls.LoadFromFile($"{path}/a.xlsx");
        xls.SaveToFile($"{path}/a{DateTime.Now.Ticks}.xlsx");
        // As expected, it generated a spreadsheet without evaluation

        var document = new Document($"{path}/a.docx");
        document.SaveToFile($"{path}/a{DateTime.Now.Ticks}.docx");
        // Error here. It's including evaluation

salam.morcos
 
Posts: 3
Joined: Wed Oct 13, 2021 9:36 pm

Mon Jun 05, 2023 3:34 am

Hello,

Thanks for your inquiry.

For the cause to your license issue, this is due to changes in our product structure, and we apologize for that.
Please use the following lines of code to authorize the entire Spire.Office package.
Code: Select all
Spire.Doc.License.LicenseProvider.SetLicenseKey(theKeyForSpireOffice);  // License the Spire.Doc.dll
Spire.Pdf.License.LicenseProvider.SetLicenseKey (theKeyForSpireOffice); // License the Spire.Pdf.dll
Spire.DocViewer.License.LicenseProvider.SetLicenseKey(theKeyForSpireOffice); //License the Spire.DocViewer.dll
Spire.License.LicenseProvider.SetLicenseKey(theKeyForSpireOffice);  // License the other Dlls

In the new version, Spire.Doc.dll and Spire.DocViewer.dll products no longer depend on Spire.Pdf.dll. When using the functionality of Spire.Doc.dll and Spire.DocViewer.dll products, you need to call their application authorization methods separately.
We apologize again for any inconvenience caused.
Thank you for your understanding.

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 3011
Joined: Wed Jun 27, 2012 8:50 am

Mon Jun 05, 2023 3:35 am

I already received a response. Thanks e-Iceblue.

We have to use the following code:

Code: Select all
Spire.Doc.License.LicenseProvider.SetLicenseKey(theKeyForSpireOffice);  // License the Spire.Doc.dll
Spire.Pdf.License.LicenseProvider.SetLicenseKey (theKeyForSpireOffice); // License the Spire.Pdf.dll
Spire.DocViewer.License.LicenseProvider.SetLicenseKey(theKeyForSpireOffice); //License the Spire.DocViewer.dll
Spire.License.LicenseProvider.SetLicenseKey(theKeyForSpireOffice);  // License the other Dlls

salam.morcos
 
Posts: 3
Joined: Wed Oct 13, 2021 9:36 pm

Mon Jun 05, 2023 3:42 am

Thanks for your feedback.

Feel free to contact us if you need any assistance.

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 3011
Joined: Wed Jun 27, 2012 8:50 am

Mon Jun 05, 2023 4:03 am

We tested your code, but the following lines don't work:

Code: Select all
Spire.Pdf.License.LicenseProvider.SetLicenseKey (theKeyForSpireOffice); // License the Spire.Pdf.dll
Spire.DocViewer.License.LicenseProvider.SetLicenseKey(theKeyForSpireOffice); //License the Spire.DocViewer.dll


Luckily, the 2 lines below were sufficient for Xls, Doc and Pdf. Thanks again.

Code: Select all
Spire.Doc.License.LicenseProvider.SetLicenseKey(theKeyForSpireOffice);  // License the Spire.Doc.dll
Spire.License.LicenseProvider.SetLicenseKey(theKeyForSpireOffice);  // License the other Dlls

salam.morcos
 
Posts: 3
Joined: Wed Oct 13, 2021 9:36 pm

Mon Jun 05, 2023 5:39 am

Thank you very much for your further feedback.

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 3011
Joined: Wed Jun 27, 2012 8:50 am

Mon Jun 05, 2023 5:39 am

Thank you very much for your further feedback.

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 3011
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.Doc