can anyone tell me how to get the file and extract data from it from postman
class ReadPDFView(APIView):
def post(self, request):
data = request.data.get('pdf_file')
# Assuming you want to extract text from the first page
with pdfplumber.open(data) as pdfs :
first_page_text=pdfs.pages[0]
first_page_text= extract_text(pdfs)
print(first_page_text)
return Response(first_page_text)
I tried this to get the result