BoldDesk®Customer service software with ticketing, live chat & omnichannel support, starting at $99/mo for unlimited agents. Try it for free!
Hello,
I try to using register license valid key in my code, but all files converted have a message "Created with a trial version of Syncfusion PDF library"
public string convertDocxToPdf(string folder, string source)
{
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("My License Key");
FileStream fs = new FileStream(folder + '\\' + source + ".docx", FileMode.Open);
Syncfusion.DocIO.DLS.WordDocument wordDocument = new Syncfusion.DocIO.DLS.WordDocument(fs, Syncfusion.DocIO.FormatType.Docx);
DocIORenderer render = new DocIORenderer();
PdfDocument pdfDoc = new PdfDocument(PdfConformanceLevel.Pdf_A1B);
pdfDoc = render.ConvertToPDF(wordDocument);
FileStream outputStream = new FileStream(source+".pdf", FileMode.OpenOrCreate, FileAccess.ReadWrite);
fs.Close();
pdfDoc.Save(outputStream);
pdfDoc.Close();
outputStream.Close();
outputStream.Dispose();
render.Dispose();
wordDocument.Dispose();
return source+".pdf created success";
}
Hi Vinicius,
We suspect that you have registered the license key in the wrong location. Please register the license key in the proper location.
It is recommended to register the Syncfusion license key at the entry point of
your application, by default, in order to prevent the licensing message from
appearing.
Please, ensure that all the referenced Syncfusion assemblies\NuGet
packages are all on the same version(23.2.4) as license key’s
version(23.*.*) in your project and published to the application deployed location.
Syncfusion license keys are version and
platform-specific and the generated license key is just a string that needs to be
registered before any Syncfusion control is initiated.
To know
about registering the license key,
https://ej2.syncfusion.com/aspnetcore/documentation/licensing/how-to-register-in-an-application
Note: If you are using any template file for generating the PDF, please ensure that the original template file does not contain any license trial warning.
If still not resolved, please share with us the following details to investigate issue from our side,
Regards,
Jeyaseelan M
Hi Jeyaseelan,
I tried to use the configure method, but it didn't work, my project is with TargetFramework netstandard2.0 and used as a library that is called by a python project, using clr.AddReference, we are currently using version 23.1.36 and Previously it was in version 22.1.37 and it always worked, we didn't make any code changes, only the versions, since the version that worked was a test version and we are currently using a key acquired in version 23.1.36
below are the Nuget packages we are using
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" Version="5.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Syncfusion.DocIORenderer.Net.Core" Version="23.1.36" />
<PackageReference Include="Syncfusion.EJ2.WordEditor.AspNet.Core" Version="23.1.36" />
<PackageReference Include="Syncfusion.Licensing" Version="23.1.36" />
<PackageReference Include="Syncfusion.Pdf.Net.Core" Version="23.1.36" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="7.0.0" />
</ItemGroup>
</Project>
Hi Vinicius,
We suspect that you have not updated the license key v23.1.36 in your project. To resolve the issue, please generate the license key v23.1.36 from your account and register it in the same configure method.
Syncfusion license keys are version specific (Major volume release version). So, you need to regenerate the license key for every new volume release upgrade only.
Example: 21.*.*, 22.*.*, 23.*.*, 24.*.*
You do not need to update the license key on a regular basis (Service Pack release or weekly patch releases). You need to update the license key in your project for every major volume release upgrade. Syncfusion will have four major releases in a year.
Example: Upgrading from 22.1.* to 23.1.* you should update the license key as well.
Refer to the below KB article to know which version license key should use in the application,
Regards,
Jeyaseelan M