/ PDF / PdfPageImportOptions
Search results

PdfPageImportOptions API in JavaScript PDF API control

PdfPageImportOptions class represents to customize the support of import PDF pages

// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data);
// Options to customize the support of import PDF pages.
let options: PdfPageImportOptions = new PdfPageImportOptions();
// Sets the target page index to import
options.targetIndex = 1;
// Sets the rotation angle of the page to import
options.rotation = PdfRotationAngle.angle180;
// Sets the boolean value indicating whether the optimize resources while import pages or not
options.optimizeResources = true;
// Copy the first page and add it as second page with page rotation
document.importPage(0, options);
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();

Properties

groupFormFields boolean

Gets the boolean value indicating whether the form fields are grouped or not while importing pages.

optimizeResources boolean

Gets the boolean value indicating whether the optimize resources while import pages or not

rotation PdfRotationAngle

Gets the rotation angle of the page to import

targetIndex number

Gets the target page index to import