Please be aware that this is not necessarily too good of a solution, as you might have mixed pdfs That is, one page is native PDF and does contain some text, the next pages are scanned. You won’t know that using that method.
Depending on what you want to do with them, and if you need this specific information (whether a particular page is scanned or not), I would rather use the Digitize Document activity with a free OCR engine (like Microsoft). The DocumentObjectModel output of the Digitize Document activity contains an array of Pages, and each page has a ProcessingSource which can be either Ocr or Pdf. If it is Ocr - that page was passed through an OCR engine for processing. If it is Pdf - that page was native and read directly.
You might want to use the text output of the Digitize Document activity as well, if you need that output, knowing that the Digitize Document activity only performs OCR if it cannot read text directly from a given page, otherwise it doesn’t call the OCR engine you drag and drop inside.
What is the exact use case you need to cover?