Skip to content
ComPDF

PDF Generation Template Editor

Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.

View on GitHub

Move Pages

This example shows how to move pages:

javascript
// Move the first page of the document to the second page.
const pagesIndexToMove = [0];
const targetPageIndex = 2;
docViewer.movePages(pagesIndexToMove, targetPageIndex);