This week we announced a groundbreaking update to Mako Core™, our popular software development kit (SDK) for developers specializing in print document processing and manipulation.
Mako now includes a game-changing intelligent Document Object Model (iDOM) that provides unparalleled access to every aspect of a document’s composition, including fonts, images, vector art, layers and metadata. Unlike other SDKs that offer generic support for various Page Description Languages such as PDF, PS, OXPS, and PCL across print and digital document domains, Mako is sharply focused on print.
Recently I was talking to one of our Mako™ partners, Actino Software, who are based in Germany. Actino have successfully built many document solutions for their customers with Mako, and a recent example was for a large German crane manufacturer with subsidiaries worldwide. The design, manufacture and maintenance of cranes requires a lot of documentation, and the company estimates they manage around 100,000 documents, mainly in PDF.
There are numerous challenges to managing such a large corpus of documents, and one of those is the quality of those documents. I’m not talking here about the content, but rather the way in which the PDF was produced. Many different authoring and PDF creation tools are in use, some going back decades, resulting in a wide variation in the way PDFs are constructed. This is where Mako comes in.
For this project, Actino Software built centralized services that analyze and optimize the PDFs and prepare them for secure delivery. Mako can do this quickly, processing 400 MB files with many thousands of pages, fast. The analysis function identifies the number of pages, bookmarks, fonts, embedded attachments and other features, including document metadata (title, subject etc). The optimize function removes invalid hyperlinks, changes named destinations into working hyperlinks, and resaves the file to a reduce file size. In this particular case, Mako reduced the file size by more than 50% thanks to image resampling. Mako’s built-in font optimization (eliminating duplicate fonts and merging of font subsets) is another way it can reduce file size.
This work supports two DRM (Digital Rights Management) workflows:
Distribution via a portable storage device such as thumb drive, supported by a plug-in to Adobe Acrobat Reader that talks back to the company website for authentication.
Download from a secure website, for which small file size is a must.
Actino were able to meet the customer requirements with a rapid development schedule, based on their understanding of document workflows and their familiarity with the Mako Core SDK. Their customer chose the Actino solution over an Adobe DRM solution, which was considered too expensive and rigid.
When HP Inc began developing HP Site Flow, an end-to-end workflow and production automation system for HP digital press owners, they encountered several challenges including: addressing the growing personalized market; the need to ‘normalize’ PDFs, given the wide variation in the quality of files entering the system; and the ability to quickly scale up or down to accommodate varying levels of demand.
Read the case study to see how Mako Core™ SDK proved its capability and adaptability by rising to HP Site Flow’s development challenges, resulting in increased productivity and profitability for its users.
Are you confident that all your print jobs can be printed at full press speed? How do you know at what speed the press can be run for a given combination of print job – RIP / RIP – PC etc.
In his presentation at the recent FuturePrint Tech Digital Print for Manufacturing, David Stevenson explains how, using Streamline™ and the help of machine learning, we can analyze a PDF file and intelligently estimate how long it will take for that file to run through the press. But it doesn’t stop there: David explains how we can then optimize the file to ensure it will fly through the press without compromising quality or color integrity.
I’m excited to announce that Mako 6.6 will support OpenXPS (OXPS) as both an input and output!
But Mako already has lots of inputs and outputs – so why is this one so exciting?
Mako in Printing
Mako, in my opinion, is the premier SDK of choice when it comes to meeting challenges where performance, reliability and accuracy are required. This is particularly so with many printing use-cases.
These use-cases can include handling multiple page description languages (PDLs) from upstream workflows including PDF, PostScript, XPS, PCL, IJPDS and PPML. The only other PDL that was missing, until now, was OXPS.
The exciting part is that having this final PDL puts Mako in a unique and enviable position, as it now supports all common print PDLs, with a single, simple, consistent and clean interface and document object model (DOM).
Consolidate multiple SDKs for each required PDL.
Requires less developer downtime to learn multiple libraries and interfaces.
Offers a single point of contact and support for all your common PDLs from a trusted company with years of industry experience.
If you’re interested in hearing more, please get in touch with us and see how we can help with your software challenges.
If you fancy taking a look at some code samples to see what Mako can do, feel free to head over to our developer documentation.
This month WhatTheyThink’s third Technology Outlook takes place. It’s a series of webinars and interviews that highlight new innovations from industry analysts and thought leaders.
As part of the Thought Leadership Video series, David Zwang of WhatTheyThink chatted to Mako™ product manager David Stevenson, about how, by using our vast experience in RIPs and rendering, we’ve created a high-performance framework for print inspection systems.
David introduces Smart QI™, a quality inspection system available with SmartDFE™. Designed especially for print, SmartQI is a camera-based, real-time quality inspection system, offering the same real-time streaming of rasters. It is especially useful as the use of variable data increases, and press speeds and resolutions continue to grow, making it essential to inspect the print for defects before it comes off the press and goes into finishing and converting.
Project manager Jason Hook shows how we’ve implemented OPC UA into our solutions in this film: How to transform your inkjet business with Industry 4.0 and OPC UA. Jason demonstrates how we track performance metrics like pressure levels across an entire production line using our PC and Ink Delivery System, all while uploading it securely onto cloud servers using AWS IoT SiteWise and Azure IoT.
Creating discrete graphics in Mako Core™ with XAML
It’s not often that one is inspired by the introduction of a new feature in an SDK, but that has happened with Mako 6.3.0 and support for something rather drily known as Abbreviated Geometry Syntax. The inspiration arises because this way of describing geometry – curved and straight lines that form a shape, sometimes filled, sometimes not, that can be added to a page – derives from Microsoft’s XPS (XML Print Specification). But crucially it also appears in XAML, the language used by Windows to describe user interface (UI) designs.
Why is this significant? Some time ago I wrote a Mako sample that would take a regular PDF page, expand it then adorn it with printers’ marks. You know the sort of thing – tick marks that indicate the trimmed size of the page, or the edge of the bleed, and colour bars or gray scales that enable a printer to see a patch of 100% of an ink color, or the gradation from white to black. It also included small targets printed with all inks to help spot registration problems. The graphic itself was simple, but how to generate it with code? The APIs in Mako were somewhat unwieldy when it came to drawing on the page, so much so that I found it easier to copy content from another document.
Having created many discrete graphics in XAML to be used in a Windows application, such as a button or an indicator of some sort, I thought then it would be great to be able to convert a XAML snippet into Mako DOM objects that I could add to a PDF page. At the time, that was too much work. But with this new feature, it’s very straightforward, particularly in C# as there is great support for parsing XML. I began experimenting.
Draw a sample The first step was to create a graphic to test with that wouldn’t be too challenging but at the same time cover the principal elements found on a XAML canvas – the <Canvas> element itself then paths, rectangles and text blocks with their attendant properties for fill, stroke, color, font etc. Thus was born Funny Robot that you can see here in a screengrab from Visual Studio (VS). .
I often use VS for creating XAML graphics graphically; as you do so, the XAML is written for you. Plus, you can edit the code and immediately see the result in the preview window. Besides Visual Studio and its sibling Blend for Visual Studio, there’s Microsoft’s Expression Design 4. Unfortunately, Microsoft now consider it defunct, but there are those that think as I do that it is a very useful tool and have made it available for download. You will find it easily with a web search for “Expression Design 4”. This tool can import an Adobe Illustrator graphic which is an incredibly valuable feature, one not found in Visual Studio
Coding the solution The C# that I wrote for this first loads the XAML code as a .NET XmlDocument, then creates Mako DOM object(s) for each XAML element it finds, which are added to a Mako IDOMGroup. Once parsing is complete, that group of objects can then be added to a page, positioned and scaled as required. For the purposes of the example, I simply add the group to a new blank page and save it as a PDF.
This week, Mako™ product manager David Stevenson explains vector flattening:
When you print PDF content or save or export it to other formats that do not support transparency, it will need to undergo a process called flattening. Flattening usually involves rasterizing areas of the page that are subject to transparency effects, which could mean replacing sharp-edged vector content with a jagged-edged bitmap. Of course, increasing the resolution of the rasterization can mitigate that problem, but doing so takes longer and adds to file size.
The alternative is to retain vector geometry, including text, as vector objects. This requires dividing the artwork down into smaller parts that no longer overlap, then tracing the edges of the new shapes with a vector path. In the latest release, Global Graphics Software’s Mako Core SDK (v6.2.0) adds this capability to its raster-based transparency flattening API. Using existing APIs that apply De Casteljau’s algorithm to decompose Bézier curves and a new method to trace around shapes, flattened content can retain its device independence and printing quality.
I’ve included a short demo of the vector-based transparency flattening feature using Mako here:
Over the past year, Microsoft has been working hard to bring its new Cloud printing service, Universal Print, to general availability.
As a part of Universal Print, developers get access to a set of Graph APIs that allows analysis and modification of print job payload data. This feature enables a few different scenarios, including adding security (e.g. redactions or watermarks) to a Universal Print-based workflow.
As a curious engineer, I wanted to see how different it would be for an independent software vendor (ISV) to use our Mako™ Core SDK to modify a print job flowing through Universal Print, instead of using a more traditional route of using a virtual printer driver.
Thinking about the workflow a little more, I came up with the following design:
In the design above, we can see the end-user’s Word document gets printed to a virtual printer. This allows the ISV to be notified of the job, and modify it accordingly using Mako. Once modified, the ISV then redirects the job on to the physical printer for printing.
There’s a couple of nice things about this design:
Firstly, it uses the Graph API to access Universal Print, which is an easy-to-use and well documented REST API. Secondly, since the functionality is accessed via a REST API, it allows our ISV service to be written in whichever Mako supported language we like.
I chose C# to make best use of the C# Graph API SDK.
Developing the service
There are five main steps to developing the service:
Handle print job notifications
Download the print job payload
Modify the payload
Upload the payload
Redirect to the target printer
Handle print job notifications
To be notified of print jobs in Universal print, you can use the Graph’s change notifications. These will allow you to sign up to a notification, which will call a provided webhook.
Download the print job payload
Once we have notification that a print job has been sent to our virtual printer, we can start downloading its payload.
Here we use the appropriate Graph APIs, along with standard Graph authentication to access the print job’s document. We then simply save it to disk.
Modify the payload
Once we have the document on disk (although Mako can also modify streams too!), we can open the document and modify it using Mako’s document object model (DOM).
Alternatively, Mako can also convert from one page description language (PDL) to another. This is useful in situations where your destination printer doesn’t support the input PDL.
Upload the payload
Uploading the modified document is straightforward. This time we use the Graph API to create an upload session, and use the WebClient class to put the document back into the original print job.
Redirect to the target printer
And finally, after the print job has been updated, we can redirect it onto another printer. This redirection also automatically completes the print job and task.
Alternatively, if we want to be a little more green, we could always send the document to OneDrive, Sharepoint, or another document management system. After doing so, you then complete the print job and its associated task.
See it in action
We actually coded this demo live in our last Mako webinar, showing an implementation where an ISV wants to automatically redact content.
Access the code directly at our GitHub repository or watch the webinar recording below:
Try it out
We’re keen to talk to you about your Universal Print project and see how we can help. Contact us here.