public function fixFaultySubSectionShift()
    {
        $subSections = $this->getSubSections();
        if (\count($subSections) > 1) {
            return false;
        }

        $subSection = \current($subSections);
        if ($subSection[0] != 1) {
            return false;
        }

        if ($this->getOffsetFor(1) === false) {
            foreach ($subSections as $offset => list($startObject, $objectCount)) {
                $this->subSections[$offset] = [$startObject - 1, $objectCount];
            }
            return true;
        }

        return false;
    }
public function fixFaultySubSectionShift()
    {
        $subSections = $this->getSubSections();
        if (\count($subSections) > 1) {
            return false;
        }

        $subSection = \current($subSections);
        if ($subSection[0] != 1) {
            return false;
        }

        if ($this->getOffsetFor(1) === false) {
            foreach ($subSections as $offset => list($startObject, $objectCount)) {
                $this->subSections[$offset] = [$startObject - 1, $objectCount];
            }
            return true;
        }

        return false;
    }
public function fixFaultySubSectionShift ( ) { $ subSections = $ this -> getSubSections ( ) ; if ( \ count ( $ subSections ) > 1 ) { return false ; } $ subSection = \ current ( $ subSections ) ; if ( $ subSection [ 0 ] != 1 ) { return false ; } if ( $ this -> getOffsetFor ( 1 ) === false ) { foreach ( $ subSections as $ offset => list ( $ startObject , $ objectCount ) ) { $ this -> subSections [ $ offset ] = [ $ startObject - 1 , $ objectCount ] ; } return true ; } return false ; }
Fixes an invalid object number shift.

This method can be used to repair documents with an invalid subsection header:

<code>
xref
1 7
0000000000 65535 f
0000000009 00000 n
0000412075 00000 n
0000412172 00000 n
0000412359 00000 n
0000412417 00000 n
0000412468 00000 n
</code>

It shall only be called on the first table.

@return bool
Fixes an invalid object number shift .