We have purchased ASPOSE.Total for .NET,
and recently while working on the PDF merging function,
we found that the license file is not taking effect, and we are still seeing evaluation watermarks, as shown below. Evaluation Only. Created with Aspose.PDF. Copyright 2002-2025 Aspose Pty Ltd.
Please note that we have followed the official documentation to load the license file,
and it works successfully when converting PowerPoint to PDF.
@accesssoft
Cause
The issue you’re encountering with the license file not taking effect during PDF merging, while it works for PowerPoint to PDF conversion, could stem from a few common causes. This often happens if the license file is not being loaded correctly for the specific component or if there are multiple instances of the Aspose.PDF library being referenced.
Solution
-
Ensure Correct License Loading: Make sure that you are loading the license file specifically for the Aspose.PDF component. The code to load the license should look something like this:
License license = new License();
license.SetLicense("Aspose.Pdf.lic");
Ensure that the path to the license file is correct and that the file is accessible.
-
Check for Multiple References: Verify that there are no conflicting versions of the Aspose.PDF library in your project. Sometimes, having multiple versions can lead to unexpected behavior.
-
Rebuild the Project: After making changes, clean and rebuild your project to ensure that all references are updated.
-
Test with a Simple Example: Create a small test project that only merges PDFs using the license to isolate the issue. This can help determine if the problem is with your main project setup.
Code
Here’s a minimal example of how to load the license and merge PDFs:
using Aspose.Pdf;
using Aspose.Pdf.License;
class Program
{
static void Main()
{
// Load the license
License license = new License();
license.SetLicense("Aspose.Pdf.lic");
// Create a PDF document
Document pdfDocument = new Document();
// Add pages and merge logic here
// ...
// Save the merged document
pdfDocument.Save("MergedDocument.pdf");
}
}
Next Steps
If you continue to see the evaluation watermark after following these steps, consider checking the following:
- Ensure that the license file is not expired.
- Look for any exceptions or errors in the output that might indicate issues with loading the license.
- If possible, contact Aspose support with details of your implementation for further assistance.
Please implement these steps and let me know if you need further assistance!
@accesssoft,
Aspose.PDF for .NET is included in the Aspose.Total for .NET license. If you notice an evaluation watermark or message in your documents, it may be because the license file is not being correctly loaded and applied/set at runtime. For guidance on setting up the license for Aspose.PDF for .NET, please refer to the licensing document: Aspose PDF License|Aspose.PDF for .NET. Kindly ensure that the license is set in your code at the beginning of your app/program and at least (processed) once (in the whole application life cycle) before using any other Aspose.PDF API. Additionally, since the License class is included in all Aspose for .NET APIs, please use the fully qualified name (e.g., Aspose.PDF.License) when creating/instantiating a License object in your code.
If you still experience the issue, please feel free to let us know with details.