Spire.PDFViewer is a powerful PDF Viewer component for .NET. It allows developers to load PDF document from stream, file and byte array.

Sat Jan 24, 2026 9:01 pm

I'm using Visual Studio 2022. It's a winforms app, .net framework 4.8.1
I have a Spire Office for Net license. I'm getting the Evaluation warning with PDF Viewer, the other libraries are working fine.

There is a snapshot of my references attached

this is the code for the licenses

    string key=<key here>
Spire.Doc.License.LicenseProvider.SetLicenseKey(key);
Spire.Doc.License.LicenseProvider.LoadLicense();
Spire.Pdf.License.LicenseProvider.SetLicenseKey(key);
Spire.Pdf.License.LicenseProvider.LoadLicense();
Spire.Xls.License.LicenseProvider.SetLicenseKey(key);
Spire.Xls.License.LicenseProvider.LoadLicense();
Spire.Presentation.License.LicenseProvider.SetLicenseKey(key);
Spire.Presentation.License.LicenseProvider.LoadLicense();
Spire.PdfViewer.License.LicenseProvider.SetLicense(key);
Spire.PdfViewer.License.LicenseProvider.LoadLicense();

Is it the right way to set the license for PDFviewer? please help



the form only have the control for the pdfviewer. Nothing else



Spire.Doc version is 14.1.12



Spire.PDF version is 12.1.0



Spire PDFviewer version is 8.2.9



Spire Presentation version is 10.12.0



Spire.XLS version is 15.12.0

alej2020
 
Posts: 6
Joined: Mon Jan 27, 2025 2:34 pm

Mon Jan 26, 2026 2:25 am

Hello,

Sorry for the delayed response due to the weekend on our end.
The license you're currently using is incorrect. Please apply the Spire.PdfViewer license in the following way:
Code: Select all
Spire.PdfViewer.License.LicenseProvider.SetLicenseKey(key);
Spire.PdfViewer.License.LicenseProvider.LoadLicense();

We look forward to your feedback.
Sincerely,
Talia
E-iceblue support team
User avatar

talia.liu
 
Posts: 341
Joined: Mon Apr 14, 2025 3:33 am

Mon Jan 26, 2026 2:05 pm

Thank you for the update.

Regarding the licensing instructions you provided, I wanted to confirm that I am already using the exact same code for Spire.PdfViewer:

Spire.PdfViewer.License.LicenseProvider.SetLicenseKey(key);
Spire.PdfViewer.License.LicenseProvider.LoadLicense();

Despite this, the PdfViewer control still shows the evaluation warning, while all the other Spire components (Doc, PDF, XLS, Presentation) work correctly with the same license key.

I only received one license key as part of my Spire Office for .NET license. Do I need a separate license specifically for Spire.PdfViewer, or should the same key cover it as well?

Any clarification would be greatly appreciated.

alej2020
 
Posts: 6
Joined: Mon Jan 27, 2025 2:34 pm

Mon Jan 26, 2026 5:23 pm

I changed the code and now I'm using the SetLicenseFromFile method and is working fine, no evaluation warning banner

alej2020
 
Posts: 6
Joined: Mon Jan 27, 2025 2:34 pm

Tue Jan 27, 2026 1:34 am

Hello,

Thank you for your feedback.
Glad to hear your issue has been resolved. Please note that the Spire.Office license key already includes authorization for Spire.PDFViewer, so a separate license key is not required. Regarding license activation for Spire.PDFViewer, there are two available methods:
Method 1:
You can specify the path to your license file in one of the following ways:
Code: Select all
Spire.PdfViewer.License.LicenseProvider.SetLicense("PATH");  //your previous approach
Spire.PdfViewer.License.LicenseProvider.SetLicenseFileName("PATH");   //your current approach

Method 2:
You can extract the license key value from the XML file and apply it directly:
Code: Select all
Spire.PdfViewer.License.LicenseProvider.SetLicenseKey(key);
//This has been tested locally and works correctly—note that it accepts a key string, which differs from the parameter used in SetLicense.

We prefer to recommend you apply your license by license key, since sometimes your application could not read the license file because of lack of permission or other reasons. If you have any further questions, please feel free to reach out.
Sincerely,
Talia
E-iceblue support team
User avatar

talia.liu
 
Posts: 341
Joined: Mon Apr 14, 2025 3:33 am

Return to Spire.PDFViewer