{
    "mode": "man",
    "parameter": "pdfattach",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/pdfattach/1/json",
    "generated": "2026-06-15T18:50:25Z",
    "synopsis": "pdfattach [options] input-PDF-file file-to-attach output-PDF-file",
    "sections": {
        "NAME": {
            "content": "pdfattach - Portable Document Format (PDF) document embedded file creator (version 3.03)\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "pdfattach [options] input-PDF-file file-to-attach output-PDF-file\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Pdfattach adds a new embedded file (attachment) to an existing Portable Document Format (PDF)\nfile.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-replace",
                    "content": "Replace embedded file with same name (if it exists)\n"
                },
                {
                    "name": "-v",
                    "content": "",
                    "flag": "-v"
                },
                {
                    "name": "-h -help --help",
                    "content": "",
                    "flag": "-h",
                    "long": "--help"
                }
            ]
        },
        "EXIT CODES": {
            "content": "0      No error.\n\n1      Error opening input PDF file.\n\n2      Error opening file to attach.\n\n3      Output file already exists.\n\n3      There is already an attached file with that name.\n\n5      Error saving the output file.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "The pdfattach software and documentation are copyright 2019 The Poppler developers\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "pdfdetach(1), pdfimages(1), pdfinfo(1), pdftocairo(1), pdftohtml(1), pdftoppm(1), pdftops(1),\npdftotext(1) pdfseparate(1), pdfsig(1), pdfunite(1)\n\n\n\n10 Febuary 2019                              pdfattach(1)",
            "subsections": []
        }
    },
    "summary": "pdfattach - Portable Document Format (PDF) document embedded file creator (version 3.03)",
    "flags": [
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Replace embedded file with same name (if it exists)"
        },
        {
            "flag": "-v",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-h",
            "long": "--help",
            "arg": null,
            "description": ""
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "pdfdetach",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pdfdetach/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"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Add a new attachment (embedded file) to an existing PDF file.",
        "examples": [
            {
                "description": "Add a new attachment to an existing PDF file",
                "command": "pdfattach {{path/to/input.pdf}} {{path/to/file_to_attach}} {{path/to/output.pdf}}"
            },
            {
                "description": "Replace attachment with same name if it exists",
                "command": "pdfattach -replace {{path/to/input.pdf}} {{path/to/file_to_attach}} {{path/to/output.pdf}}"
            },
            {
                "description": "Display help",
                "command": "pdfattach {{-h|--help}}"
            },
            {
                "description": "Display version",
                "command": "pdfattach -v"
            }
        ]
    }
}