protected function buildCentered($squeezeTo, $numberOfPages)
    {
        $pages = $this->newPages($numberOfPages);

        $midLength = $squeezeTo - 2;
        $midOffset = $this->currentPageNumber - $midLength/2;

        $this->addPages($pages, 1, 1);
        $this->addPlaceHolder($pages);

        $this->addPages($pages, $midOffset, $midOffset+$midLength-1);

        $this->addPlaceHolder($pages);

        $this->addPages($pages, $numberOfPages, $numberOfPages);

        return $pages;
    }