Karmapa is said to have been able to dictate seven books of Dignaga and Dharmakirti by heart without having done any research beforehand.
The story begins in the 3rd century at the university of Nalanda in Northern India. Due to arson, part of the library where the Abhidharma tantra books were stored burned down completely and many of the unique volumes were destroyed. Everyone was frustrated that these precious texts had been lost.
A nun, Kamalashila, approached some members of the board to let them know that she knew all the books by heart; therefore, nothing was lost. As she was a woman and from their cultural perspective of almost no value, no one wanted to listen to her. The smart lady gave back her vows, found partners and gave birth to two boys: Asangha and Vasubandhu. To them, she passed on all the lost teachings.
Among other teachings, she passed on the Tsema (theory of logics and perception) to her younger son Vasubandhu. He transmitted it to his student and so on, until the teachings were given to Dharmakirti who lived between 600 and 650 CE. He wrote treatises on logic and perception.
Around 850 years later, the 7th Karmapa dictated something about Tsema to his attendant. Most likely realized and equipped with high knowledge, the attendant politely interrupted Karmapa. He didn’t want to criticize Karmapa but Dharmakirti had explained the topic in a very different way. Karmapa answered, “I know.” Astonished, the secretary wanted to say something, but Karmapa added, “I was Dharmakirti.” Karmapa noticed his secretary’s confusion, so he asked, “Shall I prove it?” The secretary nodded, and Karmapa dictated word by word several pages of Dharmakirti’s treatise although he had never read it.