In 1773, inside the eastern gate of the Forbidden City, a new office opened with a sign over the door: the Hall for the Complete Library of the Four Treasuries.
For the next ten years more than three thousand eight hundred people would work on what the emperor had ordered.
A Call for Books
It began with a memorial from a provincial education official named Zhu Yun.
The Yongle Encyclopedia, he wrote, held whole books that no longer existed anywhere else. They should be pulled out and printed. And the great private libraries of the country should be asked to send their rare editions to the capital.
The senior grand secretary objected. It would cost money, he said, and it would stir up trouble.
The emperor overruled him.
An edict went out in 1773. Every province was to search out old books and send them north. A family that contributed five hundred titles would receive a printed set of the Great Digest of Ancient and Modern Books, ten thousand scrolls of it. A family that contributed a hundred would receive the Peiwen Rhyme Dictionary.
The reward was a book, not money. That was precise. Collectors had never wanted money.
In three years twelve thousand titles came in. Zhejiang alone supplied more than half.
The Fan family of Tianyi Library at Ningbo sent over six hundred. The Ma family of Yangzhou sent seven hundred and seventy-six, more than anyone else in the empire.
The edict promised that every borrowed book would be returned after copying.
Everybody who sent books learned later what the promise was worth. Most were never returned.
Three Thousand Eight Hundred Copyists
The office had layers.
At the top, a prince of the blood as nominal director and a grand secretary doing the work. Below them the chief compilers, Ji Yun and Lu Xixiong, and the chief collator, Lu Feichi.
Below them, editors, sub-editors, and copyists. The copyists were the many. Over the life of the project, more than three thousand eight hundred of them.
Their work was copying. Character by character, in regular script, no joined strokes, no shortened lines. One mistake and the page was done again.
Seven copies of everything. Seven times the labour.
How much was there to copy? The final count: three thousand four hundred and sixty-one titles, seventy-nine thousand three hundred and nine scrolls, more than thirty-six thousand volumes. Something like eight hundred million characters.
Eight hundred million characters, written with a brush.
At ten thousand characters a day, one man would need more than two hundred years.
The copyists were paid by the character. A fast man could earn a few taels a month; a slow one was docked. Some of them copied for ten years. After five years of service a copyist could be recommended for a minor post in a county office, which for a failed examination candidate was a way out of nothing.
Winter was the worst of it. The halls were large, the charcoal braziers few, and the ink would thicken in the cold.
Men carried the inkstone inside their coats to keep it warm, wrote a while, rubbed their hands a while.
The paper was a tough, slightly absorbent stock made for official documents. A brush stroke could not be taken back. One corrected character and the whole page was waste, and the pay for it was docked.
Some copied for years and came out with inflamed eyes, callused fingers, and eventually a recommendation for a county post, which they took in their fifties and held over tax grain and homicide cases.
The rules were brutal on error. A wrong character meant recopying the page; too many errors meant the loss of pay and a return home. Lu Feichi, the chief collator, was later dismissed when mistakes were found and ordered to pay, out of his own pocket, for the rebinding of the three southern copies.
What Went In, What Burned
The library sorted books into three categories.
The first was copied in full. Three thousand four hundred and sixty-one titles.
The second was recorded but not copied. A summary was written, giving the title, the author, the contents; the book itself stayed out. Six thousand seven hundred and ninety-three titles.
The third was destroyed.
This is the part that is usually left out of the celebratory accounts. The archives record more than three thousand titles, sixty-seven thousand scrolls, of which about two thousand were destroyed entire and four hundred partially. More than a hundred and fifty thousand physical volumes went into the fire.
Destroyed entire meant the fire. Destroyed partially meant the book was kept and certain pages and scrolls were torn out, and the name was struck from the catalogue.
A reader who picked up such a volume would not know what had been taken out of it.
The policy had a name: prohibition hidden inside collection.
What was prohibited? Anything touching the ancestry of the Manchu imperial house, the wars of the Ming collapse, the old arguments about Chinese and barbarian, any seditious phrase.
Some books were not burned but rewritten.
The Song general Yue Fei had written a poem containing two lines about eating the flesh of the barbarian and drinking his blood. In the imperial library edition the lines read: with resolve I eat, with laughter I spill a cup of blood. The teeth are gone from it. The poem survived.
A Ming anthology of prose lost a hundred and fifty authors and more than a thousand five hundred pieces, a fifth of its people and a third of its text.
The editors copied with one hand and cut with the other. Then they wrote a summary noting that the work had contained objectionable passages, now removed.
When the first set was finished, more books were found to be objectionable and were pulled out and recopied. Bibliographers still speak of the withdrawn volumes.
From the Yongle Encyclopedia alone the office recovered more than three hundred lost books. That was the real achievement, and it was enormous.

