New – Carbone v5

Now available – discover what's new

Page updated on December 1st, 2025.

How to use Carbone v5

Template Migration Guide

As always, the Carbone language is backward compatible when upgrading from previous versions. However:

  1. Carbone v5 detects more syntax errors than Carbone v4. The most common issue is a missing i+1 tag, which Carbone v4 may have accepted in some cases. If you encounter migration issues, please contact us. We're here to help!

  2. The main differences usually come from the converter version (LibreOffice).

    • If you use Carbone On-Premise, you can continue using an older version of LibreOffice with Carbone v5.
    • The Cloud Edition (API v5) uses the latest LibreOffice version (25.2), while Carbone Cloud v4 uses LibreOffice 7.5.
    • As a result, document conversion results may differ when switching from v4 to v5 (especially for DOCX to PDF). In general, the output is improved, but we recommend carefully reviewing your documents after migrating.

API Migration Guide

All APIs are backward compatible. They now support both the versionId and the new constant templateId (see below).

Studio - Design Assistant

Carbone v5 comes with a built-in designer assistant studio.

The new studio is composed of two parts (two pages):

Here are all the new features of the Designer Assistant:

Stop wasting time scrolling through your document between each preview
Stop wasting time scrolling through your document between each preview!
The studio keeps the scroll position and zoom level between live previews.
You can also resize the preview/data panels.
Stop searching for errors in your template
Stop searching for errors in your template, the studio shows you exactly where they are!
Carbone v5 detects more syntax errors than v4.
Coming soon: Our integrated AI will offer solutions to your errors.
Reduce typing errors by clicking on your data to copy the Carbone tags.
Reduce typing errors by clicking on your data to copy the Carbone tags.
Then, paste them into your template.
Placeholder images are automatically generated.
Speed up your tag customization with our fast, smart auto-completion.
Speed up your tag customization with our fast, smart auto-completion.
The auto-completion can even search for attributes in your data sample.
The clipboard is always updated and "ready to paste".
Live reload of the template now works in Safari and Firefox with template drag and drop
Live reload of the template now works in Safari and Firefox with template drag and drop.

Studio - Embedded

Embed Carbone Studio directly in your application!

From the software editor's perspective:

From the user's perspective:

From the developer's perspective:

1. Load the web component file

  <script src="/carbone-studio.js"></script>
  <style>
    carbone-studio {
      height:100%;
      width:100%;
    }
  </style>

2. Start the studio

// Instantiate the Web component
const studio = document.createElement('carbone-studio');
// Or insert `<carbone-studio></carbone-studio>` directly in the DOM.
// Add the studio component to the DOM
document.body.appendChild(studio);             
// Configure the studio
studio.setConfig({
  origin : 'https://api.carbone.io/', // Defaults to `window.location.origin`
  token  : '',                        // Provide a JWT Token if authentication is enabled on your On-Premise instance
});


const templateFile = {
  // The studio will automatically call `URL_ORIGIN/template/:templateId` to download the template
  templateId : '424242424242424242424242424',
  // Extension is used for the user interface and may change in the future
  extension  : 'docx' 
};
// Pre-initialize the studio with data, language, etc.
const options = {
  data           : {},
  complement     : {},
  enum           : {},
  translations   : {},
  lang           : 'fr-fr',         // Defaults to browser language
  timezone       : 'Europe/Paris',  // Defaults to browser timezone
  currencySource : 'EUR',           // Defaults to browser currency
  currencyTarget : null
};
// Open the template in the studio
studio.openTemplate(templateFile, options);

3. Listen to events


  studio.addEventListener('connected');
  studio.addEventListener('disconnected');

  // Listen for updated options
  studio.addEventListener('options:updated', handler);
  // Event object:
  // {
  //   detail: {
  //     data         : <ObjectOrArray>
  //     complement   : <ObjectOrArray>
  //     enum         : <Object>
  //     translations : <Object>
  //   }
  // }

  // Listen for the `template:saved` event to get the new template Id
  studio.addEventListener('template:saved', handler);
  // Event object:
  // {
  //   detail: {
  //     templateId: 'af42af42af42af42af42af42af42af42af42af42af42af42'
  //     type      : 'docx'
  //   }
  // }

  // The `template:updated` event is still emitted, but it contains the template as a Base64 string (no template ID)
  studio.addEventListener('template:updated', handler);
  // Event object:
  // {
  //   detail: {
  //     dataURI : '',   // template in base64
  //     type    : 'docx'
  //   }
  // }

4. Override fetch request

  const studio = document.createElement('carbone-studio');
  window.addEventListener('DOMContentLoaded', function() {
    document.body.appendChild(studio);
    studio.setConfig({
      fetchOverride : fetchHandler // Override fetch behaviour in the Studio 
    });
    function fetchHandler(url, options) {
      console.log('Override fetch called:', url, options);
      const newOptions = {
        ...options,
        headers: {
          ...options.headers,
          'X-From-Studio': 'true'
        }
      };
      if (url.startsWith('/template/')) {}
      if (url.startsWith('/templates/')) {}
      if (url.startsWith('/render/')) {}
      return fetch(url, newOptions);
    }
  });

Document converters

Carbone merges data with templates, but document conversion (for example, DOCX to PDF) has traditionally been handled by a single external tool: LibreOffice.

Although we financially support The Document Foundation every year, we have in-depth knowledge of LibreOffice's technical limitations. That’s why we wanted to remove this constraint and offer more flexibility.

