Aspose.Words don't read all tabstops

Hi.

In paragraph 2 in the attached document, there are 4 tabstop.

I can only extract one of them from aspose.words. What did I missed?

            var doc = new Aspose.Words.Document(file);
            var sec = doc.Sections[0];
            var body = sec.Body;
            var paragraph = body.Paragraphs[1];
        <span style="color: blue;">var</span> stopsDict = <span style="color: blue;">new</span> <span style="color: rgb(43, 145, 175);">SortedDictionary</span><<span style="color: blue;">double</span>, <span style="color: rgb(43, 145, 175);">TabStop</span>>();
        <span style="color: blue;">var</span> defTabStop = doc.DefaultTabStop;
        <span style="color: blue;">if</span> (paragraph != <span style="color: blue;">null</span>)
        {
            <span style="color: blue;">for</span> (<span style="color: blue;">var</span> i = 0; i < paragraph.ParagraphFormat.Style.ParagraphFormat.TabStops.Count; i++)
            {
                <span style="color: blue;">var</span> stop = paragraph.ParagraphFormat.Style.ParagraphFormat.TabStops[i];
                stopsDict[<span style="color: blue;">double</span>.Parse(stop.Position.ToString())] = stop;
            }
            <span style="color: blue;">for</span> (<span style="color: blue;">var</span> i = 0; i < paragraph.ParagraphFormat.TabStops.Count; i++)
            {
                <span style="color: blue;">var</span> stop = paragraph.ParagraphFormat.TabStops[i];
                stopsDict[<span style="color: blue;">double</span>.Parse(stop.Position.ToString())] = stop;
            }
        }
        <span style="color: blue;">var</span> stops = stopsDict.Values.Where(tabStop => !tabStop.IsClear).ToList();

        <span style="color: blue;">foreach</span> (<span style="color: blue;">var</span> tabStop <span style="color: blue;">in</span> stops)
        {
            <span style="color: rgb(43, 145, 175);">Console</span>.WriteLine(<span style="color: blue;">string</span>.Format(<span style="color: rgb(163, 21, 21);">"Alignment:</span><span style="color: mediumseagreen;">{0}</span><span style="color: rgb(163, 21, 21);">, Posistion:</span><span style="color: mediumseagreen;">{1}</span><span style="color: rgb(163, 21, 21);">"</span>,tabStop.Alignment,tabStop.Position));
        }v</pre>
Hi Bent,

Thanks for your inquiry. I have managed to reproduce the same issues at my side. I have logged these issues as follow:

WORDSNET-7380 : ParagraphFormat.TabStops.Count
WORDSNET-8062 : ParagraphFormat.Style.ParagraphFormat.TabStops.Count

I have linked this forum thread to the same issues and you will be notified via this forum thread once these issues are resolved. We apologize for your inconvenience.

It is very urgent for us to get a fix for this error.

Brgds Bent

PELLE42:

Hi.

In paragraph 2 in the attached document, there are 4 tabstop.

I can only extract one of them from aspose.words. What did I missed?

            var doc = new Aspose.Words.Document(file);
            var sec = doc.Sections[0];
            var body = sec.Body;
            var paragraph = body.Paragraphs[1];
        <span style="color: blue;">var</span> stopsDict = <span style="color: blue;">new</span> <span style="color: rgb(43, 145, 175);">SortedDictionary</span><<span style="color: blue;">double</span>, <span style="color: rgb(43, 145, 175);">TabStop</span>>();
        <span style="color: blue;">var</span> defTabStop = doc.DefaultTabStop;
        <span style="color: blue;">if</span> (paragraph != <span style="color: blue;">null</span>)
        {
            <span style="color: blue;">for</span> (<span style="color: blue;">var</span> i = 0; i < paragraph.ParagraphFormat.Style.ParagraphFormat.TabStops.Count; i++)
            {
                <span style="color: blue;">var</span> stop = paragraph.ParagraphFormat.Style.ParagraphFormat.TabStops[i];
                stopsDict[<span style="color: blue;">double</span>.Parse(stop.Position.ToString())] = stop;
            }
            <span style="color: blue;">for</span> (<span style="color: blue;">var</span> i = 0; i < paragraph.ParagraphFormat.TabStops.Count; i++)
            {
                <span style="color: blue;">var</span> stop = paragraph.ParagraphFormat.TabStops[i];
                stopsDict[<span style="color: blue;">double</span>.Parse(stop.Position.ToString())] = stop;
            }
        }
        <span style="color: blue;">var</span> stops = stopsDict.Values.Where(tabStop => !tabStop.IsClear).ToList();

        <span style="color: blue;">foreach</span> (<span style="color: blue;">var</span> tabStop <span style="color: blue;">in</span> stops)
        {
            <span style="color: rgb(43, 145, 175);">Console</span>.WriteLine(<span style="color: blue;">string</span>.Format(<span style="color: rgb(163, 21, 21);">"Alignment:</span><span style="color: mediumseagreen;">{0}</span><span style="color: rgb(163, 21, 21);">, Posistion:</span><span style="color: mediumseagreen;">{1}</span><span style="color: rgb(163, 21, 21);">"</span>,tabStop.Alignment,tabStop.Position));
        }v</pre></div></BLOCKQUOTE>
Hi Bent,

Thanks for your inquiry. Currently, the issue WORDSNET-8062 is pending for analysis and is in the queue. I am afraid, I cannot provide you any reliable estimate at the moment. Once your issue is analyzed, we will then be able to provide you an estimate.

Regarding issue WORDSNET-7380, I am afraid this issue had been postponed till a later date due to some other important issues and new features. We will inform you as soon as there are any further developments.

We apologize for your inconvenience.

Hi Bent,


Regarding WORDSNET-8062, Could you please share what exact you want to achieve by using ParagraphFormat.Style.ParagraphFormat.TabStops.Count? It seems that you want to get all TabStops for a Paragraph. Please share some more detail about your query.

Many Thanks,

I am reading an account statement from Word and like to transform the text and numbers into Excel.

Having read a paragraph, I like to posision each text frame divided by the tabulator to find out the column in Excel the correspoding text/number will be placed.

For this I need all the tabstop definition.

Brgds /Bent

Hi Bent,


Thanks for your feedback. We will inform you via this forum thread as soon as there are any further update available on this issue.

The issues you have found earlier (filed as WORDSNET-7380) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as WORDSNET-8062) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.