I was also dealing with this recently. I wasted a lot of time trying to get these full PDF viewers like PDF.JS and similar products working, but it was always buggy, slow and resource intensive.
In the end, I used the Heyzine service. It has an API, so everything can be automated. I just upload a PDF to a Pages database upload field and it will automatically be turned into a PDF player view in the background. (This is coded into the Pages view templates.) There is a yearly fee, but its totally worth it for me.
This is how the Pages record view looks like: