Here’s what I remember:
The book is about a princess, I think her name was either Sophie or Sophia, who lives in a castle with her Royal Family in a town located within the confines of a storybook. Whenever the book is opened, the people in the town stop their current activities and rush to their places in order to preform their story for The Reader who’s name, I think, is Claire. The princess is very adventurous, she hates the repetition of the story and longs to visit a world beyond the book. I think that she does leave for a short period of time, and once she steps out from the book, she enters one of Claire’s dreams. She returns to the book ,and informs the other characters who react with shock and disapproval. When Claire’s little brother burns the book, the princess and the characters escape into Claire’s memory/imagination/dreams. The story and the characters, I believe, are passed down to Claire’s daughter or granddaughter, who with the princess’s help, re-writes/re-publishes the story so that it and it’s characters will live on.
Another point worth mentioning is that the book was published sometime in the early 00’s, I had a copy in my possession in 2003. It was from a school book fair, so the publisher could be something that has connections with Elementary and Middle schools like Scholastic. It was a paperback, the front and the back were off-white or cream in color, and I think the front had an illustration of the princess. All I can remember was that she had dark hair.