Thanks for your inquiry. Please manually create your expected Word document using Microsoft Word and attach it here for our reference. We will investigate how you want your final Word output be generated like. We will then provide you more information on this along with code.
Thanks for your inquiry.
Please note that MS Word document is flow document and does not contain
any information about its layout into lines and pages. Therefore,
technically there is no “Page” concept in Word document. Pages are
created by Microsoft Word on the fly.
Aspose.Words uses our own Rendering Engine to layout documents into pages. The Aspose.Words.Layout namespace provides
classes that allow to access information such as on what page and where
on a page particular document elements are positioned, when the document
is formatted into pages. Please read about LayoutCollector and
LayoutEnumerator from here:
We are working over your query and will update you asap.
Thanks for your patience. In your case, you need to get the text of line where the specific text ($HDR) exists and remove the text from the specific text to the end of line. To get the text where the line ends, the DocumentLayoutHelper sample fit in this case.
Please check “DocumentLayoutHelper” example project in Aspose.Words for .NET examples repository at GitHub. This sample demonstrates how to easily work with the layout elements of a document and access the pages, lines, spans etc. Note that this sample application is in .NET.
The DocumentLayoutHelper’s code for
Java is not available at the moment. We have already logged a new task
for this in our issue tracking system as WORDSJAVA-740. Your request has
been linked to this Task. We will update you via this forum thread once
the code sample of DocumentLayoutHelper is available. We apologize for
Sure, we will update you via this forum thread once DocumentLayoutHelper’s code for
Java is available. Thanks for your patience.