Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

OBF Parser

Gem Version

This ruby library is to make it easier to handle .obf and .obz files. These files are part of the Open Board Format, an effort to standardize communication board layouts for assistive technology and AAC users. The file format is JSON-structured and can be completely self-contained or reference external URLs.

This library makes it easy to convert to and from .obf and .obz files for generating images and pdfs, and supports converting some proprietary formats to .obf and .obz.


This is packaged as the obf rubygem, so you can just add the dependency to your Gemfile or install the gem on your system:

gem install obf

To require the library in your project:

require 'obf'

External converters require node. PDF and PNG conversion require imagemagick and node. PNG conversion also requires ghostscript.


OBF supports multiple conversion schemes, the simplest of which are obf, obz, pdf and png

# convert an .obf file to a .pdf
OBF::PDF.from_obf('path/to/input.obf', 'path/to/output.pdf')
# convert an .obz package to a .pdf
OBF::PDF.from_obf('path/to/input.obz', 'path/to/output.pdf')

# convert an .obf file to a .png image
OBF::PNG.from_obf('path/to/input.obf', 'path/to/output.png')
# convert an .obz package to a .png image
OBF::PNG.from_obf('path/to/input.obz', 'path/to/output.png')

The gem also supports converting some native packages into OBF files

content = OBF::Picto4Me.to_external('path/to/')
OBF::OBZ.from_external(content, 'path/to/output.obz')

External Imports

The external options are the most interesting. Once you understand the makeup of these external resources, you can generate them from any other system and easily convert a system's content to .obf, .obz, .pdf or .png.

The makeup of these files closely resembles the layout of an .obf file according to the .obf spec. You can see an example generator in lib/obf/picto4me.rb, or dig into the specifics yourself in lib/obf/external.rb.

Future Work

We've talked about including some utilities to make translation easier. Basically something that would take an .obf or .obz file and spit out a set of translation strings, and another something that would take an .obf or .obz file and a set of translation strings and generate a new, translated result.


Licensed under the MIT License.


No releases published


No packages published