This post si a demo of the ACF File field.
It contains an ACF file field linking to a PDF document url:
Each time the post is saved, the PDF document is downloaded, it’s content extracted and inserted in the post content, during Solr indexing. See details.
Then, if you search for a keyword contained in the PDF document, this demo post will be displayed in the results, and the keyword will be highlighted. Exactly as if the PDF was copied in the post content.