Hi,
I am using below Aspose Note version
[group: ‘com.aspose’, name: ‘aspose-note’, version: ‘24.12’, classifier: ‘jdk17’],
Using below code, I am trying to create Images of One Note files which has multiple pages and single pages as well with Handwritten notes. But for some file the image is rendered properly and for some it is showing blank image.
new com.aspose.note.Document(inputFilePath).save(outputFilePath, SaveFormat.Pdf);
Can you please check why we are not able to properly generate image for handwritten one note files.
Attaching the input samples along with the PDF file which generated by above code.
One Note Samples.zip (54.9 KB)
@ShubhamYerpude
Hello,
Thank you for reaching out and for providing the sample files.
Below is an explanation of why the handwritten (ink) content is rendered as a blank page when you convert the OneNote document to PDF/ image with Aspose.Note 24.12, and how you can proceed.
1. What is happening with the handwritten ink?
- In a OneNote file the handwritten strokes are stored as
Ink
objects (InkML).
- Aspose.Note 24.12 supports rendering of the following page elements:
- Text
- Images
- Tables, Shapes, Charts, etc.
- **Ink objects are not yet rendered by the built‑in PDF/ image exporters.
Consequently the pages that contain only ink (or ink together with other elements) are produced as a blank canvas in the resulting PDF/ image.
This behavior is documented in the Aspose.Note release notes and the conversion guide:
“Ink (handwritten) objects are currently not supported for raster or vector export. They will be ignored during conversion.”
Aspose.Note Java – Convert OneNote to PDF
2. What can you do right now?
Option |
Description |
Upgrade to the latest Aspose.Note build |
If a newer version (e.g., 24.13 or later) is available, it may contain an updated ink‑rendering engine. Check the Release Notes on the product page. |
Export Ink to an image yourself |
You can extract the Ink object, rasterize it using a custom library (e.g., Java2D), and then overlay the generated raster on the PDF page. Example snippet:
java\nDocument doc = new Document(inputFilePath);\nfor (Page page : doc.getPages()) {\n for (Ink ink : page.getInks()) {\n // Convert Ink to BufferedImage (your own implementation)\n BufferedImage inkImg = InkRenderer.renderInk(ink);\n // Add the image to the page before saving\n page.getImages().add(inkImg);\n }\n}\ndoc.save(outputPdfPath, SaveFormat.Pdf);\n (You need to implement InkRenderer.renderInk – the API provides the raw stroke points.) |
Save as XAML and post‑process |
document.save("output.xaml", SaveFormat.Xaml); gives you the full XML representation, including ink data. You can then use an external tool that understands InkML to create the visual representation. |
Request a feature |
If native ink rendering is a critical requirement, you can file a feature request via the Aspose Issue Tracker. The product team reviews such requests for upcoming releases. |
3. Next steps for you
- Verify the version – Make sure you are using the latest Aspose.Note build (you can check the Maven repository or the Aspose download page).
- Test with a newer version – If a newer version is available, run the same code and see whether the ink appears.
- If the issue persists, let us know:
- The exact Aspose.Note version (including the build number).
- A minimal OneNote file that reproduces the blank‑page issue (a single page that contains only handwritten ink).
- Your Java runtime details (JDK version, OS).
Providing the minimal file will help us reproduce the problem quickly and confirm whether it is a limitation or a bug.
4. Helpful links
5. Summary
- The blank pages you see are caused by handwritten ink not being rendered by the current exporter.
- Upgrade to a newer build (if available) or use a custom ink‑to‑image approach as a workaround.
- Provide a minimal sample if you need us to verify a possible bug.
Please let us know which option you would like to try, or share the minimal sample file so we can investigate further.
Best regards,
Aspose Support Team
@ShubhamYerpude,
Thanks for the sample OneNote documents.
After initial testing, I was able to reproduce the issue partially as you mentioned by using your sample OneNote documents and following sample code. I found handwritten elements in OneNote document(s) are not rendered properly in PDF conversion. I am using latest Aspose.Note for Java 25.6 which works fine for “D1.LF.00000005.one” fine but for “D1.LF.00000006.one”, it does not render handwritten elements properly.
com.aspose.note.Document document = new com.aspose.note.Document("d:\\files\\D1.LF.00000006.one");
document.save("d:\\files\\out2.pdf", com.aspose.note.SaveFormat.Pdf);
output_PDF_files.zip (76.1 KB)
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): NOTEJAVA-1210
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.
Thank you @amjad.sahi for creating the issue. Please let us know when the issue is fixed.
@ShubhamYerpude,
Sure, we will keep you informed here as soon as we have any updates regarding the issue.