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

Free Support Forum - aspose.com

I can't get the “Phonetic Guide” content

test2.docx (11.4 KB)

See attachment, I can’t get the contents of this doc.

my sdk version is aspose-words:22.4:jdk17

@Rock_Zhang Phonetic Guide content in MS Word documents is represented using EQ fields. If you toggle field codes in your document (Alt+F9) you will see the following:

You can get these fields from the document using code like the following:

Document doc = new Document("C:\\Temp\\in.docx");
for (Field f : doc.getRange().getFields())
    if (f.getStart().getFieldType() == FieldType.FIELD_EQUATION)

I know this,but i want to get the text by “paragraph.toString(SaveFormat.TEXT)”.

@Rock_Zhang Thank you for additional information. The problem in your case occurs because to represent Phonetic Guide it must be rendered. For example if you convert the document to HTML, it will be rendered to image. Since image cannot be exported to TXT it is lost.
Could you please let us know what should be the expected output of paragraph.toString(SaveFormat.TEXT)?

Like this: “脑(nǎo)袋(dài)” or “(nǎo)脑(dài)袋”

@Rock_Zhang Thank you for additional information. The issue has been logged as WORDSNET-23839. We will keep you informed and let you know once it is resolved.
Currently, the only way is creating a custom converter and parse EQ field in your code.

Hi, I would like to ask how long this issue is expected to be resolved?

@Rock_Zhang Unfortunately, at the moment, I cannot provide you an estimate. The issue is currently in a que for analysis. Once our development team finish the analysis we will be able to provide you more information or estimate.