Free Ruby API for Word  DOCX Creation & Processing 

Open source Ruby library that gives programmers the capability to make professional Office Word documents, modify DOCX files, add page margins, insert nested tables using HTML-like syntax.

Caracal library gives Ruby developers the capability to generate professional Office Word documents inside their own applications using HTML-like syntax. The library makes Developer's jobs easy by enabling them to use some simple commands to create and manage Office Open XML (OOXML). The library is open source and is available under the MIT license.

The library is very well designed and it separates the instruction of documents parsing from the instructions of processing. This strategy gives the rendering process a great amount of flexibility. The library has incorporated several important features related to word document processing such as word documents creation, setting page size, page margins support,  page break, page numbers, fonts support, styles and formatting support, adding a paragraph, using links and bookmarks,  inserting tables, nested tables support,  images support and many more.

.

Previous Next

Getting Started with Caracal

Please add the following command application's Gemfile for a smooth use of the library.

Install Caracal by adding code to Application's Gemfile

 gem 'caracal'

Install Caracal by adding code to Application's Gemfile

bundle install

Word Docx Files Creation using Ruby

The open source Caracal library enables Ruby developers to generate DOCX files inside their apps using Ruby code.  The DOCX file format is a zipped collection of XML documents and is created using the OOXML standard. The library helps programmers by creating the entire structure of the document and zipped it the output documents. The library supports modifying the existing files, adjusting page size, setting margins, applying styles, and much more.

Add Tables and Nested Tables in Word Files

The free Caracal library enables software developers to add and modify tables to their word document with just couple of lines of Ruby code. The library has included several important functions related tables management such as add title, add new columns and rows, styling the top, bottom or left & right,  apply style to a specific cell, merge or split cells and many more. The library also included support for nested tables.

Use Lists inside Word Documents

The open source Caracal library has included support for using lists inside their DOCX files using Ruby commands. The library allows adding ordered as well as unordered lists inside their word documents. It also supports deep nested lists and   mixing in other combination. You can easily define styles for the lists. The library supports 9 levels of default styles for both ordered and unordered lists.

Insert Paragraph and Bookmarks to DOCX File

The Caracal library has provided functionality for adding paragraph to their word documents with ease. The library has included several function related to paragraphs handling such as text alignment, fonts selection, defining font color and font size setting background color, apply vertical alignment and so on. It also provides support for inserting bookmarks directly to the document or inside paragraph blocks with ease.