I need to know if it´s possible to know the margins of each page of a Word document (.doc). I´m using Aspose Words API in Java.
Thank you in advance,
David
Hi
Thanks for your inquiry. Yes of course you can get page margins. You can use PageSetup to achieve this. See the following link for more information.
Hope this helps.
Best regards.
I have a Word document with different margins in each page.
With Aspose Words API for Java, I have the possibility to know the margins of each section, but I can´t get the margin of each page. Is that true?
Thank you in advance,
David
Hi
Thanks for your inquiry. Pages do not have different margins in the Word document. If each page in your document has different margins then each page is represented as separate section. So if you need to get margins of pages then you need to get margins of each section.
Best regards.
Hi,
Hi
Alexander,
inPoints = doc.FirstSection.PageSetup.LeftMargin;
inInches = ConvertUtil.PointToInch(inPoints);
inCentimeters = inInches * 2.54;
awais.hafeez:
Hi Alexander,Thanks for your inquiry. Please note that Document.FirstSection.PageSetup.LeftMargin returns or sets the distance (in double points) between the left edge of the page and the left boundary of the body text. You can easily convert this double value to other units e.g:double inPoints = doc.FirstSection.PageSetup.LeftMargin;double inInches = ConvertUtil.PointToInch(inPoints);// As 1 inch = 2.54 centimetersdouble inCentimeters = inInches * 2.54;I hope, this will help.Best Regards,
Hi
Alexander,
The issues you have found earlier (filed as WORDSNET-2978) have been fixed in this .NET update and this Java update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(18)