bounds(obj)

The function calculates the geometric bounds of any given page item or text. Use the transforms() function to modify page items. In case the object is any kind of text, additional typographic information baseline and xHeight are calculated.

Type: function

Parameter(s):

  • obj {PageItem | Text}:

    The page item or text to calculate the geometric bounds.

Returns:

  • {Object}:

    Geometric bounds object with these properties: width, height, left, right, top, bottom and for text: baseline, xHeight.