generate valid ebook