Hacker News new | past | comments | ask | show | jobs | submit login
Maximum size of a PDF, version 7: 381 km × 381 km (wikimedia.org)
51 points by sampo on June 30, 2023 | hide | past | favorite | 9 comments



According to the Wikipedia page using this illustration, there is no maximum size to PDF documents, not even to single-page ones.

It (https://de.wikipedia.org/wiki/Portable_Document_Format#Umfan...) says:

“PDF-Dokumente können mehrere hunderttausend Seiten umfassen. Dabei ist die Seitengröße durch das Format selbst nicht begrenzt. In Adobe Acrobat gibt es jedoch durch die Implementierung bedingte Grenzen”

Translation: PDF documents can contain hundreds of thousands of pages. The format does not limit page size. Adobe Acrobat has implementation limits, though.

Also, nitpick: 381km is almost 1% of the circumference of earth. Because of that, shouldn’t that square bulge a bit on that map?


>Also, nitpick: 381km is almost 1% of the circumference of earth. Because of that, shouldn’t that square bulge a bit on that map?

Nitpicky reply: Without knowing what kind of projection that map is, the answer is maybe. For all I know the projection is made precisely so that we can have that perfect square.


Its wikimedia so it has metadata; it doesn't take much to find that it is LAEA projection: https://en.wikipedia.org/wiki/Lambert_azimuthal_equal-area_p...


PDF spec itself give bit more context:

    In PDF versions earlier than PDF 1.6, the size of the default user space
    unit is fixed at 1 ⁄ 72 inch. In Acrobat viewers earlier than version 4.0, the
    minimum allowed page size is 72 by 72 units in default user space (1 by 1
    inch); the maximum is 3240 by 3240 units (45 by 45 inches). In Acrobat
    versions 5.0 and later, the minimum allowed page size is 3 by 3 units (ap-
    proximately 0.04 by 0.04 inch); the maximum is 14,400 by 14,400 units
    (200 by 200 inches).


    Beginning with PDF 1.6, the size of the default user space unit may be set
    with the UserUnit entry of the page dictionary. Acrobat 7.0 supports a
    maximum UserUnit value of 75,000, which gives a maximum page dimen-
    sion of 15,000,000 inches (14,400 * 75,000 * 1 ⁄ 72). The minimum
    UserUnit value is 1.0 (the default).
15 million inches happens to be exactly 381 km


Does anyone else find those to be very odd limiting values? 1/72" is a standard unit in typesetting, but 3240 looks quite arbitrary, 14400 is 200 * 72 or a slightly more "computerish" 900 * 16, and 75000 is definitely more arbitrary than the nearest "round" limit of 65535.

As a relevant contrast, Knuth's TeX internally uses units of "scaled points" for dimensions, or 1/65536 of a point, and its point is defined as 1/72.27 inch so its precision is approximately 5.36um, and the maximum dimension of a page is 1073741823 scaled points, or approximately 5.758m.


1 scaled point is 5.36 nm, nano, not micro

https://www.wolframalpha.com/input?i=1+inch+%2F+72+%2F+2%5E1...


And to think, I was feeling fancy for bringing my PDF editor to its knees stitching together over a dozen (edit: two dozen!) blueprint pages along match lines into one huge 200x102in page.


Is the linked file that size but very low res?

I was vaguely hoping to embark on a mega scroll across Europe.


"With PDF, the map _is_ the territory!" would be a good slogan.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: