Probably the best answer would be at https://support.algolia.com/hc/en-us/articles/4406981931281-Can-I-index-PDFs-Word-and-other-types-of-documents
At least in the context of WordPress as well, it’d probably be easiest to extract and perhaps turn into posts in a custom post type.
I have a slightly odd take on this… I was implementing Algolia into a site that previously had Relevanssi premium, which was already set up to index PDF.
Long story short, I could use the usual Algolia indexing hooks and just piggyback off of Relevanssi’s PDF indexing server. (Means I don’t need to pay/maintain something myself to do this!). It’s working great.
relevanssi_index_pdf( $attachment_id, false, false );
$content = get_post_meta( $attachment_id, '_relevanssi_pdf_content', true );
Without having access to Relevanssi Premium myself, I have to suspect it most likely extracts the pdf text for you and stores in the database, which is essentially what needs to be done here, except also getting that content sent to Algolia too.