How to retrive the pdf data from the vector index data?

Basically I want to create one interface where first user can upload and store pdf file in DB. Then user can query those data as like vector data and also based on the requirement from which file answer is generated that can also be retrieve from DB

You would need to convert the content of the PDF to text and index that.