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

Free Support Forum - aspose.com

Carriage returns at beginning of runs

Hi there

I’m using Aspose.Words to parse a .doc file. Strangely, in the table of contents on page 5, each run of text begins with a carriage return - I thought these characters should end a paragraph, not start it. I’m wondering is it a problem with the program that created the document initially, or maybe it is Aspose.Words not processing it correctly.

I’ve attached the file for your own testing purposes if you wish.




<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. You are right, “\r” in MS Word documents is paragraph break. However, sometimes in MS Word documents \r can be just a character within a Run, as in your case. MS Word still considers such characters as paragraph breaks and shows them appropriately. You can use DocumentExplorer (Aspose.Words demo) to check structure of your document.

Best regards.