(texts, direction, only_attr=None)
return np.array(sorted(positions))
From a list of textboxes in <texts>, get the border positions for the respective direction.
    For vertical direction, return the text boxes' top and bottom border positions.
    For horizontal direction, return the text boxes' left and right border positions.
    
    <direction> must be DIRECTION_HORIZONTAL or DIRECTION_VERTICAL from pdftabextract.common.
    
    optional <only_attr> must be either 'low' (only return 'top' or 'left' borders) or 'high' (only return 'bottom' or
    'right').
    
    Border positions are returned as sorted NumPy array.
From a list of textboxes in <texts>, get the border positions for the respective direction.
    For vertical direction, return the text boxes' top and bottom border positions.
    For horizontal direction, return the text boxes' left and right border positions.
    
    <direction> must be DIRECTION_HORIZONTAL or DIRECTION_VERTICAL from pdftabextract.common.
    
    optional <only_attr> must be either 'low' (only return 'top' or 'left' borders) or 'high' (only return 'bottom' or
    'right').
    
    Border positions are returned as sorted NumPy array.
From a list of textboxes in <texts > get the border positions for the respective direction . For vertical direction return the text boxes top and bottom border positions . For horizontal direction return the text boxes left and right border positions . <direction > must be DIRECTION_HORIZONTAL or DIRECTION_VERTICAL from pdftabextract . common . optional <only_attr > must be either low ( only return top or left borders ) or high ( only return bottom or right ) . Border positions are returned as sorted NumPy array .
def border_positions_from_texts(texts, direction, only_attr=None):
    """
    From a list of textboxes in <texts>, get the border positions for the respective direction.
    For vertical direction, return the text boxes' top and bottom border positions.
    For horizontal direction, return the text boxes' left and right border positions.
    
    <direction> must be DIRECTION_HORIZONTAL or DIRECTION_VERTICAL from pdftabextract.common.
    
    optional <only_attr> must be either 'low' (only return 'top' or 'left' borders) or 'high' (only return 'bottom' or
    'right').
    
    Border positions are returned as sorted NumPy array.
    """
    if direction not in (DIRECTION_HORIZONTAL, DIRECTION_VERTICAL):
        raise ValueError("direction must be DIRECTION_HORIZONTAL or DIRECTION_VERTICAL (see pdftabextract.common)")
        
    if only_attr is not None and only_attr not in ('low', 'high'):
        raise ValueError("only_attr must be either 'low' or 'high' if not set to None (default)")
    
    if direction == DIRECTION_VERTICAL:
        attr_lo = 'top'
        attr_hi = 'bottom'
    else:
        attr_lo = 'left'
        attr_hi = 'right'        
    
    positions = []
    for t in texts:
        if only_attr is None or only_attr == 'low':
            positions.append(t[attr_lo])
        if only_attr is None or only_attr == 'high':
            positions.append(t[attr_hi])
    
    return np.array(sorted(positions))
def border_positions_from_texts ( texts , direction , only_attr = None ) : if direction not in ( DIRECTION_HORIZONTAL , DIRECTION_VERTICAL ) : raise ValueError ( "direction must be DIRECTION_HORIZONTAL or DIRECTION_VERTICAL (see pdftabextract.common)" ) if only_attr is not None and only_attr not in ( 'low' , 'high' ) : raise ValueError ( "only_attr must be either 'low' or 'high' if not set to None (default)" ) if direction == DIRECTION_VERTICAL : attr_lo = 'top' attr_hi = 'bottom' else : attr_lo = 'left' attr_hi = 'right' positions = [ ] for t in texts : if only_attr is None or only_attr == 'low' : positions . append ( t [ attr_lo ] ) if only_attr is None or only_attr == 'high' : positions . append ( t [ attr_hi ] ) return np . array ( sorted ( positions ) )