|  |  | 9 The Ipe file format

# 9 The Ipe file format

Ipe can store documents in two different formats. One of them is standard PDF, which can be read by any application capable of opening PDF files. (Ipe embeds its own information inside PDF files. The way this is done is not documented here, and may change between releases of Ipe.)

The second Ipe file format is a pure XML implementation. Files stored in this format can be parsed with any XML-aware application, and you can create XML files for Ipe from your own applications.

A DTD for the Ipe format is available as ipe.dtd. For instance, you can use this to validate an Ipe document using

    xmllint --dtdvalid ipe.dtd --noout file.ipe

The tags understood by Ipe are described informally in this section. Tags in the XML file can carry attributes other than the ones documented here. Ipe ignores all attributes it does't understand, and they will be lost if the document is saved again from Ipe. Ipe will complain about any XML elements not described here, with the exception that you can use elements whose name starts with "x-" freely to add your own information inside an Ipe file.

An Ipe XML file must contain exactly one `<ipe>` element, while an Ipe stylesheet file must contain exactly one `<ipestyle>` element (both types of files are allowed to start with an `<?xml>` tag, which is simply ignored by Ipe). An Ipe file may also contain a `<!DOCTYPE>` tag.

All elements are documented below.

- 9.1 The <ipe> element
- 9.2 The <page> element
- 9.3 Ipe object elements
- 9.4 The <ipestyle> element