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)
        System.out.println(f.getFieldCode());
}

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.

The issues you have found earlier (filed as WORDSNET-23839) have been fixed in this Aspose.Words for .NET 22.8 update also available on NuGet.

1 Like

I retest the “test2.docx” and it work ok. but i test the “test3.docx”(see attachment), it still have the problems,this confuses me.

test3.docx (13.4 KB)

@Rock_Zhang Thank you for additional information. I have managed to reproduce the problem and logged it as WORDSNET-24363. We will keep you informed and let you know once it is resolved.
It looks like the problem is in the way the EQ field is internally represented in the document. We will further investigate the problem and will keep you updated.

1 Like

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