Can't convert section's page to HTML if there is .xps printout on page

I’m trying convert section’s pages to HTML using Aspose.Note for java. But I get exception if page contains printout of .xps file.


class com.aspose.note.system.exceptions.ArgumentException: Error loading file: Unsupported file format
Parameter name: input Source)<init>(Unknown Source)<init>(Unknown Source)
com.aspose.note.internal.N.a.<init>(Unknown Source) Source) Source)
com.aspose.note.internal.ah.d.a(Unknown Source)
com.aspose.note.internal.ah.d.a(Unknown Source)
com.aspose.note.internal.u.h.a(Unknown Source)
com.aspose.note.internal.u.j.a(Unknown Source)
com.aspose.note.internal.u.d.a(Unknown Source)
com.aspose.note.internal.fixed2float.b.a(Unknown Source)
com.aspose.note.internal.html.n.a(Unknown Source)
com.aspose.note.internal.html.n.a(Unknown Source) Source)
com.aspose.note.r.a(Unknown Source) Source)
	at Source)
	at<init>(Unknown Source)
	at<init>(Unknown Source)
	at com.aspose.note.internal.N.a.<init>(Unknown Source)
	at Source)
	at Source)
	at com.aspose.note.internal.ah.d.a(Unknown Source)
	at com.aspose.note.internal.ah.d.a(Unknown Source)
	at com.aspose.note.internal.u.h.a(Unknown Source)
	at com.aspose.note.internal.u.j.a(Unknown Source)
	at com.aspose.note.internal.u.d.a(Unknown Source)
	at com.aspose.note.internal.fixed2float.b.a(Unknown Source)
	at com.aspose.note.internal.html.n.a(Unknown Source)
	at com.aspose.note.internal.html.n.a(Unknown Source)
	at Source)
	at com.aspose.note.r.a(Unknown Source)
	at Source)
	at com.example.Main.main(

Code I use:

public static void main(String[] args) throws IOException {

		Path path = Path.of("path to .one file");
		Path target = path.getParent().resolve("res");

		Document section = new Document(path.toString());

		List<Page> pages = section.getChildNodes(Page.class);

		for (int index = 0; index < pages.size(); index++) {
			try {
				String pageName = Path.of(target.toString(), index + "").toString();, options(index));
			} catch (Exception e) {

	private static SaveOptions options(int pageIndex) {
		HtmlSaveOptions options = new HtmlSaveOptions();
		return options;

One note section file: New Section (505.5 KB)
Problem appears during converting of first page ‘Page’. If I use .pdf file instead of .xps as a printout then all is ok (see second page in attached file - ‘Page pdf’)

I’m using Aspose.Note for Java version 22.9, but problem appears on last version 23.3 too

Is there any limitations on .xps files? Or this is bug?



Thanks for the sample document.

I am able to reproduce the issue as you mentioned while rendering pages to HTMLs. I could not convert section’s page to HTML if there is .xps printout on OneNote document page. I got the same exception as you described. We need to evaluate your issue in details.

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): NOTEJAVA-1184

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.

1 Like


We have evaluated your issue in detail. The problem is caused by an image on the first page of the document. Currently, we are working on fixing the issue. Hopefully, our next Aspose.Note for Java release will include the bug fix. You will be notified once the next version is published.

Please stay in touch.

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

Hi @amjad.sahi
I tried Aspose.Note ver. 23.7, it works correct! Thank you very much!


Thank you for your feedback. It is nice to know that your issue was resolved by using the latest version of the API. Should you have any further queries or issues, feel free to write us back.

1 Like