PDF Generation Template Editor
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
Insert a blank page or pages from other PDFs into the target document.
This example shows how to insert a blank page:
// Insert after the first page.
const pageIndex = 1;
const width = 612;
const height = 792;
docViewer.insertBlankPage(pageIndex, width, height);This example shows how to insert pages from other PDFs:
const file = {...}; // File Object.
const pageIndexToInsert = 1;
const pagesToInsert = [1, '3-5']; // Insert the range of PDF pages.
docViewer.insertPages(file, pageIndexToInsert, pagesToInsert);