25 ms·
Would PDF 2.0 (which also depends JPEG XL and Brotli) put pressure on Firefox and Windows to add more easy to use support?
by JyrkiAlakuijala 11mo ago
Would PDF 2.0 (which also depends JPEG XL and Brotli) put pressure on Firefox and Windows to add more easy to use support?
- jchw 11mo agoI don't think so: JPEG 2000, as far as I know, isn't generally supported for web use in web browsers, but it is supported in PDF.
- fmajid 11mo agoJPEG-XL is recommended as the preferred format for HDR content for PDFs, so it’s more likely to be encountered: https://www.theregister.com/2025/11/10/another_chance_for_jpeg_xl/ https://www.theregister.com/2025/11/10/another_chance_for_jp...
- jchw 11mo agoWhat I mean to say is, I believe browsers do support JPEG 2000 in PDF, just not on the web.
- Zardoz84 11mo agothe last time that I check it, I find that I need to convert to Jpeg to show the image in browsers.
- jchw 11mo agoA *PDF* with embedded JPEG 2000 data should, as far as I know, decode in modern browser PDF viewers. PDF.js and PDFium both are using OpenJPEG. But despite that, browsers don't currently support JPEG 2000 in general. I'm saying this to explain how JPEG XL support in PDF isn't a silver bullet. Browsers already support image formats in PDF that are not supported outside of PDF.
- bmicraft 11mo agoI'm not convinced HDR PDFs will be a common thing anytime soon, even without this chicken and egg problem of support
- RobotToaster 11mo agoSo Firefox (or others) can't open a pdf with a embedded jpeg-2000/XL? Or does pdf.js somehow support it?
- lxgr 11mo agoSeems like it: https://github.com/mozilla/pdf.js.openjpeg https://github.com/mozilla/pdf.js.openjpeg This test renders correctly in Firefox, in any case: https://sources.debian.org/data/main/p/pdf2djvu/0.9.18.2-2/tests/test-jpeg2000.pdf https://sources.debian.org/data/main/p/pdf2djvu/0.9.18.2-2/t...
- jchw 11mo agoApparently I really flubbed my wording for this comment. I'm saying they do support it inside of PDF, just not elsewhere in the web platform.
- alwillis 11mo ago> I don't think so: JPEG 2000, as far as I know, isn't generally supported for web use in web browsers, but it is supported in PDF. Safari supported JPEG 2000 since 2010 but removed support last year [1]. [1]: https://bugs.webkit.org/show_bug.cgi?id=178758 https://bugs.webkit.org/show_bug.cgi?id=178758
- GuB-42 11mo agoBrotli? Is it still relevant now that we have Zstandard? Zstandard is much faster in just about every benchmark, sometimes Brotli has a small edge when it comes to compression ratio, but if you go for compression ratio over speed, LZMA2 beats them both. Both Zstandard (zstd) and LZMA2 (xz) are widely supported, I think better supported than Brotli outside of HTTP.
- JyrkiAlakuijala 11mo agoBrotli decompresses 3-5x faster than LZMA2 and is within 0.6 % of the compression density, and much better for short documents. ZStandard decompresses ~2x faster than Brotli but is 5 % less dense in compression density, and even less dense for short documents or documents where the static dictionary can be used. Brotli is not slow to decompress -- generally a little faster then deflate through zlib. Last time I measured, Brotli had ~2x smaller binary size than zstd (dec+enc).
- GuB-42 11mo agoStraight from the horse's mouth! The thing is that Brotli is clearly optimized for the web (it even has a built-in dictionary), and ZStandard is more generic, being used for tar archives and the likes, I wonder how PDF would fit in here.