How to set up "Compress only punctuation" at Java

As mentioned in the title, punctuation of Aspose.Words is not enabled for compression by default, but our company requires that “Compress only punctuation” be enabled for the typesetting of our documents. I have found many apis, but I still can’t find how to implement it, so I need your help

@wslioy Unfortunately, Aspose.Words does not provide public API to get/set character spacing control. I have logged this feature request as WORDSNET-24455. We will consider exposing this option in the Aspose.Words public API.
Currently, Aspose.Words can only preserve character spacing control set in your documents. So you can enable this option in the template document, which will be used as the start document for generating documents using Aspose.Words.

I have thought about controlling the character spacing of punctuation marks alone, but I find it is very difficult. I control the punctuation marks by ‘paragraph’. Is there any other way to control the word spacing of punctuation marks

@wslioy Aspose.Words is limited to the features supported by file formats processed by Aspose.Words. In MS Word character spacing control can be set in Typography options for a whole document:

This option is stored in settings.xml and is preserved as is by Aspose.Words:

<w:characterSpacingControl w:val="compressPunctuation"/>

How do I use this option to “w: characterSpacingControl”, I now use “DocumentBuilder” is the function of this class, I can through the API to open the options? I haven’t used “settings.xml” before, so I’m not familiar with it

@wslioy As I mentioned in my previous answer, Aspose.Words does not provide public API to get/set character spacing control. This feature request has been logged as WORDSNET-24455. We will let you know once it is resolved.

The issues you have found earlier (filed as WORDSNET-24455) have been fixed in this Aspose.Words for Java 23.2 update.