> If browsers can decide to render PDFs
They do that with JS (or at least they did at one point). Similar libraries exist for XSLT if you want newer versions than what browsers natively support, for jpegxl, and many other formats.