Articles on: News

Carbone V3 - News September 2021



Hello / Bonjour πŸ‘‹

In this first news edition, we are celebrating and sharing with you a major Carbone update, version 3.0.0 πŸŽ‰
As always, the Carbone team is focusing on stability, simplicity, and performance, that's why we are bringing you this new version.
Carbone v3 is fully backward compatible with all of your reports. We value future-proof and sustainability, so do our users.

In this article, the team and I are pleased to introduce the following (cool) elements:

HTML rendering (Enterprise Edition Only)
Dynamic Hyperlinks (Enterprise Edition Only)
Dynamic Checkboxes (Enterprise Edition Only)
Carbone Render API updates (Enterprise Edition Only)
Core updates (Community Edition & Enterprise Edition )
WIP and Roadmap πŸš€

The version was ship into production a few months ago and the v3.3.0 is already available, it is going blazing fast, but here we are to communicate! If you want to get all updates and all technical details, read our changelog.

To update to the latest version:

CarboneJS on Github: Update the package version, run on your terminal npm update carbone
Carbone Render API users: insert the header carbone-version:3. If API requests are made from a Carbone SDK, upgrade to the latest SDK version and it will request the latest Carbone version by default.
Carbone Studio: On the top right of the home page, click on the settings button > Click on "Carbone Version" > Select 3.x.x.

Community Edition : CarboneJS on GitHub || Enterprise Edition : Carbone Studio, Render API, On-premise

HTML rendering



Available only for Carbone Enterprise Edition

A new :html formatter is available to renders HTML content on DOCX, ODT and PDF documents. If your JSON dataset includes some HTML, insert the Carbone tag on your template and chain the html formatter, such as {d.htmlContent:html}. Here is a quick demo:

Carbone HTML Rendering Demo

Discover usage examples and all details on the HTML documentation.



Available only for Carbone Enterprise Edition

It is now possible to insert hyperlinks into elements (text, image, list, tables, ...). Right-click into an element, select "hyperlinks", insert the tag and validate. It is working with ODS, ODT, and DOCX reports. Here is a quick demo to render a PDF including hyperlinks from a JSON:

Dynamic Hyperlinks Demo

Discover usage examples and all details on the Hyperlinks documentation.

Dynamic Checkboxes



Available only for Carbone Enterprise Edition

You can set the value of a checkbox dynamically. If the exported file type is a PDF, the checkbox can be edited on the generated document.

Dynamic checkboxes into an ODT template

Discover examples and all details on the Checkboxes documentation.

Carbone Render API Updates



Available only for Carbone Enterprise Edition

NEW: The endpoint to add a template POST render.carbone.io/template accepts a JSON object that contains the template as a base64 String { "template" : "pure base64 or a base64 data-URI"}. The request headers must include {"carbone-version": "3", "content-type": "application/json" }.
NEW: Add the possibilty to generate JPG or PNG of the first page of a document by defining { "converTo" : "jpg" }. It is also possible to pass image options, such as:
{  
   convertTo : {
        formatName    : "jpg", // or "png"
        formatOptions : {
            Quality     : 90,  // [JPG ONLY] From 1 (low quality, high compression, low size) to 100 (high quality, low compression, high size
            PixelWidth  : 100, // Image width as pixels
            PixelHeight : 100, // Image height as pixels
            Compression : 90,  // [PNG ONLY] From 0 (compression disabled) to 9 (high compression, low size)
            Interlaced  : 0,   // [PNG ONLY] 0 not interlaced, 1 enterlaced (higher size)
            ColorMode   : 0    // 0 Colors, 1 Greyscale
        }
   }
}

NEW: It is possible to export a PDF/UA (Universal Accessibility, ISO 14289), learn more on the PDF export filters documentation
{
  convertTo : {
    formatName    : 'pdf',
    formatOptions: {
      PDFUACompliance: true
    }
  }
}

FIX: Default values of the PDF export filter options table has been fixed.
NEW: Curl commands are available to request the API in 2 minutes, you just have copy and past example on your terminal.


Carbone Core updates



Available for Carbone Community Edition & Enterprise Edition

Updates related to Dates (Find usage examples and all details on the date documentation):

New: Carbone uses Dayjs instead of Momentjs, date formatting remains the same with less code.
New: In a template, {c.now} returns the current date in UTC if the options.complement.now isn't already defined.
New formatters: addD(amount, unit [, patternIn]) : add days, month to a date. formatD can be used after without specifying patternIn
New formatters: subD(amount, unit [, patternIn]) : subtract days, month to a date. formatD can be used after without specifying patternIn
New formatters: startOfD(amount, unit [, patternIn]) : Set a date to the start of a unit of time. formatD can be used after without specifying patternIn
New formatters: endOfD(amount, unit [, patternIn]) : Set a date to the end of a unit of time. formatD can be used after without specifying patternIn
New: Timezone support! Add the option.timezone rendering option, it is going to be used by the formatter formatD to return the date based on... the timezone! List of timezone.
Fix: Fix date formatters (formatD...) and number formatters (formatN...) when the country code is used in options.lang. It accepts lower case or upper case for the locale.

Mixed updates:

New: Adding padl and padr string formatter to pad the string from the start or end with another string.
New: Accepts Adobe Indesign IDML file as a template
New: Support officially to embed translations tags inside other tags: {d.id:ifEq(2):show( {t(Tuesday)} ) }
New: Accepts boolean in array filters d.array[i, myBoolean=true]
Perf πŸ”₯: Improve the parsing processing
Perf πŸ”₯: Reduce disk IO when converting document
Perf πŸ”₯: deactivate image compression by default to speed up PDF conversion
Fix: if a path does not exist inside a formatter argument, it returns an empty string instead of the error "[[C_ERROR]] attribute_name not defined". It fixes some weird behaviour with ifEM formatters.
Fix: Accept null for the attribute complement in options
Fix: Fix corrupted document when accessing a sub-object in an array {d.surrounding[i].subArray[0].subObject.id}, within a surrounding loop
Fix: aliases beginning with same prefix names are properly rendered in the generated reports instead of not being skip.
Fix: Do not break documents if the i+1 row contains some tags coming from parent object or condition blocks (rare)
Fix: Fix number formatting for locales (list available on the changelog), such as: de => Freitag 1,000.123 (before) Freitag 1.000,123 (after)
Fix: Fix broken Excel files. It removes the alert which appears sometime when opening the file with MS Excel.
Fix: Fix the generation of ODP document that includes table lists.
New Enterprise Edition Only : Accepts to convert the first page of docx or odt templates into a JPEG file with converTo : 'jpg'
New Enterprise Edition Only : cells colors on ODT/DOCX report can be changed dynamically with the "bindColor" tag.
New Enterprise Edition Only : Dynamic pictures are supported on ODG and ODP files. It is not possible to create loops.
New Enterprise Edition Only : Accepts loops with dynamic image replacement across slides/pages in ODP templates
Perf πŸ”₯ Enterprise Edition Only : Improve performance to download images. Building a report with a lot of dynamic images is almost 5 times faster than before.

WIP and Roadmap



Teasing next releases πŸ’₯: Simplifying plans and the billing system, you will learn more about it in the next news.
Coming next: Dynamic charts (Yes finally! Youhou!)

Follow us on twitter to get news and updates.

Cheers 🍻 - David, Guillaume & Steeve

If you’re new to Carbone and want to try out our new functionality right away, you can get started with CarboneJS on Github (and, as always, ⭐️ are appreciated!) or create a free account to get started with Carbone Cloud API (100 reports per months for free πŸš€).

Updated on: 09/09/2022

Was this article helpful?

Share your feedback

Cancel

Thank you!