diff --git a/tcpdi_parser.php b/tcpdi_parser.php index 1e26664..407a211 100644 --- a/tcpdi_parser.php +++ b/tcpdi_parser.php @@ -483,7 +483,7 @@ protected function decodeXrefStream($startxref, $xref=array()) { $v = $sarr[$key]; if (($key == '/Type') AND ($v[0] == PDF_TYPE_TOKEN AND ($v[1] == 'XRef'))) { $valid_crs = true; - } elseif (($key == '/Index') AND ($v[0] == PDF_TYPE_ARRAY AND count($v[1] >= 2))) { + } elseif (($key == '/Index') AND ($v[0] == PDF_TYPE_ARRAY AND intval($v[1] >= 2))) { // first object number in the subsection $index_first = intval($v[1][0][1]); // number of entries in the subsection