IMO it would be difficult to find the ISBN identifiers inside the document without generating a lot of noise.
- Books present ISBN in various formats, e.g. 978-0-00000-000-0 and 9-78-000-0000-000. A script would have to take all possible formats into consideration.
- Older books may contain ISBN-10 only.
- If the PDF is scanned, there could be further complications introduced by the OCR process.
- An ISBN identifier (ISBN-10 especially) can be indistinguishable from e.g. a phone number.
An alternative is to match the book with an online database. Try running the Google Books Metadata add-on script. Sometimes it returns satisfactory results. Sometimes not.