Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Wednesday, May 6, 2020 1:59:58 AM(UTC)
Abdul Rahman

Groups: Registered
Posts: 19


We have our Leadtools Legacy Annotations and I'm trying to convert to new LeadTools XML based HTML5 Web Annotations in my ASP.NET Core 3.1 Web API following the Annotation Sample in the Installation Directory.

I have added "Leadtools.Annotations.NETStandard" Nuget Package in my ASP.NET CORE 3.1 API.

Code:

RasterSupport.SetLicense(licenseFile, licenseKeyFile);
if (RasterSupport.KernelExpired)
{
    //errormessage = string.Format("LEADTOOLS License has Expired!\nPress [Enter] to exit.");
    //_log.Error(errormessage);
}

var annotationFilePath = "C:\\Desktop\\Conversion Test";

if (!Directory.Exists(annotationFilePath))
{
    throw new ApiException("File not found");
}

var annotationsDirectory = new DirectoryInfo(annotationFilePath);
var annotationFiles = annotationsDirectory.GetFiles("*.ann");

// migrate legacy annotations to web annotations
foreach (var annotationFile in annotationFiles)
{
    try
    {
        AnnContainer[] containers = null;
        double dpiX = 96.0;
        double dpiY = 96.0;

        AnnCodecs annCodecs = new AnnCodecs();
        containers = annCodecs.LoadAll(annotationFile.FullName, dpiX, dpiY); // This container is always null
    }
    catch (Exception)
    {
        throw new ApiException("Annotation Conversion Failed");
    }
}


Quote:
I'm always getting null for AnnContainer[].


However the same code works in WinForms Sample found in the installation directory. After some Analysis, I found LeadTools,Legacy package reference in WinForms App and I'm not able to find a Nuget named LeadTools.Legacy.

Am I missing anything. Please assist me.
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, May 6, 2020 1:51:37 PM(UTC)
Matthew Bresson

Groups: Registered, Tech Support, Administrators
Posts: 34


Hello Abdul,

If you are are looking to utilize the Leadtools.Legacy NuGet package in your application, to access Leadtools.Annotations.Legacy.dll, you will need to open the Package Manager Console in Visual Studio. To do so go to Tools -> NuGet Package Manager -> Package Manager Console. Enter the following inside the Package Manager Console:

PM> Install-Package Leadtools.Legacy -Version 20.0.0.8

If you have any further questions please feel free to reach back out to us.

Thanks,
Matt Bresson
Developer Support Engineer
LEAD Technologies, Inc.
LEADTOOLS
 
#3 Posted : Thursday, May 7, 2020 5:48:16 AM(UTC)
Abdul Rahman

Groups: Registered
Posts: 19


Originally Posted by: Matthew Bresson Go to Quoted Post
Hello Abdul,

If you are are looking to utilize the Leadtools.Legacy NuGet package in your application, to access Leadtools.Annotations.Legacy.dll, you will need to open the Package Manager Console in Visual Studio. To do so go to Tools -> NuGet Package Manager -> Package Manager Console. Enter the following inside the Package Manager Console:

PM> Install-Package Leadtools.Legacy -Version 20.0.0.8

If you have any further questions please feel free to reach back out to us.

Thanks,



Dear Matt,

I have installed Leadtools.Legacy- V20.0.0.8 and Leadtools.Annotations.NETStandard - v20.0.0.8 Nuget Package. But still I get null value from

Code:
containers = annCodecs.LoadAll(annotationFile.FullName, dpiX, dpiY)


I have the Legacy .ann and this conversion always results in null value in my ASP.NET Core 3.1 API. But this works in the Annotations Conversion Sample Winforms Application. Please assist on what I'm missing or this conversion doesn't work on .NET Core as I can see that Leadtools.Legacy is based on .Net Framework not .Net Core. Please assist.

 
#4 Posted : Thursday, May 7, 2020 8:53:30 AM(UTC)
Matthew Bresson

Groups: Registered, Tech Support, Administrators
Posts: 34


Hello Abdul,

I took a look into the Leadtools.Annotations.Legacy dll and the Leadtools.Legacy NuGet and unfortunately at this time this functionality is not supported in .NET Core. I apologize for any inconvenience this may cause.

Please feel free to reach back out to us if you have any further questions.

Thanks,
Matt Bresson
Developer Support Engineer
LEAD Technologies, Inc.
LEADTOOLS
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.054 seconds.