Aspose word java breaks run by format / style

Hi,


I have noticed that Aspose breaks down a word document into runs by formatting.
Like, if in my word document i have :

This is one Run <>

it reports the above line as one run.

But if i have :

This is one Run <<Pattern>>

It reports the above as 3 runs :
1. This is one Run <<
2. Pattern
3. >>

Is there a way to surpass this?
I would like to have the second statement too as a single run.

As we use pattern matching to further process the runs, this way of breaking down a word document creates issues.

Thanks

Hi Katharine,

Thanks for your inquiry. Please note that formatting is applied on a few different levels. For example, let’s consider formatting of simple text. Text in documents is represented by Run element and a Run can only be a child of a Paragraph. You can apply formatting

1) to Run nodes by using Character Styles e.g. a Glyph Style,
2) to the parent of those Run nodes i.e. a Paragraph node (possibly via paragraph Styles)
3) you can also apply direct formatting to Run nodes by using Run attributes (Font). In this case the Run will inherit formatting of Paragraph Style, a Glyph Style and then direct formatting.

ebaoaus:
Is there a way to surpass this?
I would like to have the second statement too as a single run.
No. The direct formatting is applied to text <<Pattern>>. In this case, there will be three Run node. If the formatting of all run nodes is same, you can use Paragraph.JoinRunsWithSameFormatting method to join runs nodes.