OneNote to PDF conversion

Dear Team,

I am unable to convert .One to .PDf using Aspose.Note for .Net. Its giving exception. Sharing the same sample.
Peer Support.one (On 2-21-25).zip (40.6 KB)

Regards
XCoder

@perfectdata.techno

It seems you are encountering an exception while trying to convert a OneNote file (.one) to PDF using Aspose.Note for .NET. This issue has been reported by other users as well, particularly when using a temporary license.

Here are some steps you can take to troubleshoot and potentially resolve the issue:

  1. Check License Validity: Ensure that your temporary license is valid and correctly set in your code. You can set the license using the following code snippet:

    License license = new License();
    license.SetLicense("Aspose.Note.NET.lic");
    
  2. Sample Code: Here’s a basic example of how to load a OneNote document and save it as a PDF:

    using Aspose.Note;
    using System;
    
    class Program
    {
        static void Main(string[] args)
        {
            License license = new License();
            license.SetLicense("Aspose.Note.NET.lic");
    
            Document oneFile = new Document(@"C:\Path\To\Your\File.one");
            oneFile.Save(@"C:\Path\To\Output\File.pdf", SaveFormat.Pdf);
            Console.WriteLine("Conversion successful!");
        }
    }
    
  3. Check for Specific Document Issues: If the issue persists, it may be related to the specific OneNote document you are trying to convert. Test with different OneNote files to see if the problem is consistent across all documents or specific to one.

  4. Version Compatibility: Ensure that you are using a compatible version of Aspose.Note for .NET. If you are using an older version, consider updating to the latest version, as many bugs and issues are resolved in newer releases.

  5. Report the Issue: If none of the above steps resolve your issue, consider reporting it to Aspose support with details about the exception message and the specific OneNote file you are using. They may provide a fix or workaround.

If you need further assistance, feel free to ask!

Same issue is coming when we are checking Aspose.Note online conversion.

Regards
XCoder

@perfectdata.techno,

Thanks for the sample OneNote document.

After initial testing, I am able to reproduce the issue as you mentioned when loading your OneNote document. I found exception: “‘System.InvalidOperationException’ occurred in System.Private.CoreLib.dll: 'Queue empty” when loading the OneNote file.

Aspose.Note.Document oneFile = new Aspose.Note.Document("e:\\test2\\Peer Support.one (On 2-21-25).one");

We require thorough evaluation of the issue. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): NOTENET-5869

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.