Next time you’re griping about a document scanning project, count your blessings. You could be trying to scan 2,000-year-old scrolls that’ve been charred by volcanic ash.

Fortunately, we now have the technology that makes it possible.

Said scrolls date back to 79 AD, when Italy’s Mount Vesuvius erupted, burying the towns of Pompeii and Herculaneum in burning hot ash, gas, and rocks. Needless to say, this was hard on the libraries of the towns. In 1752, one of these libraries was discovered in a villa in Herculaneum, reports the New York Times.

Ironically, this actually preserved the papyrus scrolls in the library. It just made them impossible to read. “Though the hot gases did not burn the many papyrus rolls in the villa’s library, they turned them into cylinders of carbonized plant material,” the Times writes. Basically, they looked like burnt sticks.

Attempting to read them by unwrapping them—so slowly that it took four years to unwrap one—turned them into a pile of cinder fragments. It was like trying to unwrap a briquette. (In fact, when the library was first discovered, explorers thought some of the carbonized scrolls were charcoal and used them to start fires, writes the BBC.) In the 1980s, researchers gave up trying to open scrolls, in hopes of preserving the 300 or so remaining scrolls until the time when science could come to the rescue.

That time is now. Using different kinds of light rays, ranging from infrared all the way to X-rays, scientists are now finding ways to read the text on the papyri—without so much as unwrapping them first.

In 2009, Brent Seales, a computer scientist at the University of Kentucky, used X-ray-computed tomography, a process similar to a CT scan, to determine the physical structure of a Herculaneum scroll. In other words, he could figure out where the pages were. “XCT can build up a 3D overview of the inside of the specimen by using X-rays to generate a cross-sectional stack of 2D images that can be then be combined,” explains Chemistry World.

Now, Vito Mocella, of the Institute for Microelectronics and Microsystems in Naples, Italy, has figured out a way to read the letters, also using X-rays. It is similar to the XCT technique and uses X-ray phase contrast tomography (XPCT). “This modified form of XCT does not rely on differing levels of absorption but on how the X-ray is refracted through each of the different materials to generate the high contrast needed,” Chemistry World explains. “Once the papyrus is in position, it is rotated through 360° as the X-ray beam scans across it and the emitted X-rays are collected to produce the 3D image.”

This meant researchers were able to pick up the very slight contrast between the carbonized papyrus fibers and the ancient ink, which was made of soot—meaning it was also made of carbon, the Times writes. “The contrast has allowed them to recognize individual Greek letters from the interior of the roll.” What enabled the technique to work is that the ink sat on top of the papyrus layer—though by as little as 100 microns, or less than .004 inches—rather than being inside it. But that tiny difference was enough to let researchers read the letters.

The next step is to figure out how to place the individual letters read by Mocella’s team onto the pages determined by Seales’ team. “These guys are focused on showing the imagery with best contrast,” Seales tells the Times. “But to really read the papyrus, you need to untangle its surface, which is the active area of my work.”

Unfortunately, researchers note, ink used at the time didn’t include any metals, which would make it easier for the light rays to detect the difference between charred ink and charred papyrus. Especially since the ink was made out of soot in the first place.

So what’s actually on the scrolls? Nothing as sought-after as Aristotle’s Comedy, unfortunately. The scrolls that have been opened thus far are in Greek and primarily concerning a minor philosopher named Philodemus, writes the BBC. However, researchers are hoping that since the library isn’t completely excavated yet—it was in Italy, after all—it will turn out to have had a Latin section as well. Then it might contain some of the many lost works of Roman history and literature, the Times writes.

Moreover, once researchers perfect the technique, they’ll be able to apply it to other scrolls around the world that are too fragile to unroll, even if they haven’t also been blasted by a volcano in the process.

Meanwhile, researchers are urging that the rest of the villa be excavated to look for other scrolls—before the volcano erupts again.