Skip to main content
Skip table of contents

Mako 7.0.0 Release Notes


Introduction

This is a significant release of Mako Core, reflected in the increase of the major version to 7. This version has several new features, for example the ILayout class which is backed by a built-in layout engine. It makes it much easier to add new content that is typographically correct, and supports RTL (right-to-left) languages. It can even handle images.

There are many “under the hood” performance improvements, with new APIs to improve color conversion and content optimization. Additionally, fixes for specific support issues are included in this release, labelled MAKOSUP-XXXXX. The link is live and can be followed to the Mako support portal, but will only work for the customer who reported it.

ColorLogic

This release also includes Windows, macOS and Linux builds of Mako that integrate the ColorLogic CMM in place of the usual LittleCMS. These builds are found in the ColorLogic folder.

  • A SWIG build is also provided for C#, Java and Python (Windows only).

  • NuGet packages are available for C++ and C#.

Note: The ColorLogic CMM is delivered as a DLL (Dynamic Link Library for Windows) or SO (Shared Object) for macOS and Linux. Mako expects this runtime to be present alongside your Mako-based executable.

Issues addressed

MAKO-4140

MAKOSUP-10881  Implement input progress monitoring

The customer wished to present a progress bar during file input, but input classes were not set up to work with a progress monitor. This is now rectified, with a call to the progress tick whenever a new page is parsed.

To see how to implement progress monitoring in your project, we’ve demonstrated (via the ProgressHandler class) how to bundle together an IProgressTick object, a callback, and user data into one object. The advantage of this approach is that while the reference-counted ProgressHandler object is alive, the user data and the IProgressTick object will also be kept alive.

The ProgressHandler is used in makoconverter, one of the samples included in the SDK’s makoapps folder. It shows how easy it is to have separate handlers for the input and the output.

MAKO-4336

MAKOSUP-11102 Add ability to preflight fonts and raise any invalid hinting

A new feature to attempt to detect issues with instructions in TrueType fonts. The customer’s job had a broken pre/cvt tables which previously we would ignore. This change gives back control to the developer with some new APIs:

  • IDOMGlyphs::validateInstructions() can be used on a DOM glyphs node and will return false if any issues were found.

  • IDOMFontOpenType::validateInstructions() works in the same way but will test every glyph in a font.  This may be preferable for detecting quickly if there are any issues with a PDF font by using scanPdfForFonts() and then validateInstructions() on any returned font.

  • IDOMFontOpenType::stripInstructions() provides the option of stripping any instructions found to be invalid from a font, with an additional option of stripping all instructions from a font, though this is added primarily for testing purposes.

A new parameter option ttfinvalidhints , is added to IPDFOutput that can be set with setParameter(). The available settings are:

  • allow is the default and behaves as before, any invalid instructions are passed through.

  • error will throw an exception JM_ERR_TTF_INSTRUCTIONS if Mako finds that any instructions are invalid.

  • strip will strip any instructions found to be invalid from the font.

  • stripall will strip all instructions from the font.

MAKO-4403

MAKOSUP-11129 Converting PDF to Preset=PDF/X-1a Error

The customer exhibit was a 4GB PDF, had over 15,000 pages where each page defined a large number (in some cases over 8000) PDF fonts. This exceeded limits built into the PDF parser, so a change was made to automatically restart the parser when resources are low, allowing the job to complete.

MAKO-4465

MAKOSUP-11133 PDF/X4 preset creates a PDF that fails validation

Certain XML elements in the XMP were not transferred correctly from the source to the destination PDF. Now fixed.

MAKO-4484

MAKOSUP-11172 Request to have one Jar for cross platforms (Linux/Windows)

This was a customer request to repackage the Mako libraries for Java for both Windows and Linux into a single jar, to simplify their deployment. We’ve been able to do this, and the result shared with the customer. Once we have automated the process on our build server, we will make this part of the regular release, beginning with Mako 7.1.0.

MAKO-4257

MAKOSUP-11073 Get Font Objects of Document

IPDFInput::scanPdfForFonts() quickly scans a PDF, returning a list in the form of a CPdfInfoVect. A new parameter is added, domFont, that when set to true (the default is false) will generate an IDOMFont from any found PDF font object. These can be interrogated for further information as required, or used elsewhere.

MAKO-4491

