Some version of this has been floating around the Internet since 2007, probably earlier. This tweet is pretty emblematic of posts about this claim: it’s stated as pure fact, with no supporting evidence or explanation. We’re meant to just accept that a single PDF can only cover about half the area of Germany, and we’re not given any reason why 381 kilometres is the magic limit.

I started wondering: has anybody made a PDF this big? How hard would it be? Can you make a PDF that’s even bigger?

A few years ago I did some silly noodling into PostScript, the precursor to PDF, and it was a lot of fun. I’ve never actually dived into the internals of PDF, and this seems like a good opportunity.

Let’s dig in.

  • General_Effort@lemmy.world
    link
    fedilink
    English
    arrow-up
    67
    arrow-down
    1
    ·
    8 months ago

    Arrows pointing out from Germany indicating a pointless quest for more space. Why do I feel like I have seen that before?

  • RememberTheApollo@lemmy.world
    link
    fedilink
    English
    arrow-up
    63
    ·
    8 months ago

    I could keep going. And I did. Eventually I ended up with a PDF that Preview claimed is larger than the entire universe – approximately 37 trillion light years square. Admittedly it’s mostly empty space, but so is the universe.

    So yes. It can be done.

  • Gork@lemm.ee
    link
    fedilink
    English
    arrow-up
    50
    arrow-down
    1
    ·
    8 months ago

    Clearly PDF is an outdated standard if it cannot handle files greater than 381 km x 381 km in size.

  • NeatNit@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    42
    ·
    8 months ago

    The takeaway is that the format doesn’t have any limit, but Adobe Acrobat in particular implements an arbitrary cutoff size. Other readers, such as Firefox’s built-in PDF reader or Mac’s Preview, can handle any arbitrary size. The article ends with a PDF the size of the universe, weighing an unimaginable 549 bytes!

    But that limitlessness can come at a cost: according to the article, Preview doesn’t handle UserUnit which should affect page size, while Acrobat (and Firefox) do. I’m guessing (gut feeling) Acrobat probably supports the most features overall, Firefox probably supports the vast majority of those used in practice, and Preview only allows Apple Approved™ PDF features and extensions deemed worthy of Their Appleness’s consideration. Chrome’s PDF reader is probably on the same level as Firefox, I guess.

    • abhibeckert@lemmy.world
      link
      fedilink
      English
      arrow-up
      13
      arrow-down
      1
      ·
      edit-2
      8 months ago

      I’m guessing (gut feeling) Acrobat probably supports the most features overall, Firefox probably supports the vast majority of those used in practice, and Preview only allows Apple Approved™ PDF features and extensions deemed worthy of Their Appleness’s consideration.

      OK… stepping out of gut feelings into reality:

      • Adobe originally had a maximum page size of 45 inches square.
      • In 2001 they increased that to 200 inches
      • And in 2004 Adobe increased it to 15,000,000 inches (a bit larger than Germany) which is still kinda sucky if you want to show a map on a PDF

      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.

  • Diplomjodler@feddit.de
    link
    fedilink
    English
    arrow-up
    35
    arrow-down
    1
    ·
    8 months ago

    Eventually I ended up with a PDF that Preview claimed is larger than the entire universe

    Printer’s out of toner. Can you fax it to me?

  • visnae@lemmy.world
    link
    fedilink
    English
    arrow-up
    17
    arrow-down
    2
    ·
    8 months ago

    Fun fact, LaTeX is actually NP-complete so you can program whatever in it AND make it beautiful

  • Uriel238 [all pronouns]@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    11
    ·
    8 months ago

    Isn’t PDF vector (with pixel drop-in elements)? Those should be scaleable to the word size (e.g. 128 bit) But the problem with these like some open world games is a lot of empty space with few exciting features.

    1200DPI the size of Germany, or even enough text to fill Germany with 12 point fot would be impressive.

  • far_university1990@feddit.de
    link
    fedilink
    English
    arrow-up
    6
    ·
    8 months ago

    𝕯𝖎𝖊𝖘𝖊 𝕶𝖔𝖒𝖒𝖊𝖓𝖙𝖆𝖗𝖘𝖊𝖐𝖙𝖎𝖔𝖓 𝖎𝖘𝖙 𝖓𝖚𝖓 𝕰𝖎𝖌𝖊𝖓𝖙𝖚𝖒 𝖉𝖊𝖗 𝕭𝖚𝖓𝖉𝖊𝖘𝖗𝖊𝖕𝖚𝖇𝖑𝖎𝖐 𝕯𝖊𝖚𝖙𝖘𝖈𝖍𝖑𝖆𝖓𝖉