{
    "content": [
        {
            "type": "text",
            "text": "# PDF::API2::Outline (perldoc)\n\n## NAME\n\nPDF::API2::Outline - Manage PDF outlines (a.k.a. bookmarks)\n\n## SYNOPSIS\n\n# Get/create the top-level outline tree\nmy $outline = $pdf->outline();\n# Add an entry\nmy $item = $outline->outline();\n$item->title('First Page');\n$item->destination($pdf->openpage(1));\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **METHODS** (3 subsections)\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "PDF::API2::Outline",
        "section": "",
        "mode": "perldoc",
        "summary": "PDF::API2::Outline - Manage PDF outlines (a.k.a. bookmarks)",
        "synopsis": "# Get/create the top-level outline tree\nmy $outline = $pdf->outline();\n# Add an entry\nmy $item = $outline->outline();\n$item->title('First Page');\n$item->destination($pdf->openpage(1));",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "Examine the Outline Tree",
                        "lines": 36
                    },
                    {
                        "name": "Modify the Outline Tree",
                        "lines": 30
                    },
                    {
                        "name": "Set Outline Attributes",
                        "lines": 34
                    }
                ]
            }
        ],
        "sections": {
            "NAME": {
                "content": "PDF::API2::Outline - Manage PDF outlines (a.k.a. bookmarks)\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "# Get/create the top-level outline tree\nmy $outline = $pdf->outline();\n\n# Add an entry\nmy $item = $outline->outline();\n$item->title('First Page');\n$item->destination($pdf->openpage(1));\n",
                "subsections": []
            },
            "METHODS": {
                "content": "",
                "subsections": [
                    {
                        "name": "Examine the Outline Tree",
                        "content": "haschildren\nmy $boolean = $outline->haschildren();\n\nReturn true if the current outline item has child items.\n\ncount\nmy $integer = $outline->count();\n\nReturn the number of descendants that are visible when the current outline item is open\n(expanded).\n\nfirst\nmy $child = $outline->first();\n\nReturn the first child of the current outline level, if one exists.\n\nlast\nmy $child = $outline->last();\n\nReturn the last child of the current outline level, if one exists.\n\nparent\nmy $parent = $outline->parent();\n\nReturn the parent of the current item, if not at the top level of the outline tree.\n\nprev\nmy $sibling = $outline->prev();\n\nReturn the previous item of the current level of the outline tree.\n\nnext\nmy $sibling = $outline->next();\n\nReturn the next item of the current level of the outline tree.\n"
                    },
                    {
                        "name": "Modify the Outline Tree",
                        "content": "outline\nmy $child = $outline->outline();\n\nAdd an outline item at the end of the current outline's list of children.\n\ninsertafter\nmy $sibling = $outline->insertafter();\n\nAdd an outline item immediately following the current item.\n\ninsertbefore\n$sibling = $outline->insertbefore();\n\nAdd an outline item immediately preceding the current item.\n\ndelete\n$outline->delete();\n\nRemove the current outline item from the outline tree. If the item has any children, they will\neffectively be deleted as well since they will no longer be linked.\n\nisopen\n# Get\nmy $boolean = $outline->isopen();\n\n# Set\nmy $outline = $outline->isopen($boolean);\n\nGet/set whether the outline is expanded or collapsed.\n"
                    },
                    {
                        "name": "Set Outline Attributes",
                        "content": "title\n# Get\nmy $title = $outline->title();\n\n# Set\n$outline = $outline->title($text);\n\nGet/set the title of the outline item.\n\ndestination\n$outline = $outline->destination($destination, $location, @args);\n\nSet the destination page and optional position of the outline. $location and @args are as\ndefined in \"destination\" in PDF::API2::NamedDestination.\n\n$destination can optionally be the name of a named destination defined elsewhere.\n\nuri\n$outline = $outline->uri($uri);\n\nLaunch a URI -- typically a web page -- when the outline item is activated.\n\nlaunch\n$outline->launch($file);\n\nLaunch an application or file when the outline item is activated.\n\npdf\n$outline = $outline->pdf($filename, $pagenumber, $location, @args);\n\nOpen another PDF file to a particular page number (first page is zero, which is also the\ndefault). The page can optionally be positioned at a particular location if $location and @args\nare set -- see \"destination\" in PDF::API2::NamedDestination for possible settings.\n"
                    }
                ]
            }
        }
    }
}