Separates content into pages and adds chart