Electric Book Works Publishing reinvented for the digital age

Add ADE page-template file

Adobe developed its own extra stylesheet for controlled the margins of pages and the point at which widening the screen causes a body of text to split into two or more columns.

This stylesheet has the extension XPGT for XML Page Template. It is not required by the epub specification, but can give you some extra control over the appearance of the epub in ADE. When you export to epub from InDesign, a basic XPGT file is included in the epub’s OEBPS folder, and referenced in the relevant XHTML files that follow it. You can edit the XPGT if you like.

For more information on editing the XPGT file, see this article from Adobe.

Adding an XPGT file from scratch

You can also add an XPGT file if your epub doesn’t have one (e.g. if you didn’t get here via InDesign).

  1. Copy the page-template.xpgt file from a DRM-free epub (e.g. this one from EBW). Paste it into the OEBPS folder.

  2. Add a reference to page-template.xpgt to the manifest in the content.opf file. To do this, after the <manifest> tag, insert:

<item id="page-template" href="page-template.xpgt" media-type="application/vnd.adobe-page-template+xml" />
  1. Add a link to the page-template.xpgt to each XHTML/HTML file in the OEBPS folder that needs to follow it (i.e. you don’t need it for the cover XML/XHTML file). To do this, between the <head> and </head> tags, insert:
<link rel="stylesheet" type="application/vnd.adobe-page-template+xml" href="page-template.xpgt"/>
Arthur Attwell 17 February 2010
This information is more than two years old, and may no longer be accurate.