I purchased a metered Aspose.Words license and got Aspose.Words.Word.Processor.for.NET.lic file containing private/public keypair and implemented the most basic CLI .net application (see code below). It just does not work, consumption stays at 0 and the generated file keeps saying ‘evaluation only’.
key pairs copied straight from license file.
internet connection up and running (using it for this request).
Does not throw any exceptions.
Yesterday de consumption credits/quantities remained 0.
Today (unchanged executable) the consumption quantities started counting upwards.
Aspose.Words.Metered l_Metered = new Metered();
l_Metered.SetMeteredKey("<public>", "<private>");
Console.WriteLine("Is metered: " + Metered.IsMeteredLicensed());
// Get metered data amount before calling API
Console.WriteLine($"Credit before operation: {Metered.GetConsumptionCredit()}");
Console.WriteLine($"Consumption quantity before operation: {Metered.GetConsumptionQuantity()}");
// Load document from file
Document l_Document = new Document(args[0]);
// Write converted document to file
l_Document.Save(args[1]);
// Sleep a bit
System.Threading.Thread.Sleep(10000);
// Get metered data amount after calling API
Console.WriteLine($"Credit after operation: {Metered.GetConsumptionCredit()}");
Console.WriteLine($"Consumption quantity after operation: {Metered.GetConsumptionQuantity()}");
@jvargasmorales There is small misunderstanding of the features covered by your license. You have only Word Processor feature. But to achieve your requirement, it is required to use the following code:
Document doc = new Document(@"C:\Temp\in.docx");
doc.Save(@"C:\Temp\out.pdf");
This code include 3 features: Load MS Word documents, save PDF documents and converter. So you should have 3 feature licenses. You code should look like this:
Aspose.Words.Metered metered = new Aspose.Words.Metered();
metered.SetMeteredKey("<public-key-load-save-docx>", "<private-key-load-save-docx>"); // Apply feature license for loading and saving document (Word Processor)
metered.SetMeteredKey("<public-key-save-pdf>", "<private-key-save-pdf>"); // Apply feature license for saving PDF document (PDF Processor)
metered.SetMeteredKey("<public-key-converter>", "<private-key-converter"); // Apply feature license for converter
Document doc = new Document(@"C:\Temp\in.docx");
doc.Save(@"C:\Temp\out.pdf");