MAKOSUP-11177 File does not display content

The customer exhibit was a badly broken PDF with both an invalid xref table and many invalid streams, causing Mako to ignore the content altogether. Mako is now able to cope with such a pathology, and will write a corrected PDF when saving.

MAKO-4500

MAKOSUP-11178  Exception thrown while attempting to process font

Fixed an issue with PCL font selection.

MAKO-4497

MAKOSUP-11179  Missing content and incorrect right hand margin

Fixed a PCL 5 parsing issue relating to HPGL/2 commands.

MAKO-4498

MAKOSUP-11180 Missing pages when converting PCL to PDF

Fixed a PCL 5 parsing issue relating to the HP/GL PE (Polyline Encoded) command.

MAKO-4499

MAKOSUP-11181 MakoConverter hangs in indefinite loop

This is the same issue as MAKO-4499.

MAKO-4282

MAKOSUP-11088 Add support colorant information in SVG generation

In response to a customer request, improvements are made to the ISVGGenerator class that enrich SVG output with additional color information.

A new API is added to set the SVG version:

ISVGGenerator::setVersion(SVGVersion) where SVGVersion is SVGVer_1_1 or SVGVer_2_0.

When set to SVG 2.0, additional color information is written to the SVG:

  • DeviceN colors, which appear as SVG device-nchannel() tags

  • sRGB, scRGB and DeviceRGB appear as SVG device-rgb() tags

  • sGray and DeviceGray appear as SVG device-gray() tags

All are written with their colorant information.

MAKO-4507

MAKOSUP-11191 Reported Rotation Angle is incorrect

A customer wished to determine the angle at which a page element is rotated. However, when using the CTransformMatrix::decompose() method, the customer obtained puzzling results. Investigation showed that the order of operations (translate, skew/shear, rotate and scale) has a bearing on the result. To address this, an alternative decompose() method is provided that better suits this and other common situations. A corresponding compose() method is available that can regenerate the original transform matrix.

MAKO-4308

MAKOSUP-11098  Canon header

A new interface, IPCLXLAttributeHandler, is introduced that can be added to an IPCLXLInput instance to allow it to ignore illegal PCL/XL attributes.

This is necessary because it appears that some Canon drivers add ColorSpace attributes to BeginPage operations, and the PCL/XL spec does not list this as a valid attribute.  The problem is that other PCL consumers will rightfully reject this and signal an error.  A customer asked for a callback handler that will enable them to ignore illegal attributes such as these.

A class derived from IPCLXLAttributeHandler can be set with a new IPCLXLInput::setAttributeHandler(), and the class ignoreAttribute() can be used to ignore any attributes that Mako finds to be illegal for an operator.  The ignoreAttribute() function takes two parameters:

  • The name of the operator for which there as an illegal attribute

  • The ID of the attribute

The list of known attribute IDs are listed in the PCL/XL reference.  ignoreAttribute() returns a Boolean value, where true indicates that we should ignore the attribute, or false will result in Mako throwing an exception as before.  When true is returned, Mako will remove the attribute from the stack.

MAKO-4518

MAKOSUP-11201 Error opening PDF

A minor problem with font loading from the PDF, now fixed.

MAKO-4527

MAKOSUP-11206 Text moved after any update

The customer exhibit was a ‘bad’ PDF, as it had nested BT/ET (Begin Text/End Text) pairs, which the PDF spec does not allow. Mako will now work around this problem and correct the error when saving the PDF.

MAKO-4529

MAKOSUP-11185 Crash while rendering customer case

The was reported as “Valid PDF/X-4 file became invalid after rerender” but what we saw immediately was that the customer exhibit could crash the Mako renderer. Once this was solved, some color issues surfaced which too were fixed.

MAKO-4536

MAKOSUP-11216 Trailer dictionary

A new API, IDocument::readPdfTrailerDictionary(),  returns a copy of the PDF trailer dictionary, if available. It sits alongside existing APIs such as IDocument::readPdfObject(). Using this new API, it is now possible to read any PDF object in any PDF file that is reachable from the trailer.

These APIs do not allow editing of the objects; they exist merely to query.

New and updated features

MAKO-4377

Layout features

This work began with a customer request to make it easier to create new PDF content, with an eye to VDP (Variable Data Printing) applications where pages are personalised with content drawn from database sources.