Seven Pavilions
The first complete set was finished in 1782.
The emperor wanted seven copies, in seven places.
Four in the north: inside the Forbidden City, in the Summer Palace grounds, in the old capital at Shenyang, and at the mountain resort at Chengde.
Three in the south: Yangzhou, Zhenjiang and Hangzhou.
All seven buildings copied the design of the Tianyi Library at Ningbo: two storeys, six bays above and six below, following the old formula that heaven generates water and earth completes it in six. The purpose was fire prevention. The roof tiles were black, the colour of water, with a green border. A pool was dug in front of each one.
The volumes were bound by section: green for the classics, red for history, jade for philosophy, mauve for literature. On the shelf, the colour told you what you were looking at.
The seven copies were finished between 1787 and 1792. Seven more years of copying.
Seven copies in seven buildings, so that one fire could not take everything.
Three of the seven burned, and all three were in the south.
The One That Survived
In 1860 the Anglo French expedition reached the Summer Palace, and the northern copy kept there burned with it.
In 1853 and 1854 the Taiping armies took Yangzhou and Zhenjiang, and two southern copies burned.
In 1861 the Taiping armies entered Hangzhou, and the last southern copy burned.
Two brothers named Ding, collectors in the city, went out into the fighting to save what they could. They carried books out at night, basket by basket. They rescued more than eight thousand volumes.
The full set was thirty-six thousand. They had less than a quarter.
The brothers then began to rebuild it. They bought what could be bought, borrowed what could be borrowed, copied what could not be bought or borrowed, and where a book could not be found at all they wrote in the catalogue: copy held by such a family in such a province, to be borrowed later.
The work went on for decades. In the republic two more campaigns of copying filled most of the gaps, the last one directed by Zhang Zongxiang.
When the Japanese invasion came, the reconstructed set was crated and moved west, and it spent the war years in a cave in Guizhou before coming back to Hangzhou in 1946.
Three of the seven sets survive in substance. One is in Taipei, one in Gansu, one in the National Library in Beijing, which holds the only copy still on its original shelves in its original cases.
The man who ran the compiling was Ji Yun.
He was born in 1724, passed the highest examination at thirty-one, and was forty-nine when the office opened. He spent thirteen years as chief compiler. The annotated catalogue that came out of the project runs to two hundred scrolls and more than ten thousand entries, most of them written by him and Lu Xixiong.
The catalogue divided knowledge into four sections, forty-four classes, sixty-six sub-classes. Each entry gave the life of the author and then judged the book. As a history of scholarship it has never been replaced.
He also wrote ghost stories. In his old age he published a collection of tales about foxes, examinations and officials, told in a light and sceptical voice that sits oddly with the man who signed off on eight hundred million characters of approved text.
Not everyone in the office ended well. Lu Xixiong, the other chief compiler, was sent to Shenyang to check the northern copy and died on the road.
His master, the emperor, checked the work himself. When he found an objectionable phrase he docked the pay of the directors and the chief compilers for a year, and sometimes the collators as well.
In Europe, at almost the same time, another great book was being made.
The Encyclopedie of Diderot and d Alembert ran from 1751 to 1772. It rearranged the knowledge of its age and offended the church and the crown in the process. It was banned, its printers were raided, and it was finished anyway.
The two projects overlap almost exactly and point in opposite directions.
One was compiled by order, and burned what did not fit while it compiled. The other was printed in defiance, and put what did not fit into the text.
One gathered the books of the world into a single room under guard. The other spread the arguments of the world into as many hands as could pay for a volume.
What is the Four Treasuries, then?
It is the largest collection of books ever assembled in China. Many of the works inside survive only because they were copied into it. That is true.
It is also the largest campaign of textual destruction in Chinese history. More than three thousand titles disappeared. That is also true.
Both statements hold. Drop either one and the account is false.
Scholars today use the imperial library edition constantly, and constantly work around it, because it was edited. Anyone citing it checks the collation notes. It changed more than most readers imagine.
Song Yingxing treatise on technology, a landmark of Chinese technical writing, was left out entirely. It contained forbidden words, and it did not even get an entry in the catalogue. The book was lost in China and came back from copies preserved in Japan and Europe.
A library is a storehouse. A sieve is not. This was built as both, at the same time, by the same hands, and it worked as both.
The Qianlong emperor wanted every book in the empire inside his net, and he wanted the unacceptable ones gone. He did both, thoroughly.
Which of the two effects lasted longer is a question he never asked.
The courtyard of the Wenlan Pavilion is still on Solitary Hill in Hangzhou. There is a stone tablet in it recording the making of the library.
Tourists walk past it on the way to the lake, mostly taking photographs.
Ten years, one set of books.