Now, you can choose from four different document converters, all managed directly by Carbone:

Converter Performance Precision Document Features Availability
LibreOffice (default) + Best for ODT/ODS/ODP/ODG to PDF ++++ Yes
OnlyOffice ++ Best for DOCX/XLSX/PPTX to PDF ++ Yes
Chrome ++ Best for HTML to PDF + Yes
Carbone Ice +++++ Best for simple DOCX to PDF - Q4 2026

Carbone Ice is our own converter, intended for specific use cases where extremely high performance is required.
We may stop developing this solution if OnlyOffice or LibreOffice reaches similar performance 😛.

OnlyOffice Limitations:

Converter selection

  {
    // L : LibreOffice
    // O : OnlyOffice
    // C : Chrome
    "converter" : "L",
    "convertTo" : "pdf",
    "data"      : {}   
  }
converter selection
Choose your document converter

Optimizations

A core principle in our development is ensuring that each new version is faster than the last. Carbone v5 is a major milestone, enabling document generation up to 10 times faster than Carbone v4.

Document Generation

Opening templates and saving generated documents can account for up to 35% of Carbone’s internal resource consumption, not including document conversion time. We achieved a 4× improvement in template opening speed and a 2× improvement in saving the generated document. Overall, this results in a 2× performance gain on a 15MB PPTX template (without PDF conversion) when comparing Carbone v4 and v5:

Performance gain
Document generation time (ms): Carbone v4 vs v5 for a complex 15MB PPTX template (lower is better).

Multiple Converters, More Solutions for Huge Documents

Carbone v5 supports multiple document converters (see the previous section). OnlyOffice can be used as a replacement for LibreOffice. Here are our benchmarks for converting a large, complex 200-page DOCX file to PDF:

Converter performance for big file
DOCX to PDF conversion time (s): LibreOffice vs OnlyOffice for a large, complex 200-page file (lower is better).

OnlyOffice may be slightly slower for small documents (mainly due to a higher cold start time compared to LibreOffice).

Carbone v5.0.3 also introduces a new formatter, :appendTemplate, which enables the possibility of generating documents with up to 20,000 pages in multi-threaded mode.

Fast Round Robin Conversion Queue

Carbone distributes conversion jobs across multiple threads using an extremely efficient technical stack.

We provide pre-built binaries on our own CDN (bin.carbone.io), offering optimized and compact versions of all these tools: LibreOffice, OnlyOffice, and Chrome, for multiple architectures (ARM, x64).

Carbone is extremely fast compared to other converters like Gotenberg, Collabora, JODConverter, or Puppeteer:

document converter benchmark
Document converter benchmark. (higher is better)

Feature Optimizations

In processing drop/keep tags: for templates containing many drop/keep tags (>10,000), processing can be up to 1000× faster.

When isDebugActive is true (for debugging in the studio), concatenating Carbone tags in the JSON result can also be up to 1000× faster for templates containing more than 10,000 Carbone tags.

Template Engine

All prerelease features delivered in v4 with optional flags {o.preReleaseFeatureIn=4022011} are now activated by default for all templates.

This new v5 engine is more stable and handles more complex use cases compared to v4, while maintaining backward compatibility with v4.

Here are the major improvements:

CLI + Env Variables

The CLI has been completely rewritten for greater clarity and ease of use when starting and deploying.

CLI
New interactive tools to generate key pairs, generate tokens, and verify tokens

API Template List & Constant Template ID

What problems does this solve?

What's new?

All API endpoints now support two types of IDs when referencing a template:

Summary:

To ensure backward compatibility, this new template storage method is only enabled if the versioning: true flag is set when creating a template via POST /template. In that case, the POST /template response is updated to reduce confusion:

Type No Versioning Versioning Enabled Carbone Version
SHA-256 hash of the file templateId v5, v4, v3, v2
SHA-256 hash + random salt versionId v5 + versioning: true
64-bit constant ID id v5 + versioning: true

API Updates Summary

  # Updated endpoints:
  POST   /template                            # Create a new template or a new version of an existing template
  GET    /template/{templateId-or-versionId}  # Download the template file
  DELETE /template/{templateId-or-versionId}  # Delete a template
  POST   /render/{templateId-or-versionId}    # Generate reports using templateId or versionId

  # New endpoints:
  PATCH  /template/{templateId-or-versionId}  # Update metadata: name, comment, tags, expireAt, deployedAt
  GET    /templates                           # List all deployed templates and their versions
  GET    /templates/categories                # List all categories used in templates
  GET    /templates/tags                      # List all tags used in templates

Roadmap

Sept-2025 Next
HTTP API v5 (same scope as v4) Stable
Carbone template engine Stable
LibreOffice converter Stable
OnlyOffice converter Stable
Chrome converter Stable
Better XLSX Templates processor Stable
Better HTML/XML Templates processor Stable
SVG Templates processor Stable
PDF Form templates processor Stable
Nested Template (appendTemplate) Stable
Open Metrics Stable
Improved :html formatter (color, ...) Stable
Studio - Designer assistant Stable
Studio - Embedded Stable
Studio Viewer HTML/XML Stable
Template manager/versioning/constant ID (Studio + HTTP API) Stable
Multi-tenancy + database backup S3 Q4 2025
Improved :html formatter (table support) Q4 2025
MD to HTML converter Q4 2025
keep/drop(column) Q1 2026
AI Template generator Q1 2026
AI Assistant Q1 2026
PDF Comparison (Visual and Text Differences) Q2 2026