more work on extractpagesdialog