this post was submitted on 01 Feb 2024
262 points (93.1% liked)
Technology
59414 readers
3554 users here now
This is a most excellent place for technology news and articles.
Our Rules
- Follow the lemmy.world rules.
- Only tech related content.
- Be excellent to each another!
- Mod approved content bots can post up to 10 articles per day.
- Threads asking for personal tech support may be deleted.
- Politics threads may be removed.
- No memes allowed as posts, OK to post as comments.
- Only approved bots from the list below, to ask if your bot can be added please contact us.
- Check for duplicates before posting, duplicates may be removed
Approved Bots
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
OK... stepping out of gut feelings into reality:
As for "Their Appleness's consideration" they generally use floating point numbers for coordinates and sizes. Which is how, as it says in the OP's article, it's able to handle a PDF trillions of light years in size. A double precision floating point number can be really big.
More important though, it means you can process it with hardware accelerated floating point operations which are incredibly fast. And Apple's PDF renderer needed to be fast because for years PDF was the data format used by the window manager for pretty much all screen drawing operations. They weren't doing that on modern fast hardware either, they were doing it decades ago on slow hardware. With decent performance.
If there are features missing it's probably because they would slow things down too much.
It's unclear why Acrobat has to have a limitation at all, since other PDF programs have no such limitation. More importantly, Acrobat only supports up to 200.00 x 200.00 in (5.08 x 5.08 m) using the standard
MediaBox
setting - any higher than that and you get a warning. The only way to push past that is to also set aUserUnit
value, which essentially acts as a multiplier. This is all detailed in the article.But Apple's Preview doesn't support
UserUnit
, meaning a PDF larger than 200 x 200 in can't be displayed correctly in both Acrobat and Preview. If you set it higher using justMediaBox
, then Preview will show it fine but Acrobat will truncate it. If you setMediaBox
to the highest values Acrobat accepts and useUserUnit
as a multiplier, then Acrobat will show it fine but Preview would not (I don't know if it would truncate it or show it scaled down). So when it comes to PDFs larger than 200 x 200 in, you can choose either up to 15,000,000.00 x 15,000,000.00 in in Acrobat or as large as you like in Preview - you can't have both.All interesting and some things I didn't know, but this is completely irrelevant. A PDF-reading app (i.e. Preview) does not have to use, and almost certainly does not use the same PDF rendering engine as the desktop rendering one you described. An obvious relevant example is pages - the desktop renderer doesn't need to know about or render pages at any point. It doesn't deal with the size of a page, the existence of multiple pages, or pages of different sizes. It has only one canvas to draw in. A PDF viewer app OTOH obviously has to be able to handle all of these things, and render them into a format that can be pushed to the system's graphics API.
See this StackExchange answer, which quotes this paragraph from Ars Technica (emphasis mine):
It doesn't deal with any features, whereas a reader app must deal with many features. So discussing it is irrelevant for the Preview app.
Edit: and I was only poking fun at Apple's policies in general. Their current crusade against anything that isn't 100% under their totalitarian control on iOS in Europe is most telling. I think in this case the only reason they don't support UserUnit is that it's basically never used in practice and they never realized it's missing.