Fixed
- The bundled PDF.js now polyfills
Math.sumPrecise(Chrome 147). PDF.js 6 calls it
when it rebuilds fonts, lays out XFA tables and saves a document, so on older engines
those paths failed withMath.sumPrecise is not a function. Thanks to @delagen for
tracking it down. (#422) - Text search threw
RegExp.escape is not a functionon Chrome 125 to 135. The find
controller inviewer.mjsneeds it; it now picks it up from the polyfills that
pdf.mjsinstalls, sincepdf.mjsruns first. Uint8Array.prototype.toBase64andUint8Array.fromBase64(Chrome 140) are
polyfilled too. Saved signatures, base64 images in XFA forms and one font-loading
fallback use them.bytes()onResponse,BlobandRequest(Chrome 132) is polyfilled by hand,
since core-js has no module for it. PDF.js uses it to fetch standard font data
(Symbol, ZapfDingbats) and built-in CJK CMaps, so on older engines those fonts fell
back to substitutes and CJK text using a predefined CMap didn't render at all. It
also backs inserting pages from another PDF and compressing streams on save.
Thanks to @delagen for spotting it and suggesting the fix. (#445)
With these, the practical floor for the modern build is about Chrome 125, where CSS
round() sets the limit and no polyfill helps.