Hi, I have 2 problems:
#1. Is it possible to know when a paragraph belong to 2 different pages? I saw the getKeepTogether property of getParagraphFormat() but it don´t resolve my question.
#2. When a paragraph has an image that is square with text, How I can to know the left indent of these lines? E.g: (x = image, a = text)
Sorry about my English and thanks.
Hi, I have 2 problems:
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thanks for your interest in Aspose.Words.
As you may know MS Word document is flow document and does not contain any information about its layout into lines and pages. Technically there is no “Page” and “Line” concept in Word document. Our Rendering Engine layouts documents into lines and pages. But unfortunately, there is no public API, which allows you to determine where page starts or ends. Also, there is no way to find the position of the particular node on page. Your request has been linked to the appropriate issue. You will be notified as soon as this feature is supported.
Regarding the second questions, if I understand you correctly, I think you can try calculating this value using shape.getSizeInPoints() and doc.getFirstSection().getPageSetup().getPageWidth();
Any progress on that? I’m tring to find out at least on which page paragraph starts.
Thanks for your inquiry. At the moment this issue is pending for analysis. The responsible developer will analyze the issue and I will be able to provide you an estimate.
10.0pt;font-family:“Courier New”;color:#2B91AF;mso-no-proof:yes”>Document<span style=“font-size:10.0pt;font-family:“Courier New”;mso-no-proof:yes”> doc = new Document();<o:p></o:p>
DocumentBuilder builder = new DocumentBuilder(doc);
// Build a sample paragraph which spans across two pages.
builder.Write("Text on first page ");
builder.Write("Text on second page");
Paragraph firstParagraph = doc.FirstSection.Body.FirstParagraph;
// Move to the beginning of the paragraph.
Field firstPageField = builder.InsertField("PAGE", "");
// Move to the end of the paragraph.
Field lastPageField = builder.InsertField("PAGE", "");
// Parse the page numbers of the start and end of the paragraph.
int startingPage = int.Parse(firstPageField.Result);
int endingPage = int.Parse(lastPageField.Result);
// Remove the fields.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.