Use CopyForm to remove any unwanted pages. CopyForm takes two parameters a first page and a last page. You can call CopyFrom multiple times to add what pages you want. Something like this:
You can also use MergeFile in a similar fashion.
Attached is an example and input PDF file that removes page number three from the output.
More Toolkit sample code at https://github.com/ActivePDF/Toolkit