NPM Package/docs/components/pdf/page-copy-paste
Copy & Paste
Copy pages into the canvas clipboard and paste them into the active PDF using the SDK.
Copy and paste work together as one canvas-local clipboard flow. The parent tells the canvas which pages to copy, then later tells it where to paste them.
The parent application never sends page bytes, base64, or a file object between these two actions. The clipboard exists only inside the same canvas session.
- page-copy uses
pageRange. - page-paste uses
targetPageIndex. - Paste only works after a successful copy in the same canvas session.
- If
targetPageIndexis missing, paste fails even if the action name is correct.
Invoke page actions in sequence to achieve copy and paste.
typescript
How It Works
Example showing how to copy and paste programmatically:
typescript
Vanilla TS Integration
Open the focused demo to copy a page and paste it into another position in the same canvas session.
PDF Copy & Paste Demo
Focused live demo for the canvas-local copy/paste workflow.
Preview opens in a large modal for zoom-friendly review.
