Split PDF File Using PDF.JS

I’m working on a project where I’m trying to process PDF files using OCR (Optical Character Recognition). I’ve managed to split the PDF into individual pages using PDF.js on the client side, but now I’m stuck on how to upload each page to the backend for OCR processing.

Here’s what I’ve done so far:

Successfully integrated PDF.js into my project to split the PDF into separate pages.
I can access each page as a canvas element and perform some basic processing.
However, I’m struggling with the next steps:

How do I upload each page of the PDF to the backend one by one after splitting it using PDF.js?