I’m evaluating if we can use the Aspose.Note.NET to convert a ton of OneNote files to PDF. In trial mode the PDFs are generated with limitations. So I tried with the 30 Day Temporary License and when the code goes to Save using SaveFormat.Pdf an exception is thrown saying: “System.ArgumentException: ‘Parameter is not valid.’”
Again, it “works” in trial mode, but the exception occurs with Temporary License
Here is the code. Please advise.
using Aspose.Note;
using System;
using System.Linq;
using System.Xml.Linq;
class Program
{
static void Main(string[] args)
{
License license = new Aspose.Note.License();
license.SetLicense(“Aspose.Note.NET.lic”);
Document oneFile = new Document(@"C:\ONENOTE Samples\Emergency Information.one");
oneFile.Save(@"C:\ONENOTE Samples\New.pdf", SaveFormat.Pdf);
}
}
@nooearth,
This is strange as I tested your scenario/case using a valid license, it works fine in licensing mode on my end. I used a sample ONENOTE document to convert to PDF file format, the output PDF is fine tuned.
e.g.
Sample code:
Aspose.Note.License license1 = new Aspose.Note.License();
license1.SetLicense("Aspose.Note.lic");
Aspose.Note.Document oneFile = new Aspose.Note.Document("e:\\test2\\document1.one");
oneFile.Save("e:\\test2\\OneNoteText_New.pdf", Aspose.Note.SaveFormat.Pdf);
Console.WriteLine("done! ");
Do you find this issue with some specific OneNote document(s) or with any OneNote document? If you find the issue with specific OneNote document(s), kindly zip and share the sample file(s) with us. Moreover, which version of Aspose.Note for .NET you are using? Also, post us your temporary license via private message. For that you need to click on my name Icon in any of my post (in the thread) and press Message button. Now attach the license file (please zip it first) and post/send. We will check your issue soon.
PS. please do not share your your temporary license in this thread.
I believe I sent you a private message with the information you requested.
@nooearth,
Thanks for providing us OneNote document and temporary license file via private message.
Please notice, I am able to reproduce the issue as you mentioned when converting your OneNote document to PDF file format. I found an exception “System.ArgumentException: 'Parameter is not valid.’” when saving OneNote document to PDF file format in licensing mode. It works fine in evaluation mode but it does not work with valid license.:
e.g.
Sample code:
Aspose.Note.License license1 = new Aspose.Note.License();
license1.SetLicense("Aspose.Note.NET.lic");
Aspose.Note.Document oneFile = new Aspose.Note.Document("Ed Records Policy.one");
oneFile.Save("e:\\test2\\OneNoteText_New.pdf", Aspose.Note.SaveFormat.Pdf);
I have logged a ticket with an id “NOTENET-5637” for your issue. We will look into it soon.
Once we have an update on it, we will let you know.
@nooearth,
We are pleased to inform you that your issue (logged earlier as “NOTENET-5637”) has been resolved. The fix will be included in our upcoming release (Aspose.Note for .NET 22.9). You will be notified once the next release is published.
The issues you have found earlier (filed as NOTENET-5637) have been fixed in this update. This message was posted using Bugs notification tool by alexei.s