{
    "mode": "perldoc",
    "parameter": "PDF::API2::Basic::PDF::Pages",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/PDF%3A%3AAPI2%3A%3ABasic%3A%3APDF%3A%3APages/json",
    "generated": "2026-06-13T06:32:46Z",
    "sections": {
        "NAME": {
            "content": "PDF::API2::Basic::PDF::Pages - Low-level page tree object\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "A Pages object is the parent to other pages objects or to page objects themselves.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "PDF::API2::Basic::PDF::Pages->new($pdf, $parent)\nThis creates a new Pages object in a PDF. Notice that $parent here is not the file context for\nthe object but the parent pages object for this pages. If we are using this class to create a\nroot node, then $parent should point to the file context, which is identified by not having a\nType of Pages. $pdf is the file object (or a reference to an array of file objects) in which to\ncreate the new Pages object.\n\n$p->findpage($pagenumber)\nReturns the given page, using the page count values in the pages tree. Pages start at 0.\n\n$p->addpage($page, $pagenumber)\nInserts the page before the given $pagenumber. $pagenumber can be negative to count from the\nEND of the document. -1 is after the last page. Likewise $pagenumber can be greater than the\nnumber of pages currently in the document, to append.\n\n@objects = $p->getpages()\nReturns a list of page objects in the document in page order\n\n$p->findprop($key)\nSearches up through the inheritance tree to find a property.\n\n$p->addfont($pdf, $font)\nCreates or edits the resource dictionary at this level in the hierarchy. If the font is already\nsupported even through the hierarchy, then it is not added.\n\n$p->bbox($xmin, $ymin, $xmax, $ymax, [$param])\nSpecifies the bounding box for this and all child pages. If the values are identical to those\ninherited then no change is made. $param specifies the attribute name so that other 'bounding\nbox'es can be set with this method.\n\n$p->procset(@entries)\nEnsures that the current resource contains all the entries in the procsets listed. If necessary\nit creates a local resource dictionary to achieve this.\n\n$p->gettop\nReturns the top of the pages tree\n",
            "subsections": []
        }
    },
    "summary": "PDF::API2::Basic::PDF::Pages - Low-level page tree object",
    "flags": [],
    "examples": [],
    "see_also": []
}