Following describes Advanced Comic Book Format specifications. Current released version is 1.0, proposed changes for version 1.1 are highlighted./new in 1.1/
Advanced Comic Book Format (ACBF) specification is a distribution and interchange format for digital comic books. ACBF specification defines a means of representing structured and semantically enhanced content used in comic books. In contrast to widely used Comic Book Archive (CBR, CBZ …), content is represented in separate graphic and text layer(s) as well as comic book structure and meta-data are present.
Some of the requirements defined for the ACBF are:
- Definition of comic book meta-data
- Definition of comic book structure (pages, frames) as well as order in which they follow
- Definition of text layer separate from background graphics as well as reading order of text areas in it
- Definition of semantics on the text layer (e.g. speech, commentary, emphasis, code ...)
- Support for more text layers in one document (translations to different languages)
ACBF aims to be used as a digital comic book format that is able to properly represent any comic books content and at the same time be suitable for automatic processing, indexing, comic book collection management and conversion into other formats.
ACBF is an extension of XML. Some inspiration regarding meta-data and semantics of the text layer comes from Fictionbook (file format that is used for electronic books distribution) and inspiration for comic book structure comes from ACV 2 (comic book format used by Droid Comic Viewer).
ACBF does not use any kind of DRM (Digital Rights Management) and all specifications are open.
High Level Document Structure Edit
ACBF is an extension of XML version 1.0. The entire document is enclosed in <ACBF> element and uses just its own ACBF namespace. Meta-data section contains the generic information about the comic book (title, author, publish date etc.) as well as publishing information (publisher, publish date) and information about particular ACBF document (document author, creation date …).
Body section contains the comic book content, including definition of pages, frames, (links to) images and text layers.
At the end of the document in the data section there are <binary> elements where all images and other binary data used in the entire document may be stored. These images are converted to BASE64.
<?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/css" href="default.css"?> <ACBF xmlns="http://www.fictionbook-lib.org/xml/acbf/1.0"> <meta-data> <book-info> ... </book-info> <publish-info> ... </publish-info> <document-info> ... </document-info> </meta-data> <body> <page> <title lang="en">Chapter 1: How it All Began</title> <image href="#page1.jpg"/> <text-layer lang="en"> ... </text-layer> <frame points="10,75 650,137 650,562 10,562"/> </page> </body> <references></references> <data> <binary id="page1.jpg" content-type="image/jpeg">BASE64string</binary> </data> </ACBF>
Stylesheet declaration can be specified using link to external css document or inside a <style> element. If no styles are defined as part of the document viewer application will render text layers with its defined default styles. More on styles see chapter on Stylesheet Declaration.
Meta-data Section Definition Edit
- Main article: Meta-data Section Definition
Meta-data section contains <book-info>, <publish-info> and <document-info> sections, which describe book metadata (such as title, author, genre ...), publishing information (publisher, publish date ...) and acbf document metadata (creator, date of creation, document version ...).
Body Section Definition Edit
- Main article: Body Section Definition
Body section contains the definition of individual comic book pages, text layers and frames(panels) inside those pages.
References Section Definition Edit
- Main article: References Section Definition
References section contains list of references that occurred inside the main document body. This section is optional.
Data Section Definition Edit
- Main article: Data Section Definition
Data section contains list of binary data. Currently only images are used but different kind of binary data may be put in here.
Stylesheet Declaration /new in 1.1/Edit
- Main article: Stylesheet Declaration
Stylesheet declaration can be specified using link to external css document or it can be embedded inside <style> element.
Embedding ACBF files and compatibility with popular comic book formats Edit
Embedding ACBF files and compatibility with popular comic book formats As was stated earlier, binary objects (images and possibly other data) can be embedded directly into ACBF document (converted to BASE64) or they can be referenced externaly (e.g. files on disk). In this case the comic book will consist of one .acbf file and several binary files (.jpg images for example).
While ACBF specifications do not directly define any container to which insert all those related files it is still possible to insert all files into ZIP archive container or some other format with similar capabilities. This way users can create CBZ/CBR/CB7/CBT files that are compatible with common comic book readers that work with those popular formats. Note that image names must be alphabeticaly sorted inside the archive in this case (not mandatory for pure ACBF files). Look at the table below to see all possibilities describing how to use ACBF files.
|Single ACBF file||.acbf||All binary data are converted to BASE64 and stored inside ACBF document.|
|ACBF file referencing external files||.acbf + several other binary files
(.jpg, .png etc.)
|Binary data are referenced externally. Whole comic book consists of one ACBF document + several binary files (images ...)|
|ACBF file embedded into ZIP archive||.zip, .cbz||ACBF document (as well as binary files if referenced externaly) are compressed into a .zip/.cbz archive|
Readers capable of reading included .acbf file can provide their users with additional options like showing all kinds of comic book meta-data, browsing comics on frame level, using table of contents etc.