New line adding instead of tab space in table format word document

Hi Aspose Support,
I am facing issue while extracting the text from the table format word documents.
It is behaving differently - returning the new line (\n) or, (\r) instead of tab (\t) space , when I am enabling the bullet point extraction.
To enable the bullet point I am using updateListLabels() method. It is happing in the table format data in all the word documents.
Using Aspose.Word 23.7 version. Green image text is with bullet point enabled text. Document is also attached below.


resume.docx (22.7 KB)

@praveenrchilli \r\n is returned before bullet not after it. \r\n is a paragraph break and each list item is a paragraph:

Upon conversion to TXT format tab leaders for list labels are replaced with regular whitespaces to make output content more human readable.

Hi Alexey,
The image you shown, about the new line in paragraph, that is correct, and this is not an issue, here every line is breaking with new line, that is fine, but the issue I have is with multiple column table format document, in which every column data in each line must not be return as a new line, instead of tab space.

@praveenrchilli You can try using TxtSaveOptions.PreserveTableLayout:

Document doc = new Document("C:\\Temp\\in.docx");
Table t = doc.getFirstSection().getBody().getTables().get(0);
TxtSaveOptions opt = new TxtSaveOptions();
opt.setPreserveTableLayout(true);
String tableString = t.toString(opt);
System.out.println(tableString);

Thank you for your suggestion, your given code is resolved that new line issue in the multiple column table format document, but when a cell contains multiple lines, it breaks the cell data into the new line, can you please suggest about this. I am attaching the compared image.



resume.docx (22.7 KB)

@praveenrchilli There are no line breaks, the text is simply wrapped inside table cell. TXT format is quite limited so it is impossible to retain exact document layout in it. In your case there is a single paragraph in the table cell, which is exported to TXT as a sing line of text, this is expected.