WTF?! Theoretically, you can create a PDF that could cover half the area of Germany. One software developer set out to discover if that is true and realized she could go much, much bigger.
Have you heard the one about the maximum size for a PDF? Namely, that a single PDF can ‘only’ cover about half the area of Germany, or 381 kilometers?
Alex Chan, a software developer and self-described keen writer (writer’s note: yes, she is), set out to prove or disprove the claim.
She quickly establishes that, according to the specification for PDF 1.7, Acrobat 7.0 supports a maximum UserUnit value of 75,000, which gives a maximum page dimension of 15,000,000 inches. She notes that 15 million inches is exactly 381 kilometers.
So, those are the claimed limitations – but Chan wondered if a PDF could exceed the maximum values. To conduct the rest of her experiment, Chan schooled herself on the inner workings of PDF documents and eventually was able to write her first PDF by hand. It is not a process for the faint of heart, apparently; she concludes that it is now apparent to her why nobody writes PDFs by hand anymore: Too fiddly, she says, but also Adobe has automated a lot of these processes over the years.
First, though, a word on creating a document that is 381 kilometers. She starts by noting that the MediaBox, which sets the width and height of the page – typically a square of 300 × 300 units – has a default unit size of 1/72 inch, which will take you all the way up to 200 inches. But users can make a page bigger by changing the MediaBox value. To do that, you have to increase the unit size by adding a /UserUnit value. The maximum UserUnit is 75,000, which creates a page size of 15,000,000.00 x 15,000,000.00 inches – or 381 km along both sides.
In her quest to create a PDF bigger than half the size of Germany, Chan essentially discovered a workaround: Unlike Acrobat, the Preview app doesn’t have an upper limit on what can be put in MediaBox. “It’s perfectly happy for me to write a width which is a 1 followed by twelve 0s,” she writes, noting that that width is approximately the distance between the Earth and the Moon. She kept playing with it and eventually ended up with a PDF that Preview claimed is larger than the entire universe – approximately 37 trillion light years square. Her parting words? Just don’t try to print it.