{
    "content": [
        {
            "type": "text",
            "text": "# pdfdetach(1) (man)\n\n## NAME\n\npdfdetach - Portable Document Format (PDF) document embedded file extractor (version 3.03)\n\n## SYNOPSIS\n\npdfdetach [options] [PDF-file]\n\n## DESCRIPTION\n\nPdfdetach  lists  or  extracts  embedded  files (attachments) from a Portable Document Format\n(PDF) file.\n\n## TLDR\n\n> List or extract attachments (embedded files) from a PDF file.\n\n- List all attachments in a file with a specific text encoding:\n  `pdfdetach list -enc {{UTF-8}} {{path/to/input.pdf}}`\n- Save specific embedded file by specifying its number:\n  `pdfdetach -save {{number}} {{path/to/input.pdf}}`\n- Save specific embedded file by specifying its name:\n  `pdfdetach -savefile {{name}} {{path/to/input.pdf}}`\n- Save the embedded file with a custom output filename:\n  `pdfdetach -save {{number}} -o {{path/to/output}} {{path/to/input.pdf}}`\n- Save the attachment from a file secured by owner/user password:\n  `pdfdetach -save {{number}} {{opw|-upw}} {{password}} {{path/to/input.pdf}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (10 subsections)\n- **EXIT CODES**\n- **AUTHOR**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "pdfdetach",
        "section": "1",
        "mode": "man",
        "summary": "pdfdetach - Portable Document Format (PDF) document embedded file extractor (version 3.03)",
        "synopsis": "pdfdetach [options] [PDF-file]",
        "tldr_summary": "List or extract attachments (embedded files) from a PDF file.",
        "tldr_examples": [
            {
                "description": "List all attachments in a file with a specific text encoding",
                "command": "pdfdetach list -enc {{UTF-8}} {{path/to/input.pdf}}"
            },
            {
                "description": "Save specific embedded file by specifying its number",
                "command": "pdfdetach -save {{number}} {{path/to/input.pdf}}"
            },
            {
                "description": "Save specific embedded file by specifying its name",
                "command": "pdfdetach -savefile {{name}} {{path/to/input.pdf}}"
            },
            {
                "description": "Save the embedded file with a custom output filename",
                "command": "pdfdetach -save {{number}} -o {{path/to/output}} {{path/to/input.pdf}}"
            },
            {
                "description": "Save the attachment from a file secured by owner/user password",
                "command": "pdfdetach -save {{number}} {{opw|-upw}} {{password}} {{path/to/input.pdf}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "encoding specified by the \"-enc\" switch."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Save the specified embedded file. By default, this uses the file name associated with the embedded file (as printed by the \"-list\" switch); the file name can be changed with the \"-o\" switch."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Save the specified embedded file. By default, this uses the file name associated with the embedded file (as printed by the \"-list\" switch); the file name can be changed with the \"-o\" switch."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Save all of the embedded files. This uses the file names associated with the embedded files (as printed by the \"-list\" switch). By default, the files are saved in the cur‐ rent directory; this can be changed with the \"-o\" switch."
            },
            {
                "flag": "-o",
                "long": null,
                "arg": null,
                "description": "Set the file name used when saving an embedded file with the \"-save\" switch, or the directory used by \"-saveall\"."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Sets the encoding to use for text output (embedded file names). This defaults to \"UTF-8\"."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Specify the owner password for the PDF file. Providing this will bypass all security restrictions."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Specify the user password for the PDF file."
            },
            {
                "flag": "-v",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": ""
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "pdffonts",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pdffonts/1/json"
            },
            {
                "name": "pdfimages",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pdfimages/1/json"
            },
            {
                "name": "pdfinfo",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pdfinfo/1/json"
            },
            {
                "name": "pdftocairo",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pdftocairo/1/json"
            },
            {
                "name": "pdftohtml",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pdftohtml/1/json"
            },
            {
                "name": "pdftoppm",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pdftoppm/1/json"
            },
            {
                "name": "pdftops",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pdftops/1/json"
            },
            {
                "name": "pdftotext",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pdftotext/1/json"
            },
            {
                "name": "pdfseparate",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pdfseparate/1/json"
            },
            {
                "name": "pdfsig",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pdfsig/1/json"
            },
            {
                "name": "pdfunite",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pdfunite/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 3,
                "subsections": [
                    {
                        "name": "-list",
                        "lines": 2
                    },
                    {
                        "name": "-save",
                        "lines": 4
                    },
                    {
                        "name": "-savefile",
                        "lines": 4
                    },
                    {
                        "name": "-saveall",
                        "lines": 4
                    },
                    {
                        "name": "-o",
                        "lines": 3,
                        "flag": "-o"
                    },
                    {
                        "name": "-enc",
                        "lines": 3
                    },
                    {
                        "name": "-opw",
                        "lines": 3
                    },
                    {
                        "name": "-upw",
                        "lines": 2
                    },
                    {
                        "name": "-v",
                        "lines": 1,
                        "flag": "-v"
                    },
                    {
                        "name": "-h -help --help",
                        "lines": 1,
                        "flag": "-h",
                        "long": "--help"
                    }
                ]
            },
            {
                "name": "EXIT CODES",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "pdfdetach - Portable Document Format (PDF) document embedded file extractor (version 3.03)\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "pdfdetach [options] [PDF-file]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Pdfdetach  lists  or  extracts  embedded  files (attachments) from a Portable Document Format\n(PDF) file.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "Some of the following options can be set with configuration file commands.  These are  listed\nin square brackets with the description of the corresponding command line option.\n",
                "subsections": [
                    {
                        "name": "-list",
                        "content": "encoding specified by the \"-enc\" switch.\n"
                    },
                    {
                        "name": "-save",
                        "content": "Save the specified embedded file.  By default, this uses the file name associated with\nthe  embedded  file  (as  printed by the \"-list\" switch); the file name can be changed\nwith the \"-o\" switch.\n"
                    },
                    {
                        "name": "-savefile",
                        "content": "Save the specified embedded file.  By default, this uses the file name associated with\nthe  embedded  file  (as  printed by the \"-list\" switch); the file name can be changed\nwith the \"-o\" switch.\n"
                    },
                    {
                        "name": "-saveall",
                        "content": "Save all of the embedded files.  This uses the file names associated with the embedded\nfiles (as printed by the \"-list\" switch).  By default, the files are saved in the cur‐\nrent directory; this can be changed with the \"-o\" switch.\n"
                    },
                    {
                        "name": "-o",
                        "content": "Set the file name used when saving an embedded file with the \"-save\"  switch,  or  the\ndirectory used by \"-saveall\".\n",
                        "flag": "-o"
                    },
                    {
                        "name": "-enc",
                        "content": "Sets  the  encoding  to  use  for text output (embedded file names).  This defaults to\n\"UTF-8\".\n"
                    },
                    {
                        "name": "-opw",
                        "content": "Specify the owner password for the PDF file.  Providing this will bypass all  security\nrestrictions.\n"
                    },
                    {
                        "name": "-upw",
                        "content": "Specify the user password for the PDF file.\n"
                    },
                    {
                        "name": "-v",
                        "content": "",
                        "flag": "-v"
                    },
                    {
                        "name": "-h -help --help",
                        "content": "",
                        "flag": "-h",
                        "long": "--help"
                    }
                ]
            },
            "EXIT CODES": {
                "content": "The Xpdf tools use the following exit codes:\n\n0      No error.\n\n1      Error opening a PDF file.\n\n2      Error opening an output file.\n\n3      Error related to PDF permissions.\n\n99     Other error.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "The pdfinfo software and documentation are copyright 1996-2011 Glyph & Cog, LLC.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "pdffonts(1),  pdfimages(1), pdfinfo(1), pdftocairo(1), pdftohtml(1), pdftoppm(1), pdftops(1),\npdftotext(1) pdfseparate(1), pdfsig(1), pdfunite(1)\n\n\n\n15 August 2011                               pdfdetach(1)",
                "subsections": []
            }
        }
    }
}