Free Support Forum - aspose.com

Borders in a word document

Hi, I am working with the borders in java.
I have a method in the borderCollection “getByBorderType()”. It is return a int. But I don’t know what is the match with this value. Where can I find this information?
Thanks,
Alex

Hi Alex,


Thanks for your inquiry. Please check the following members of BorderType enumeration:

Member Name Description Value
None Default value. -1
Bottom Specifies the bottom border of a paragraph or a table cell. 0
Left Specifies the left border of a paragraph or a table cell. 1
Right Specifies the right border of a paragraph or a table cell. 2
Top Specifies the top border of a paragraph or a table cell. 3
Horizontal Specifies the horizontal border between cells in a table or between conforming paragraphs. 4
Vertical Specifies the vertical border between cells in a table. 5
DiagonalDown Specifies the diagonal border in a table cell. 6
DiagonalUp Specifies the diagonal border in a table cell. 7

Best regards,

Thanks for your reply.
However, I don’t understand. Because when I use the getByBorderType method(), I have to define a int in parameter. But I don’t which int I have to put…

Secondly, I am working with cell node (from a DOM). And when I tried to display the borders, I have a mistake: “The requested border is not available for this object.” How can I fix it?

Regards,

One last question, what is the real difference between getHeight() and getHeightRule()?
(There are two methods in the RowFormat class). I read the documentation in your website, but nevertheless, I don’t understand the differences between those methods …

Thanks!

Hi Alex,


Thanks for your inquiry. RowFormat.Height property is used to get or set the height of the table row in point and RowFormat.HeightRule property is used to get or set the rule for determining the height of the table row. These are same features as shown in attached screenshot of MS Word 2013.

Best regards,