> 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/salesforce/page-manipulation.md).

# Page manipulation

- [PDF Manipulation with JavaScript Library](https://docs.apryse.com/salesforce/page-manipulation/page-manipulation.md): Enhance your PDF documents with WebViewer's JavaScript PDF library for seamless page manipulations like rotating, cropping, reordering, and more. Explore the full source-code and tools for efficient P
- [Samples for manipulating PDFs using JavaScript](https://docs.apryse.com/salesforce/page-manipulation/page-manipulation/samples.md): Learn how to manipulate pages and thumbnails in your documents with ease. Rotate, crop, add, delete, change order, insert blanks, and merge files effortlessly. Thumbnail controls for seamless page man
- [API for PDF Manipulation in JavaScript](https://docs.apryse.com/salesforce/page-manipulation/page-manipulation/apis.md): Enhance your document management with WebViewerInstance APIs. Learn how to manipulate documents, extract pages, and more with this comprehensive guide. Salesforce WebViewer adds accurate, reliable doc
- [Inserting a page into a PDF using JavaScript](https://docs.apryse.com/salesforce/page-manipulation/insert.md): Learn how to insert pages into a PDF document with ease using insertBlankPages and insertPages functions. Find out how to copy or move pages between PDFs effectively. Salesforce WebViewer adds accurat
- [Removing pages from PDF using JavaScript](https://docs.apryse.com/salesforce/page-manipulation/remove.md): Learn how to remove pages from a PDF document with the removePages function. Follow our step-by-step guide for easy removal of unwanted pages. Salesforce WebViewer adds accurate, reliable document pro
- [Rotating pages in PDF using JavaScript](https://docs.apryse.com/salesforce/page-manipulation/rotate.md): Learn how to rotate pages in PDF documents using WebViewer API. Rotate pages in the viewer or in the document data with ease. Find rotation values and functions to manipulate rotations effectively. Sa
- [Cropping PDF pages using JavaScript](https://docs.apryse.com/salesforce/page-manipulation/crop.md): Learn how to crop PDF pages with the cropPages function. Pass an array of pages & specify the amount to crop from each side based on document rotation. Click to optimize your PDFs now! Salesforce WebV
- [Reordering PDF pages using JavaScript](https://docs.apryse.com/salesforce/page-manipulation/reorder.md): Learn how to reorder pages in a PDF document with the movePages function. Optimize your workflow and manage your files efficiently. Salesforce WebViewer adds accurate, reliable document processing to
- [Extracting pages from PDF using JavaScript](https://docs.apryse.com/salesforce/page-manipulation/split.md): Learn how to download specific pages from a document using the extractPages function. Find out how to easily extract only the pages you need. Salesforce WebViewer adds accurate, reliable document proc
- [Merging PDF pages using JavaScript](https://docs.apryse.com/salesforce/page-manipulation/merge.md): Merge multiple PDF files easily using the insertPage function on the Document instance. Learn how to merge files without WebViewer by setting specific flags for Core to function correctly. See example
- [Thumbnail Controls](https://docs.apryse.com/salesforce/page-manipulation/thumbnails-controls.md): Learn how to efficiently manage pages in your document with the thumbnail panel in WebViewer. Rotate, delete, reorder, merge pages and more with ease. Optimize your document workflow now! Salesforce W


---

# 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/salesforce/page-manipulation.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.
