this is possible you can ingest PDF documents into Azure Cognitive Search, index them, and then use Azure OpenAI to query the indexed data. you need to Ingest and Index PDF Documents with Azure Cognitive Search and later use cognitive search API.
For more details kindly go through the documentation below
Azure Cognitive Search Documentation
If this helps kindly accept the answer for any assistance ping here thanks much.