Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Sat May 21, 2022 11:54 pm

- We are using the Spire Office library version 6.12.1 which has the Spire.Pdf.dll
- This Library is part of our conversion Library and the License is embedded in the conversion library.
- This conversion library is used in our Windows Service as well as ASP.Net Website for conversion
- In all non-production environments the conversions work seamlessly with Windows service and The web
- In Production, Web API when it try to convert the files to PDF using the conversion library leaves the “Evaluation Warning” on top of the PDF. Whereas Windows service get the conversion done with no evaluation warning on it.

kalyadan77
 
Posts: 12
Joined: Sat May 21, 2022 11:38 pm

Mon May 23, 2022 6:30 am

Hi,

Thank you for your inquiry.
How did you apply the license? I would suggest you apply the license by license key (How to Apply the License by license key), since the other methods would cause the unrecognition of the license file because of the lack of permission or other reasons in some cases. If the problem still exists in production, please provide your following information for further investigation. Thanks in advance.
1) Production environment, such as Win Server2012
2) Application Type (ASP.Net Core Web App,.NET 5.0), sharing your sample application would be helpful.

Sincerely,
Kylie
E-iceblue support team
User avatar

kylie.tian
 
Posts: 412
Joined: Mon Mar 07, 2022 2:30 am

Mon May 23, 2022 11:47 pm

Hi There

We have included the license.elic.xml with the key as an embedded resource of our conversion library. We are not having a specific code to validate the license explicitly. Spire does it internally.

This is an application running for years and we had recently upgraded the version to Spire.Office (6.12.1). The windows service which runs the library for conversions generates PDFs with no Evaluation Watermark. but the ASP.NET web application when converting HTML to PDF gets the Evaluation Warning printed on top of the page.

kalyadan77
 
Posts: 12
Joined: Sat May 21, 2022 11:38 pm

Tue May 24, 2022 10:06 am

Hi,

Thank you for your reply.
Please replace the embedded resource method with the license key method to apply your license, and the code SetLicenseKey("your license key");
should be placed at the entrance of your program. If the issue still troubles you, please share your sample application to help us investigate accurately and help you out.
Sorry I didn't find your purchase information according to your email. Could you please provide your authorized email address or order number for our reference? Thank you in advance.

Sincerely,
Kylie
E-iceblue support team
User avatar

kylie.tian
 
Posts: 412
Joined: Mon Mar 07, 2022 2:30 am

Tue May 24, 2022 12:37 pm

Registered Email is
<Email>matt_marlor@ucsservicing.com.au</Email>
<Organization>Unisys Australia Pty Ltd</Organization>

kalyadan77
 
Posts: 12
Joined: Sat May 21, 2022 11:38 pm

Wed May 25, 2022 11:07 am

Hi,

Thanks for your sharing.
I created a conversion library and apply the license by both methods (license key and embedded resource), but neither could reproduce your problem. The Evaluation can be removed successfully on my side. Here I uploaded my test demo for your reference, if it is different from your actual situation, please share your sample demo which could reproduce your problem to help us further investigate it.
Download link: https://www.e-iceblue.com/downloads/demo/29540Demo.zip

Sincerely
Kylie
E-iceblue support team
User avatar

kylie.tian
 
Posts: 412
Joined: Mon Mar 07, 2022 2:30 am

Wed May 25, 2022 12:20 pm

We do not face any issue with the implementation that we currently have in any other environments except PROD web application. In PROD, the Windows Service which uses the same library works perfect though.

kalyadan77
 
Posts: 12
Joined: Sat May 21, 2022 11:38 pm

Wed May 25, 2022 9:33 pm

Is there a way to trap the evaluation warning error when the PDF is generated, so that if by any issue license validation fails (as in our case) and PDF is generated with "Evaluation Warning" we would be able to trap the error and notify the required teams and protect the document from going out to the customer?

kalyadan77
 
Posts: 12
Joined: Sat May 21, 2022 11:38 pm

Thu May 26, 2022 9:50 am

Hi,

The demo I provided is a web application, did you test it? What was the result?
Based on the current information you provided, we can't reproduce your problem on my side. I recommend that you use the license key method (apply the license by key instead of embedded resource) to have a try. You can also try to do conversion directly in your Web app rather than the conversion library, and in your web app, you need to add Global.asax and add the method (SetLicenseKey) into the Application_Start method. If none of this helps, please provide your sample application which could reproduce your issue to help us investigate it accurately.

Besides, you can trap the evaluation warning by getting the text from generated PDF. Sample code is shown as below.
Code: Select all
            PdfDocument pdf = new PdfDocument();
            pdf.LoadFromFile(fileName);
            string str = pdf.Pages[0].ExtractText();
            if (str.Contains("Evaluation Warning:"))
            {
               .......
            }
            else
            {
               .......
            }


Sincerely,
Kylie
E-iceblue support team
User avatar

kylie.tian
 
Posts: 412
Joined: Mon Mar 07, 2022 2:30 am

Thu May 26, 2022 11:24 am

Thank you I need to make an architecture decision based on your inputs. It is strange for us to find that the conversion library fails license validation only in Web App and that too only in PROD.

kalyadan77
 
Posts: 12
Joined: Sat May 21, 2022 11:38 pm

Fri May 27, 2022 4:07 am

Hi,

Yes, it is weird, your problem is something we haven't encountered before. I'm afraid we need more assistances to carry out investigation and help you out. Please compare my web project with yours and give some feedback. Please provide your application which can reproduce your problem.

Sincerely,
Kylie
E-iceblue support team
User avatar

kylie.tian
 
Posts: 412
Joined: Mon Mar 07, 2022 2:30 am

Return to Spire.PDF