# pdfattach - Portable Document Format (PDF) document embedded file ... - man(1) - [phpMan]

> **TLDR:** Add a new attachment (embedded file) to an existing PDF file.
>
- Add a new attachment to an existing PDF file:
  `pdfattach {{path/to/input.pdf}} {{path/to/file_to_attach}} {{path/to/output.pdf}}`
- Replace attachment with same name if it exists:
  `pdfattach -replace {{path/to/input.pdf}} {{path/to/file_to_attach}} {{path/to/output.pdf}}`
- Display help:
  `pdfattach {{-h|--help}}`
- Display version:
  `pdfattach -v`

*Source: tldr-pages*

---

[_pdfattach_(1)](https://www.chedong.com/phpMan.php/man/pdfattach/1/markdown)                           General Commands Manual                          [_pdfattach_(1)](https://www.chedong.com/phpMan.php/man/pdfattach/1/markdown)

## NAME
       pdfattach - Portable Document Format (PDF) document embedded file creator (version 3.03)

## SYNOPSIS
       **pdfattach **[options] _input-PDF-file_ _file-to-attach_ _output-PDF-file_

## DESCRIPTION
       **Pdfattach **adds a new embedded file (attachment) to an existing Portable Document Format (PDF)
       file.

## OPTIONS
### -replace
              Replace embedded file with same name (if it exists)

### -v     

### -h      -help  --help 

## EXIT CODES
       0      No error.

       1      Error opening input PDF file.

       2      Error opening file to attach.

       3      Output file already exists.

       3      There is already an attached file with that name.

       5      Error saving the output file.

## AUTHOR
       The pdfattach software and documentation are copyright 2019 The Poppler developers

## SEE ALSO
       [**pdfdetach**(1)](https://www.chedong.com/phpMan.php/man/pdfdetach/1/markdown), [**pdfimages**(1)](https://www.chedong.com/phpMan.php/man/pdfimages/1/markdown), [**pdfinfo**(1)](https://www.chedong.com/phpMan.php/man/pdfinfo/1/markdown), [**pdftocairo**(1)](https://www.chedong.com/phpMan.php/man/pdftocairo/1/markdown), [**pdftohtml**(1)](https://www.chedong.com/phpMan.php/man/pdftohtml/1/markdown), [**pdftoppm**(1)](https://www.chedong.com/phpMan.php/man/pdftoppm/1/markdown), [**pdftops**(1)](https://www.chedong.com/phpMan.php/man/pdftops/1/markdown),
       [**pdftotext**(1)](https://www.chedong.com/phpMan.php/man/pdftotext/1/markdown) [**pdfseparate**(1)](https://www.chedong.com/phpMan.php/man/pdfseparate/1/markdown), [**pdfsig**(1)](https://www.chedong.com/phpMan.php/man/pdfsig/1/markdown), [**pdfunite**(1)](https://www.chedong.com/phpMan.php/man/pdfunite/1/markdown)

                                           10 Febuary 2019                              [_pdfattach_(1)](https://www.chedong.com/phpMan.php/man/pdfattach/1/markdown)