While this is possible with existing APIs in Mako, it’s difficult because they are low-level and a developer must do a lot of work, just to put text on the page, for example.

The new ILayout class on the other hand is backed by a layout engine (developed some years ago for another Global Graphics project) that greatly simplifies the process. Simply define one or more frames, then add paragraphs of text in the font, size, color of your choosing. The content will flow from one frame to the next, so making a three-column page is simplicity itself. Select from left, centered, right or full justification. Choose paragraph spacing (space above, space below) or leading (space between successive lines of text). You can even add images into the content. Then call the layout() method to create Mako DOM that can be added to the page.

In this release, ILayout is a “preview” feature. While it is fully tested, there are many features that we could add to expose more of the capabilities of the underlying layout engine, so we would like your feedback on what we should prioritize as we add to this exciting new capability in Mako. Documentation and example code for ILayout can be found at https://documentation.globalgraphics.com/support/mako/mako-core.

MAKO-4216

MAKO-4217

MAKO-4218

MAKO-4219

MAKO-4220

MAKO-4223

Implement a raster image cache in the renderer transform

Implement a source cache for the vector flattener

Implement an IDOMCachedImage image type

Implement caching of bounds for points list geometries

Speed up retained object handling in the transform caches

Speed up Jaws Type 7 shading rendering when most of the shade is not visible

These development stories (MAKO-4216 to MAKO-4220 & MAKO-4223) describe work in this release to significantly improve performance of the IJawsRendererTransform class. This is a transform for selective rendering of sections of a DOM tree, replacing the rendered items with an image and/or vector representation. This transform can be used by developers to flatten transparency and otherwise simplify page objects to improve performance by downstream processes. It is used in Streamline, a job preprocessing component of Global Graphic’s SmartDFE.

MAKO-4362

Handle 100% Black preservation - Colour Converter Transform

This introduces a black preservation mode that intends to preserve pure black under selected circumstances. This is great for improving quality for a lot of common situations. For example, text present as RGB 0,0,0 is going to generally look better and use less ink when converted to CMYK black than when painted with a rich black. Such text representations are rather common in real world jobs.

A new API is added to the IColorConverterTransform:

  • void setBlackPreservation(bool preserveForText, bool preserveForOther);

This allows black preservation to be specified separately for text and non-text objects. It only ever applies to flat objects (not images or shades for example). In this context, a non-text object is any flat object that is not text, such as simple masks, fills, and strokes.

The in-code documentation provides additional explanation. Search for setBlackPreservation in the online API documentation at https://api.globalgraphics.com/mako.

MAKO-4522

Handle 100% Black preservation - IJawsRenderer

The same API is available to the IJawsRenderer class:

  • void setBlackPreservation(bool preserveForText, bool preserveForOther);

MAKO-4528

Handle 100% Black preservation - IRendererTransform

Again, the same API is available to the IRendererTransform class:

void setBlackPreservation(bool preserveForText, bool preserveForOther);

Additionally, defaults can be set for all black preservation settings in one fell swoop. Tell the IColorManager (via IColorManager::setDefaultBlackPreservation()) what you want the defaults to be. These will affect IJawsRenderer, IColourConverter, and IRendererTransform.

MAKO-4197

Improve form caching to avoid file bloat

When processed by Mako, a PDF with a large number of form XObjects of a particular type were not being cached, leading the output file to grow unnecessarily. This improvement solves that while also increasing performance.

MAKO-4476

Add support for font rotation in IJPDS

An improvement to the IJPDSInput() class to support rotated fonts.

MAKO-4352

Implement a spot merging image filter

This release adds a new image filter, IDOMImageSpotMergerFilter(), that merges selected spot components into the process components of an image. This is conceptually similar to IDOMImageDeviceNToBaseFilter, with these additions:

  • It allows only some components to be merged into the process components

  • It does not apply a tint transform; instead, the spot colorants are merged into the process colors based on the color information provided via a kind of transparency blending

  • It allows some spot colorants to be dropped entirely

  • It provides a convenient method for dropping a single colorant while preserving all other spot components. While this is not merging per se, it can be useful

  • It optionally will convert process components to another color space

The API documentation explains further. Search for IDOMImageSpotMergerFilter at https://api.globalgraphics.com/mako

The same capability is also available to the IColorConverterTransform, so that the same type of colour conversion can be applied to DOM objects. 

