'The Doctor has been helping a group of revolutionaries fight against the repressive regime of their planet. His allies have been killed and he is taken prisoner and driven to the Malamud, who is waiting for him. The Malamud leads the Doctor to House Osmo, a palatial structure that contains hundreds of thousands of books. In the course of their conversation it is revealed that everyone on the planet has a book which accurately foretells the events of their lives. The revolution which he has been aiding is an attempt by the Doctor to free the people from this apparent tyranny: it is seen as blasphemy to attempt to break from the path predicted by the books. The Malamud explains that every inhabitant, building, garden or visitor to the planet has their own book, but even the busiest only generate around twenty five volumes or so, and the record was thirty-four. Then the Doctor's books began to arrive, appearing overnight as if from nowhere. No-one on the planet knows the origins of the books. It gradually dawns on the Doctor that House Osmo is solely the collection devoted to his life and is told that it extends to a massive 750,000 volumes. By their count the Malamud and the archivist of the library think that the Doctor is over 20,000 years old, a point which the Doctor does not contradict. Instead he retorts that the volumes merely recount his adventures and do not foreshadow them. The Malamud disagrees and says that the final volume arrived three years ago. The Doctor scans this volume and sees that it predicts he will be dead within two days.'
[The Doctor is the Sixth Doctor.]
Source: drwhoguide.com (http://www.drwhoguide.com/whotrip26.htm). Sighted 20/5/11