public function getSegmentCount($pageNumber = '', $fragmentNumber = '')
    {


        if ($pageNumber == '')
            throw new Exception('page number not specified');

        if ($fragmentNumber == '')
            throw new Exception('fragment number not specified');


        $strURI = Product::$baseProductUri . '/pdf/' . $this->getFileName() . '/pages/' . $pageNumber . '/fragments/' . $fragmentNumber;

        $signedURI = Utils::sign($strURI);

        $responseStream = Utils::processCommand($signedURI, 'GET', '', '');

        $json = json_decode($responseStream);

        return count($json->TextItems->List);
    }
public function getSegmentCount($pageNumber = '', $fragmentNumber = '')
    {


        if ($pageNumber == '')
            throw new Exception('page number not specified');

        if ($fragmentNumber == '')
            throw new Exception('fragment number not specified');


        $strURI = Product::$baseProductUri . '/pdf/' . $this->getFileName() . '/pages/' . $pageNumber . '/fragments/' . $fragmentNumber;

        $signedURI = Utils::sign($strURI);

        $responseStream = Utils::processCommand($signedURI, 'GET', '', '');

        $json = json_decode($responseStream);

        return count($json->TextItems->List);
    }
public function getSegmentCount ( $ pageNumber = '' , $ fragmentNumber = '' ) { if ( $ pageNumber == '' ) throw new Exception ( 'page number not specified' ) ; if ( $ fragmentNumber == '' ) throw new Exception ( 'fragment number not specified' ) ; $ strURI = Product :: $ baseProductUri . '/pdf/' . $ this -> getFileName ( ) . '/pages/' . $ pageNumber . '/fragments/' . $ fragmentNumber ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ json = json_decode ( $ responseStream ) ; return count ( $ json -> TextItems -> List ) ; }
Gets count of the segments in a fragment.

@param integer $pageNumber Number of the page.
@param integer $fragmentNumber Fragment number.

@return integer
@throws Exception
Gets count of the segments in a fragment .