How can I help you?
PdfPageImportOptions
6 Feb 20262 minutes to read
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
Get groupFormFields boolean
Gets the boolean value indicating whether the form fields are grouped or not while importing pages.
Set groupFormFields void
Sets the boolean value indicating whether the form fields are grouped or not while importing pages.
| Parameter | Type | Description |
|---|---|---|
| value | boolean |
Indicates form fields grouping |
Get optimizeResources boolean
Gets the boolean value indicating whether the optimize resources while import pages or not
Set optimizeResources void
Sets the boolean value indicating whether the optimize resources while import pages or not
| Parameter | Type | Description |
|---|---|---|
| value | boolean |
Indicates resource optimization. |
Get rotation PdfRotationAngle
Gets the rotation angle of the page to import
Set rotation void
Sets the rotation angle of the page to import
| Parameter | Type | Description |
|---|---|---|
| value | PdfRotationAngle |
Page rotation angle. |
Get targetIndex number
Gets the target page index to import
Set targetIndex void
Sets the target page index to import
| Parameter | Type | Description |
|---|---|---|
| value | number |
Target page index to import. |