I have a FastAPI endpoint to receive a PDF with many pages.
The client takes photos of several documents, turns them into one PDF, and sends them to this endpoint.
This endpoint should convert every page back to an image and do some processing on it, this should obviously be done in the background.
What is the most efficient way to do this? I have tried pdf2image, but as their documentation says,
A relatively big PDF will use up all your memory and cause the process to be killed