Search for setDeviceNHandling at https://api.globalgraphics.com/mako for further details.

Finally, this work affects how color converting Indexed color spaces behaves. Previously, it appeared that Mako would not always convert Indexed color spaces in all circumstances, even though the transform was configured to do so. This is no longer the case, and it’s possible this change will affect results from existing Mako-based projects.

MAKO-4521

Detect DSC comments in PostScript with a call back mechanism

A new feature in IDistiller enables users to detect DSC and other comments within PostScript jobs and capture the metadata they are expressing.

This knowledgebase article describes the new feature in detail, complete with a code sample.

MAKO-4190

Support PDFs containing images > 2GB

A simple change to ensure large images in an incoming PDF are read successfully.

MAKO-4177

Attempt to reconstruct forms that are unpacked in the renderer transform

This is a new feature of the IRendererTransform class.

  • void setFormReconstructionCacheSize(uint32 formCount)

The default is 0, meaning do nothing.

This API sets whether the renderer should attempt to reconstruct forms that it needed to unpack due to the rendering of content within the form, and if so, sets the maximum size of the cache to use (in items).

This feature is only useful if the content is to be written to a PDF output where form objects can have benefits. Where that is the case the use of this API can dramatically reduce output file size and by retaining content within a form, ensure the efficiency of downstream processing, by a RIP for example.

The API documentation explains further. Search for setFormReconstructionCacheSize at https://api.globalgraphics.com/mako.

MAKO-4285

Allow the fallback resolution of the vector flattener to be set

A new API, IRendererTransform::setRasterFallbackResolution(uint32 resolution), provides even finer control over the vector-based transparency flattener feature of the IRendererTransform class. The API documentation explains further. Search for setRasterFallbackResolution at https://api.globalgraphics.com/mako.

MAKO-4510

DeviceN: Allow colorants to have different alternate

For the CColorantInfoVect version of IDOMColorSpaceDeviceN::create(), allow colorants to have a different alternate than the main DeviceN space.

When there are multiple colorants, DeviceN allows the prescription of individual colorant information that help when blending the components with other content. Normally Mako 7 generates Tint Transforms for each colorant using this API in terms of the DeviceN alternate space.

There are reasons why you may want to specify different colorspaces as the alternates for individual colorants in a DeviceN space. Mako now allows a per-colorant alternate to be specified in each CColorantInfo object, and will create the colorant information using that. If the alternate is not present in the colorant, it uses the DeviceN alternate, so current uses of the API will work as before.

MAKO-4424

IColorConverterTransform::useDOMRenderingIntents()

This API is updated such that setting this to false indicates that the color converter transform should not use explicit rendering intents in the DOM when performing conversion and instead use the default rendering intent for the current colour space.

MAKO-4259

CalRGB group spaces are ignored by Mako PDF input

CalRGB group spaces are now correctly propagated.

MAKO-4296

Matrix transformation changes when rendered at different resolutions

When rendering a customer file at various resolutions, unexpected artifacts were observed. These were due to an issue with a scaling algorithm that did not account properly for a wide range of possible inputs. Now fixed.

MAKO-4517

PDF/X-1a regressions with Altona and Ghent suites

Improvements elsewhere caused a problem for images and colors using an indexed color space, discovered when testing with the Altona and Ghent Working Group test suites. Solving this has led to quality and performance improvements in the handling of indexed colors.

MAKO-4519

Incremental save fails to include an entry added to the document Info dictionary

A metadata change was being written by a full save, but not an incremental save. Now fixed.

MAKO-4215

Canonicalize file names on create rather than on use

A previous change to Mako’s standard outputs prevents overwriting open input files. To do this Mako maintains a list of files that are open, and to enable comparison of filenames, they are canonicalized. For efficiency this process has been moved to when the file handle is created, rather than when the file is referenced. A new API is added to IInputStream to return the canonical name of the file:

CPP
bool getCanonicalSourceFilePath(EDLSysString &sourceCanonicalPath);

alongside the existing API (still present):

CPP
bool getSourceFilePath(EDLSysString &sourcePath)

MAKO-4035

CEDLVectString doesn't support extended Unicode characters in the C# SWIG build

Fixed by improving marshalling of strings between managed and unmanaged code.

MAKO-4260

