Copy link to clipboard
Copied
Hello! I have a huge form PDF. Each page is numbered with a suffix, e.g. "3001.FK...". Can a script be used to delete all pages whose name begins with a specific ID? So here, for example, "3001"? Currently I do this in the script for each individual page. However, maintaining the code is extremely time-consuming.
Copy link to clipboard
Copied
Yes, this is possible. You can examine each page's label ("name") using the getPageLabel method, and then delete it using the deletePages method. You can do it in a loop to examine all the pages in the file. However, you should start the loop from the last page in the file and work your way backwards to the first one for it to work correctly.