[DB-ANN] Yami to Boushi to Hon no Tabibito (TV Series, 2003)
Story begins with a girl from our world who's taken to a strange, magical realm by a dragon. She apparently was taken to the library where all past, present, and future realities are kept within the books. You play as a guy who has come from one of these books as well, but has forgotten his way back home. You are commissioned to find this girl by the denizens of the library, and you search by entering these tomes. Perhaps on your way you'll find your own origin as well .