Immagine

A PDF can be as big as half of Germany: here’s what its maximum size is

Credit: terrible maps.

When you think of a file Pdfimagine a common size digital document: an A4 page, a brochure, a technical manual. But you’ve ever wondered what is the real maximum size that a pdf can reach? We are not talking about size in terms of megabyte or gigabytes, but dimensions in terms of meters or kilometers, that is, how large the pdf can be physically printed. According to the specifications officers of the format, invented in 1992 by Adobe, a single PDF can go up to 381 km per side. In practice, it could cover about Half of the Germany surface or, if you prefer a local comparison, the equivalent of 6 times the size of Lombardy.

This limitation derives from a parameter called Userunitwhich defines the measurement scale of the pages in the PDF documents. In the most recent versions of the format (PDF 1.7), the maximum value allowed for Userunit is 75,000, which brings the size of the page up to 15 million inches (converted into kilometers, in fact 381 km). This is the limit manageable by Adobe software, but other programs, such as Preview On macOS, they do not seem to have such rigid constraints and allow you to create PDF with theoretically infinite dimensions. This technical curiosity was explored by Alex Chana software developer who wanted to test the real limits of the PDFs.

The real dimensions of the PDFs

Alex Chandriven by curiosity, not only has managed to confirm the maximum official size, but also discovered a way to get around the restrictions and create documents of proportions well beyond the imaginable: its experiment led to Generation of a pdf with a width that overcome the distance between the earth and the moon.

But how technically this limitation works? And why is it just 381 km? To understand it, you have to go into the internal structure of the PDFs. The PDF format was developed by Adobe in the 90s to create portable and viewable documents on any device without losing formatting. Each pdf is made up of structured objects, including the Mediaboxwhich defines the size of the page, and the aforementioned Userunitwhich determines the scale of the measurements within the file.

Originally, the oldest versions of the PDF format (such as 1.3) included a maximum size of 45 × 45 inches (about 114 × 114 cm). With the passage of time, Adobe has increased this limit: in the following versions (PDF 1.6 and 1.7), the maximum size that can be set through Acrobat reached 15 million inch per side. To understand how we arrive at this point, we analyze what is indicated in the document PDF Reference Sixth Edition Adobe Portable Document Format Version 1.7 November 2006 (hereinafter we reported a screenshot from the latter).

Image
Credit: Adobe.

The formula is reported in the aforementioned document 14,400 * 75,000 * 1/72. “Let’s break down” to understand what it means.

  • 14,400: This represents the maximum number of units (PDF points) per side of a page with the default scale.
  • 75.000: It is the maximum value of Userunit, which multiplies the size of each unit.
  • 1/72: It serves to convert PDF units into inches, given that each default unit of the PDF is 1/72 inch.

Going to multiply 14,400 × 75.000 we get 1,080,000,000: This is the total number of PDF units with the maximum value of Userunit. Multiplying this value × 1/72 we get 15,000,000 inchthat is to say 381 km.

The limits exceeded by Alex Chan: the largest PDF document of the observable universe

But Alex Chan didn’t stop there. Wanting explore the real limits of the formatfound that some software – in particular Preview (the reader of images and apple pdfs, pre -installed on macOS) – do not apply any rigid restrictions to the size of a pdf. By changing the internal parameters of the document, Chan has created a PDF with dimensions that challenge any logic: larger than the entire observable universe. An apparently absurd statement, but supported by the fact that the software accepted extremely large values ​​without errors. The developer is so that he describes his business:

In the end I found myself with a pdf that previewed said to be larger than the entire universe, about 37 trillions of square light years. Of course, it is mostly empty space, but the universe is also.

Image
Credit: Alex Chan.

Despite the possibility of creating enormous pdfs, it must be said that in practice these documents would hardly be used. Even the most advanced software would have difficulty managing such exaggerated files, and trying to print them would be, not even to say, pure madness.