We evaluated Aspose.HTML for Java for rendering HTML documents to PDF.
Aspose.HTML for Java-- 26.7
Java – 21
OS – Linux
- NullPointerException during conversion for some documents containing:
- Multiple images
- Multiple attachments (audio/video/files)
-Multi-page group chats
-Group chats with participant name/phone number headers
-Attachment/image placeholder spacing differs from source/native view
- Rendering fidelity issues:
Images rendered with incorrect rotation
Emojis not rendered
Encrypted-message icons missing
Exception:
java.lang.NullPointerException: Cannot invoke "com.aspose.html.utils.aIo.boe()" because "<local13>" is null
at com.aspose.html.utils.aKA.a(Unknown Source)
at com.aspose.html.utils.aKc$9.c(Unknown Source)
...
at com.aspose.html.utils.collections.generic.List.<init>(Unknown Source)
at com.aspose.html.utils.bGA.az(Unknown Source)
at com.aspose.html.utils.ams.a(Unknown Source)
at com.aspose.html.utils.amq.g(Unknown Source)
at com.aspose.html.utils.ano.aPQ(Unknown Source)
at com.aspose.html.utils.ano.aQz(Unknown Source)
at com.aspose.html.utils.aud.a(Unknown Source)
at com.aspose.html.rendering.HtmlRenderer.render(Unknown Source)
at com.aspose.html.rendering.Renderer.render(Unknown Source)
at com.aspose.html.converters.Converter.convertHTML(Unknown Source)
Documents.zip (8.1 MB)
//The code I have used to convert html to PDF.
HTMLDocument document = new HTMLDocument(htmlFilePath);
com.aspose.html.saving.PdfSaveOptions options = new com.aspose.html.saving.PdfSaveOptions();
Converter.convertHTML(document, options, destFilePath);