> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/cli/pdf-pagemaster/usage/insert.md).

# Inserting pages into a PDF from command-line

Merge pages from multiple input documents into a new output file with the pagemaster tool. Learn how to insert, append, or prepend files with specified page ranges. Try it now! The Apryse CLI streamli

Pages from multiple input documents can be sequentially inserted (or appended) into a new output document. Users can optionally specify a range of pages to use from each input document.

**Syntax:**

`pagemaster (-i or \--insert) \<file to insert\> \<input files\>`

By default, the inserted file is appended to the input files, but otherwise the following options can be used:

\--before \<page number>

causes the inserted file to be inserted before page \<page number>

\--after \<page number>

causes the inserted file to be inserted after page \<page number>

## **Examples**

Insert toinsert.pdf before page 4 in inserted.pdf:

`pagemaster -i toinsert.pdf --before 4 inserted.pdf`

Append toinsert.pdf to append.pdf:

`pagemaster -i toinsert.pdf append.pdf`

Prepend toinsert.pdf to prepend.pdf:

`pagemaster -i toinsert.pdf --before 1 prepend.pdf`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.apryse.com/cli/pdf-pagemaster/usage/insert.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
