Skip to main content

RemovePage

Removes page by index from document 💡 You can't delete last page

Syntax

expression.RemovePage(index);

expression - A variable that represents a ApiDocument class.

Parameters

NameRequired/OptionalData typeDefaultDescription
indexRequirednumberpage index

Returns

boolean

Example

Delete a page from a PDF.

// How do I remove an unwanted page from a PDF?

// Delete a specific page number from a PDF.

let doc = Api.GetDocument();
doc.AddPage(1);
doc.RemovePage(0);