How do I add an event listener for when pages are deleted?

I’m trying to add a method that gets called when pages are deleted through the UI.

I’ve tried calling instance.Core.documentViewer.addEventListener() with “removePages”, “removePage” and “delete” but none of them worked. I can’t find anything else in the documentation that suggests how to do this.

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:


Hello Mark,

The events for page alterations (adding, deleting, and moving pages) is all wrapped into 1 event: layoutChanged
Here is the API reference for layoutChanged

The event will return details on which operation was performed and on which pages.

Please let me know if there are any issues.

Best Regards,
Ahmad Moaaz
Software Developer
PDFTron Systems, Inc.