The offending code is right here:
That batch op calls islandora_book_batch_remove_pdf_flag, which is a function that doesn't exist.
This means that the create_pdf flag is not getting removed from paged content batch objects.
I'm recommending a few things here:
1) This function name should be fixed to the actual function name, islandora_paged_content_remove_pdf_flag().
2) In addition, it should not be an extra batch operation, as that just makes it difficult to ensure includes/derivatives.inc is actually loaded when the function is called. Since all islandora_paged_content_remove_pdf_flag() is doing is calling out to $object->relationships->remove(), which doesn't explode if it doesn't find the flag (it just returns FALSE), we could very easily just move it to here somewhere as just a straight call to the function: https://github.com/Islandora/islandora_paged_content/blob/7.x/includes/batch.inc#L192-195 - I've actually implemented it thusly for the OCR stuff: https://github.com/qadan/islandora_paged_content/blob/7.x-ISLANDORA-1533/includes/batch.inc#L299
3) This has likely borked a lot of paged content objects on a lot of boxes. We will need to come up with a drush method to clean up offending RELS-EXTs in existing installs.
Steps to Reproduce-
Batch ingest a book or issue using the book or issue batch ingest process (drush or GUI). A 'create_pdf' relationship will be left over in the RELS-EXT of the paged content object (the book or issue itself).
Batch ingest a book or issue using the book or issue batch ingest process (drush or GUI). There should be no 'create_pdf' relationship in the RELS-EXT of the paged content object (the book or issue itself).
Also should test the drush cleanup pretty thoroughly.
discoverygarden inc. | Managing Digital Content