API
API Documentation

Introduction

This document describes the core API of the Global Graphics Mako Library (formerly known as gDoc Core). Mako provides the following key capabilities:

  • A new, simplified Mako API that provides:
    • Easy access to the contents of PDF and XPS files, and the on-demand creation of DOM from these formats.
    • The ability to read XPS in a streaming fashion
    • DOM editing for individual pages
    • Simple methods for creating, rearranging and merging pages
    • Simple methods for creating, rearranging and merging documents
    • A growing set of transformations that can be applied to DOM nodes, brushes, images etc. to perform common DOM tasks
    • A configurable XPS Output module that can write modified document assemblies to an XPS file or stream
    • A PDF output module that can write modified document assemblies to a PDF file or stream
    • A PS output module that can write modified document assemblies to a PS file or stream
    • A PCL5 output module that can write modified document assemblies to a PCL 5e or 5c file or stream
    • A PCLXL output module that can write modified document assemblies to a PCLXL file or stream
    • An on-demand SVG generator that can generate SVG for individual DOM nodes, subtrees, or entire pages
    • An on-demand XAML generator that can generate XAML for individual DOM nodes, subtrees, or entire pages
    • An XPS-compatible renderer for iOS™ and MacOS/X™ using Quartz 2D;
    • An XPS-compatible renderer for Android™ using the Skia™ library
    • A renderer based on Jaws™ for rendering arbitrary DOM to an image or an RGB frame buffer

For conversion, this release supports the following pathways:

  • PDF to XPS
  • PDF to PCL 5c
  • PDF to PCL 5e
  • PDF to PCL XL
  • PDF to PDF
  • PDF to PS
  • XPS to XPS
  • XPS to PCL 5c
  • XPS to PCL 5e
  • XPS to PCL XL
  • XPS to PDF
  • XPS to PS

As well as the core libraries and interfaces, this release includes sample applications demonstrating the use of Mako to create a simple iOS™ XPS viewer application, console applications, DLL wrappers and Microsoft Windows™ printer drivers.

Contents

The release consists of:

  1. A suite of libraries implementing the Mako APIs (./libs).
  2. The C++ header files describing the published Mako API (./interface/jawsmako and ./interface/edl).
  3. A collection of sample applications using Mako including:
    • Mako Converter (./makoapps/jmconverter). A simple example showing how to convert from PDF or XPS to XPS using the Mako APIs (Windows and MacOS).
    • Simple Examples (./makoapps/simpleexamples). A sample application demonstrating various (but not exhaustive) uses of the Mako APIs (Windows and MacOS). This selection will grow in subsequent releases.
    • iOS XPS Viewer (./makoapps/iOSXPSViewer) for iOS that provides a simple XPS viewer using the Mako APIs.
    • Android XPS Viewer (./makoapps/AndroidXPSViewer) for Android that provides a simple XPS viewer using the Mako APIs.
    • A sample XPSDrv implementation (./makoapps/xpsdrv) supporting five streaming output formats (PS, PDF, PCLXL, PCL5e and PCL5c) selectable via individual .inf installation files. This driver encapsulates Mako as an XPSDrv filter with streaming input and streaming output.
  4. HTML documentation (this document) describing the public interfaces (./html).

How to install this release

The release is provided in .zip file format. Unzip to a convenient location. The sample applications have Visual Studio Solutions and Project files (Windows), Makefiles (MacOS), JAM scripts (Linux) XCode projects (iOS) and Eclipse projects (Android). The XPSDrv has batch files to build driver packages.