I installed Aspose.OMR version 22.4.0.0 from NuGet that I want to do POC before we purchase for our .NET Core 6 application. I wanted to start with the sample Survey Template JSON that I copied from the documentation. When my C# code executes the OmrEngine.GenerateJSONTemplate it throws the following program Exception. Please help me to resolve this error. Is ver. 22.4 compatible with .NET Core 6? On another note, I was hoping there to be an overloaded method that takes a JSON string for the template generation like in the case of the GenerateTemplate used for text markup. Is there another generation method I should use for passing JSON string? Exception Detail:
System.TypeLoadException
HResult=0x80131522
Message=Method ’ ’ in type ’ ’ from assembly ‘Aspose.OMR, Version=22.4.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56’ does not have an implementation.
Source=Aspose.OMR
StackTrace:
at . (String , GenerationResult )
at Aspose.OMR.Api.OmrEngine.GenerateJSONTemplate(String jsonPath, GlobalPageSettings settings)
Here is my code and the exception is thrown by the method called on line 43:
image.png (48.9 KB)
Thanks in advance for your support, Mike
We are afraid that the support for .NET 6.0 has not been yet added to the API. However, a ticket as OMRNET-257 has been logged in our issue tracking system to include its support. We have linked the ticket with this forum thread so that you will be notified as soon as it is resolved. Please be patient and spare us some time.
We are sorry for the inconvenience.
Another ticket as OMRNET-500 has been logged in our issue tracking system to investigate its possibility and we will let you know once investigation is complete and we have some news about ticket resolution.
Thank you for your response. I will create a new .NET Standards 2.0 project and try continuing with my proof of concept and getting Aspose.OMR working with my dynamic JSON saved to a file. In meantime, can you take a look at this image and let me know if Aspose.OMR is capable of generating a template that has questions and answers verbiage with images that are intermixed with the text like shown in my attached image? Thank you so much, Mike.
Sample Questions with Images.PNG (41.8 KB)
Hello, I have created a new .NET Standard 2.0 C# project and installed the Aspose.OMR from NuGet and moved all my class files to this new supported .NET project. I ran the app using a JSON object I copied from the sample Survey, and I get the exact same thrown Exception. Please see my attachment with code and detail error message. I also want to point out if I run the commented out code that calls GenerateTemplate instead of GenerateJSONTemplate I do not get this severe error. However, GenerateTemplate returns a graceful error message indicating I can not use that method with JSON format, so my understanding is that I must use GenerateJSONTemplate with JSON template design.
Please let me know what I need to resolve this error. Do I need to download the Aspose.OMR components some other place or try a different version? Thanks again, Mike
Aspose OMR Error does not have implementation.PNG (166.3 KB)
In order to use GenerateJSONTemplate method, you need to provide the template in JSON format. For more details about this format, please check below documentation area:
Yes, I already realize that it works only with JSON format. I’m trying to get the template generation to work by simply using your sample JSON from your documentation. I attached the actual json file that I am using (again from your documentation). The issue is with your Aspose.OMR assembly. The GenerateJSONTemplate throws a severe System.TypeLoadException. I was merely pointing out that this error does not occur with the GenerateTemplate method, so there has to be something wrong in your assembly code related only to the GenerateJSONTemplate method. I need support from one of your architects to resolve this. There is nothing wrong with the json file and settings that I’m using for input. Here is the json file and image I’ve been using for input: templates.zip (6.4 KB)
We have logged a ticket as OMRNET-502 in our issue management system to investigate your files against the method GenerateJSONTemplate. We will surely investigate the issue and let you know as soon as it is resolved. Please be patient and spare us some time.
We are sorry for the inconvenience.
Here is an update of my proof of concept work using your Aspose.OMR product. Still waiting for your support with tickets OMRNET-502 and OMRNET-503. In meantime, I tried your survey text markup with the GenerateTemplate method and it produces a blank image and blank pdf. No errors are getting returned so it appears to be successful. My assessment is that your product does not work at all. Your support for new purchase is horrible as I’ve been waiting now for more than 7 days. I can’t expect my client to pay $8,386 for a product that we can’t get to work and no support to help make it work. If by some miracle one of your technical staff has the answers, please let me know soon. In meantime, I need to find another product for our application build. We only have 7 weeks left in our project to implement a solution. Here are the results from my testing your GenerateTemplate:
SurveySample.png (70.6 KB)
SurveySamplePOC.zip (128.5 KB)
First of all, please accept our humble apology for the inconvenience you have faced. For OMRNET-502, we have investigated your template. There was a problem with it - name of the image contains escape symbol "".
Image name should only be used for filename of the image. Full path is passed using ImagesPaths | Aspose.OMR for .NET API Reference
There is article with detailed information - Generating the template|Documentation
For OMRNET-503, At the current moment, described feature is not implemented in the library.
But it is interesting feature and may be implemented in later(second half of 2022) releases.
We are investigating this case under the ticket OMRNET-521 and will soon get back to you with a resolution. We again apologize for the inconvenience caused.
Based on your quick response, I took the image element out of both my text markup and json markup and the settings object has no images. Here are the results of testing both methods:
GenerateTemplate: Still produced no output. There is a Warning message returned from method: WARNINGS: Line 0: Unknown element type: \0t\0e\0x\0t\0. Not sure what this is, but you can see the survey string I shared with you taken from your online documentation.
GenerateJSONTemplate: Still throw exception System.TypeLoadException even with the image excluded. This is a low level component load error, so I doubt it has anything to do with the input markup at all.
I will pass on your response to OMRNET-503 to my client. Unfortunately, we need a solution implemented by July 1, 2022, so I will need to find another product. Thanks for your response.
Please check the attached sample markups and their generated results that we produced in our environment while using below code snippet and 22.4 version of the API.
For OMRNET-502:
Aspose.OMR.Api.OmrEngine engine = new Aspose.OMR.Api.OmrEngine();
string[] imagePaths = new[] { dataDir + "TestLogo.JPG" };
Aspose.OMR.Generation.GlobalPageSettings settings = new Aspose.OMR.Generation.GlobalPageSettings
{
PaperSize = OMR.Generation.PaperSize.A4,
BubbleSize = OMR.Generation.BubbleSize.Extrasmall,
PageMarginLeft = 100,
ImagesPaths = imagePaths
};
Aspose.OMR.Generation.GenerationResult res = engine.GenerateJSONTemplate(dataDir + "SurveySampleJSON_new.json", settings);
res.Save(dataDir, "imagesjson");
input: SureveySAmpleJSON.zip (17.9 KB)
output: 502.zip (133.4 KB)
For OMRNET-521, We have investigated attached project. There was a problem with it.
Template contains line:
?image=aspose-logo.png
This line allows to add image to the template, by providing full path to it. You can read more detailed examples here Adding images|Documentation
Because no image was provided “silent” error was thrown. ErrorCode | Aspose.OMR for .NET API Reference was set to 5.
and
ErrorMessage | Aspose.OMR for .NET API Reference was set to actual error message.
To make it more transparent in 22.5 release, we changed silent error to not-so-silent error.
Upon calling Save | Aspose.OMR for .NET API Reference exception would be thrown containing actual error message.
Aspose.OMR.Api.OmrEngine engine = new Aspose.OMR.Api.OmrEngine();
string[] imagePaths = new[] { dataDir + "TestLogo.JPG" };
Aspose.OMR.Generation.GlobalPageSettings settings = new Aspose.OMR.Generation.GlobalPageSettings
{
PaperSize = OMR.Generation.PaperSize.A4,
BubbleSize = OMR.Generation.BubbleSize.Extrasmall,
PageMarginLeft = 100,
ImagesPaths = imagePaths
};
Aspose.OMR.Generation.GenerationResult res = engine.GenerateTemplate(dataDir + "SurveySampleTEXT.txt", settings);
res.Save(dataDir, "images");
input: SurveySampleTEXT.zip (750 Bytes)
output: 521.zip (133.4 KB)
PS: We used TestLogo.JPG for both template generation as a sample image. TestLogo.JPG (4.7 KB) It was placed in the same directory where TXT/JSON markups were placed.