Object in the page group that KO is true isn't knocked out (for PDF output)

Continuation of MAKO-4198 to include the change in PDF output.

MAKO-4198

Object in the page group that KO is true isn't knocked out

An internally-reported rendering issue was fixed.

Other

MAKO-4432

Support array literals to initialize a CEDLVector

Initializer lists are now supported for the Mako native vector type CEDLVector. This makes it possible to use code such as this:

CPP
CEDLStringVect myVector = { L"Cyan", L"Magenta", L"Yellow", L"Black" };

MAKO-4523

Update macOS build tools

Mako 6.x used SDK 11.3, first introduced with macOS Big Sur and Xcode 12.5. For this version we have brought the build tools up to date, and we are now building Mako with:

  • macOS Ventura

  • MacOSX13.3 SDK

  • iPhoneOS16.4 SDK

  • Xcode 14.3.1

This means while the static object code library retains the same filename (mako.a) the folder in which it resides is updated to release-macos-ub-13.3. 

MAKO-4350

Python SimpleExamples

The Mako SDK includes several code examples, collectively known as simpleexamples that cover a wide range of Mako applications – file format conversion, rendering, imposition, text extraction, content creation and more. They are available in C++, C# and Java but until now Python was largely left out. In this release, this omission is addressed with Python ‘translations’ of these examples.

MAKO-4425

Create Mako sample to flatten rich black

In response to a customer request, a Mako code sample was created that makes use of a custom transform to find and replace a rich black with a K-only black. It can be found on GitHub: https://github.com/mako-team/CmykBlackConverter

MAKO-3862

Complete PDF output certificate encryption support

Mako 7.0.0 uses LibreSSL in place of the OpenSSL library that Mako used until now. It has made it possible to have a truly cross-platform implementation for security-related procedures such as certificate-based encryption, etc. 

MAKO-4514

Correct ColorLogic NuGet package name

Introduced in Mako 6.6.3, the ColorLogic builds use the ColorLogic CMM in place of LittleCMS.

The name of the NuGet package for one of these has been updated as it was not following the established naming convention. Hence

  • MakoCore.OEM.Win-x64.VS2019.CL.Static.nupkg

Becomes:

  • MakoCore.OEM.Win-x64.VS2019.Static.CL.nupkg

Currently Global Graphics does not publish the Mako NuGet packages online, but they are easy to use from a local folder. See this documentation for further details.

Distribution

MAKO Version 7.0.0 is built for the following platforms:

  • iOS

  • macOS

  • Linux (for Debian-based distributions, eg Ubuntu 20.04 LTS, Mint)

  • Linux (Centos)

  • Linux (Red Hat Enterprise v7.0)

  • Linux (Red Hat Enterprise v8.4)

  • Linux (for Debian Buster) (arm32v7 for Raspberry Pi)

  • Linux (for Debian Bullseye) (arm64v8 for Raspberry Pi)

  • Linux (for Debian Bullseye)

  • Linux (for MUSL distributions, eg Alpine Linux)

  • Windows (static and dynamic libs, VS 2019 (V142), x86 and x64)

  • Windows (static and dynamic libs, VS 2017 (V141), x64)

  • Windows UWP/WinRT

Note that the Android build has been dropped from this release pending a tooling change. Please contact Mako support if you need a Mako release for Android later than Mako 6.1.0.

Mako supports the following programming languages.

  • C++ (Mako is written in C++)

  • C# (.Net Core and .Net Framework)

  • Java (built with OpenJDK15)

  • Python (v3.8)

The alternatives to C++ are built using SWIG (www.swig.org) which provides a translation to the native libraries, are found in these distribution folders:

  • Linux_SWIG_(C#-Java-Python)

  • Linux_Centos7_SWIG_(C#-Java-Python)

  • Linux_Centos8_SWIG_(C#-Java-Python)

  • Linux_Ubuntu_SWIG_(C#-Java-Python)

  • macOS_SWIG_(C#-Java-Python)

  • macOS_SWIG_(C#-Java11-Python)

  • Windows_SWIG_(C#-Java-Python)

  • Windows_SWIG_(C#-Java11-Python)

This release also includes Windows, macOS and Linux builds of Mako that integrate the ColorLogic CMM in place of the usual LittleCMS. These builds are found in the ColorLogic folder.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.