We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Clarification on HarfBuzz: required or not with JDK 9 and over?

The docs are unclear on whether or not the HarfBuzz plugin (aspose-words-xx.xx-shaping-harfbuzz-plugin.jar) is required when using JDK 9 or newer. The system requirements state that it is not necessary. The Enable OpenType Features documentation implies that it is, or at least, doesn’t mention that it’s optional.

I’m using OpenJDK (openjdk 11.0.13 2021-10-19). I was performing regression testing and upgrading, and I found a document that breaks DOCX-to-PDF conversion (like this) on version 20.11, but only when the HarfBuzz plugin is included. I’m aware that that isn’t the latest version, but I was surprised because this suggests that a different code path is being taken even though I’m using a sufficiently new JDK.

Can you clarify:

  • Does the aforementioned OpenJDK require usage of the HarfBuzz JAR?
  • Do you have any documents you can supply that can be used to highlight the difference between a PDF converted with and without the HarfBuzz JAR?

@icsk We are working on your query and will reply soon.

@icsk Java 9 does uses HarfBuzz as a main fonts rendering engine. So theoretically it is not required to additionally install aspose-words-xx.xx-shaping-harfbuzz-plugin. However, does to different versions of HarfBuzz in our plugin and in Java there might be difference in fonts rendering.
If you have issues with rendering some specific document, please attach it here, we will check it and provide you more information.
The difference in rendering with and without HarfBuzz might not be noticed at all if the fonts used in your document does not use OpenType fonts features.

Thank you for the quick reply!

To confirm what I think you’re saying: when using the HarfBuzz plugin, the JDK-provided HarfBuzz is not used even if it’s present and compatible, correct?

Judging by a license file I was able to find in my JDK, it appears to use HarfBuzz v2.3.1. Is there any documentation on the version of HarfBuzz used by each version of Aspose.Words? (If you’re unable to get a complete list, I’m mostly interested in those versions present in 20.11 and 21.10.)

I’ve attached the problematic document below. Note that it converts fine with and without the HarfBuzz plugin on 21.10 (latest). The only other version I tested was 20.11, where it fails to convert when the HarfBuzz plugin is included with the same issue I linked in my original comment. (To be explicit – I am sure to match the plugin version with the main JAR.)

agreeable agreement.docx (11.0 KB)

@icsk aspose-words-xx.xx-shaping-harfbuzz-plugin provides HarfBuzz only for Windows and its version if 2.7.0. If I understand correctly you are running under Linux and HarfBuzz should in installed separately. So aspose-words-xx.xx-shaping-harfbuzz-plugin will use HarfBuzz installed in your system.
Please note that we do not provide support for old versions of Aspose.Words. And as you mentioned the problem is no longer reproducible with the latest version of Aspose.Words.

You are correct, and sorry for not mentioning earlier: I’m running this on Debian 11 (bullseye). Thanks for confirming that the plugin is only necessary on Windows. That is not clear from the documentation.

@icsk We will improve our documentation to make this more clear. I have logged this task as UEX-225