Get Start Page Number of Node in Word Document using C# .NET | Vertical Text Direction | Table Position | Flow Charts

Hi Aspose Team:
We have some problems when getting the pagenumber of the Node in document. I’ve tried the following code but need to use plenty of times and it cost much time.Is there any quicker way to get the pagenum or can you reduce the time of this method? It will helps us a lot.

LayoutCollector lc = new LayoutCollector(doc);
int pageNumber = lc.GetStartPageIndex(node);

@ChangYuan,

To ensure a timely and accurate response, please ZIP and attach the following resources here for testing:

  • Your simplified input Word document
  • Please also create a standalone simple Console application (source code without compilation errors) that helps us to reproduce your current problem on our end and attach it here for testing. Please do not include Aspose.Words DLL files in it to reduce the file size.

As soon as you get these pieces of information ready, we will start investigation into your scenario and provide you more information. Thanks for your cooperation.

It meets our requirements by reducing the initialization of LayoutCollector, however we still have problem when we use this method to get the pageindex. This zip file contains a docx file which has 15 pages in total, but the return value of GetStartPageIndex can be 17.
GetPageIndexDemo.zip (208.4 KB)

@ChangYuan,

We are working on your query and will get back to you soon.

@ChangYuan,

We tested the scenario and have managed to reproduce the same problem on our end. For the sake of correction, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-20598. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

@ChangYuan,

Regarding WORDSNET-20598, it is to update you that we have completed the work on this issue and concluded to close this issue with “Not a Bug” status. Please see the following analysis details:

This document contains vertical text - a feature which is not supported by Aspose.Words. Because of this the layout of the document is different and it has 18 pages. Whatever is reported by layout collector is correct, since it only reports what is there in layout model.

We have also logged the following more issues in our bug tracking system:

WORDSNET-20595: Vertical Text Direction not preserved in rendered document - Page 3 and 6-13 have Chinese text with vertical direction. This text is not converting correctly.

WORDSNET-20596: Implement floater positioning in a section with vertical text flow - There is a table on the top-right side of 4th page. In Aspose.Words output, it is pushed downwards and moved to left side which may be contributing to increased number of pages in PDF.

WORDSNET-20597: Incorrect automatic font color inside VML shape - There are a few Textboxes (pictures) on 5th page. In Aspose.Words’ output, they are partially rendering on 4th and partially on 5th pages. MS Word does not show text in these boxes; but Aspose.Words does.

We will further look into the details of these problems and will keep you updated on the status of corrections. We apologize for your inconvenience.

@awais.hafeez

Thanks for your efforts on these problems, I’m looking forward to hearing the latest progress from you.

@ChangYuan,

Sure, we will inform you here as soon as these issues will get resolved in future or any further updates may be available.

The issues you have found earlier (filed as WORDSNET-20597) have been fixed in this Aspose.Words for .NET 21.4 update and this Aspose.Words for Java 21.4 update.