encode page data