Produce Exports
Fix Validation Errors
Pressbooks EPUB and PDF files are made to be compatible with the submission specifications at all major ebook stores and print-on-demand services. However, sometimes markup that isn’t compatible with the EPUB or PDF file formats can be imported into Pressbooks when you bring in your content. We recommend testing your files before you submit them to your distributor of choice to make sure they pass all specifications.
Email Yourself Validation Logs
You can decide whether or not you want to receive validation logs for all your exported files. To enable or modify this setting:
- Go to Settings > Export from the left sidebar menu in Pressbooks
- Next to “Email Validation Logs,” choose either “Yes” or “No”
- Click Save Changes
By default, all books’ Email Validation Log setting is set to “No. Ignore validation errors.” If you choose to receive validation logs (or error reports) from Pressbooks, all file validation error logs will be forwarded to the email address associated with your Pressbooks account.
Afterward, you’ll receive a message whenever any file you export has an error. You’ll know exported files contain errors if you see a banner at the top of the Export screen that reads: “Warning: The export has validation errors. See logs for more details.”
Each type of file is validated against different standards, so their validation logs will also differ.
Interpret EPUB Validation Logs
EPUB validation logs will appear in your email inbox with the following subject line: Pressbooks\Modules\Export\Epub\
Below is an example of what an error report may look like.
Array
(
[time] => Mon Dec 10 22:17:33 2018
[user] => tmcgrath
[site_url] => https://yourbooktitle.pressbook
[blog_id] => 107381
[theme] => Atwood
)
ERROR(RSC-020): /srv/www/pressbooks.com/releas
Check finished with errors.
This sample validation log can be broken down into parts. The initial Array includes specific metadata about your book. You’ll see the time the book was exported, the username of the person who exported the book, and the URL of the book in Pressbooks, its ID number, and theme. The error message itself includes several important pieces of information:
ERROR(RSC-020): The part in parenthesis refers to type of validation error produced by EPUBCheck. This particular error code is shown when the validator finds an invalid URL.
/srv/www/pressbooks.com/releases/20181205114740/web/app/uploads/sites/107381/pressbooks/exports/Test-Book-2-1544480239.epub/OEBPS/chapter-056-your-chapter.html: The bolded part of this string tells you which part of the EPUB file the validation error was found in. In this example, the message is telling us that the error occurred in chapter 35, which has been titled “Your Chapter.” If you saved a chapter before giving it a title, this URL will have the randomly generated slug instead of the chapter’s title.
(26,268): The last piece of data from this URL is the exact line and character the error occurs at in your EPUB file