I have already solved this problem, if you want to convert pdf to base64, if binary(0,1) is needed than I can do that very fast, maybe within half hour. Dm me if you want to discuss more.
I am an experienced professional in full stack development with tech stack of React, node, express, spring and graphs.
I am just putting time 2 days, incase any complexity arises or I might have misunderstood your problem.