## Merge

Merge two or more PDFs into one.

Preserves named destinations, outlines, and interactive forms. If named destinations conflict, as when a PDF generator automatically generates generic names like "page.1" or "section.8", they are renamed.

### Options

> `java tool.pdf.Merge [options] PDF-filename PDF-filename...`

- -append -- append onto existing first file (else create new PDF). Files merged with this option can be unmerged with Undo.
- -samedoc -- declare that the PDFs to be merged should be considered a single document, as opposed to different documents collected into the same file. With this flag, bookmarks that refer to the same name are not considered conflicts, and outlines are lifted up one level to be at the same level across merged files. (Inspired by Steven Skoczen.)
- -password password -- password if PDF is encrypted. All documents to merge must have this password or no password.

In the absence of -append, the merged version of the PDFs is named with `-m` appended to the first file name.