How can I solve an issue with Windows Fonts on Linux OS?

@aaukhatov,

Thanks for providing one note files and Java sample.

We are sorry that the provided build did not fix your issue. We have logged your provided resource files and sample with your existing ticket “NOTEJAVA-1063” into our database. We will evaluate your issue using your provided artifacts and resource files. Once we have an update on it, we will let you know.

@Amjad_Sahi Thanks a lot.

The issues you have found earlier (filed as NOTEJAVA-1063) have been fixed in this update. This message was posted using Bugs notification tool by alexei.s

Thanks a lot. I tested the fix, parsing .one files works, but parsing .onetoc2 is not working.

@Amjad_Sahi Could you take a look at it one more time? My message above with attachments contains the file and snippet of code as well, you can reproduce it easily.

Exception in thread "main" java.lang.RuntimeException: Failed to parse Notebook
at org.example.Main.parseNotebook(Main.java:32)
at org.example.Main.main(Main.java:23)

Caused by: class com.aspose.note.system.exceptions.InvalidOperationException: Attempt to get last item on an empty collection.
com.aspose.note.internal.b.l.g(Unknown Source)
com.aspose.note.internal.b.l.g(Unknown Source)
com.aspose.note.internal.cE.S.a(Unknown Source)
com.aspose.note.internal.d.m.a(Unknown Source)
com.aspose.note.internal.d.m.b(Unknown Source)
com.aspose.note.internal.d.m.a(Unknown Source)
com.aspose.note.internal.b.bF.a(Unknown Source)
com.aspose.note.bP.a(Unknown Source)
com.aspose.note.Notebook.load(Unknown Source)
com.aspose.note.Notebook.load(Unknown Source)
com.aspose.note.Notebook.(Unknown Source)
com.aspose.note.Notebook.(Unknown Source)
org.example.Main.parseNotebook(Main.java:29)
org.example.Main.main(Main.java:23)
at com.aspose.note.internal.b.l.g(Unknown Source)
at com.aspose.note.internal.b.l.g(Unknown Source)
at com.aspose.note.internal.cE.S.a(Unknown Source)
at com.aspose.note.internal.d.m.a(Unknown Source)
at com.aspose.note.internal.d.m.b(Unknown Source)
at com.aspose.note.internal.d.m.a(Unknown Source)
at com.aspose.note.internal.b.bF.a(Unknown Source)
at com.aspose.note.bP.a(Unknown Source)
at com.aspose.note.Notebook.load(Unknown Source)
at com.aspose.note.Notebook.load(Unknown Source)
at com.aspose.note.Notebook.(Unknown Source)
at com.aspose.note.Notebook.(Unknown Source)
at org.example.Main.parseNotebook(Main.java:29)
… 1 more

@aaukhatov,

Thanks for your feedback.

We are sorry that it does not work with your .onetoc2 file. We will look into it soon. Once we have any new information, we will update you.

@aaukhatov,

To manage and address issues properly, we have logged a separate ticket with an id “NOTEJAVA-1090” for the issue. The issue is logged as following:
NOTEJAVA-1090 - Parsing .onetoc2 file is not working

We will look into it and analyze with details. Once we have an update on it, we will let you know here.

Got you, @Amjad_Sahi thanks a lot.

@aaukhatov,

You are welcome.

@Amjad_Sahi Hello, I have .one file with attachment, however after converting to HTML I lost the attachment. My Section.one.zip (550.6 KB)

@aaukhatov,

Thanks for providing the sample document.

I tested your scenario/case using your one note file to convert to HTML using the following sample code and it works as expected. The embedded attachments (e.g., “Document.docx”) would be converted to static image in the output HTML. This is same as you do export one note page to MHT file format. You may confirm this behavior in ONENOTE application. Do you mean you need to get embedded objects as dynamic objects, so once clicking on it would open the file into respective application? I am afraid, this is not possible even in ONENOTE application.
e.g.
Sample code:

                 com.aspose.note.Document oneNoteDoc = new com.aspose.note.Document("f:\\files\\My Section.one");

                 com.aspose.note.HtmlSaveOptions options = new com.aspose.note.HtmlSaveOptions();
                 options.setExportCss(ResourceExportType.ExportEmbedded);
                 options.setExportFonts(ResourceExportType.ExportEmbedded);
                 options.setExportImages(ResourceExportType.ExportEmbedded);

                 oneNoteDoc.save("f:\\files\\out1.html", options);