---
source: https://carbone.io/examples/editorjs/
title: "Convert EditorJS Content to PDF Documents | Carbone Examples"
description: "Learn how to convert EditorJS JSON output from HTML WYSIWYG Tool into professional PDF documents using Carbone. Create beautiful reports with headers, lists, tables, and images using our document generation solution."
generated_at: "2026-07-13"
---

# EditorJS to DOCX/PDF

Convert EditorJS Content from HTML WYSIWYG Tool to PDF Documents

[![editorjs thumbnail](/examples/editorjs/thumb-result.webp)](/examples/editorjs/result.pdf)

[Download Template](/examples/editorjs/template.docx)

[Download data sample](/examples/editorjs/data.json)

-   Template type document docx simple
-   Carbone min. v4.0.0+
-   Features array filter
-   Target editorjs conversion pdf docx wysiwyg

## Overview

This guide demonstrates how to convert EditorJS JSON output from HTML WYSIWYG Tool into professional PDF documents using Carbone. You'll learn how to handle various content elements including:

-   Headers and titles
-   Paragraphs and HTML content
-   Lists and tables
-   Images and annexes

## Step-by-Step Guide

The most effective approach uses a template with a predefined table structure. This method ensures consistent formatting and proper content organization.

### 1\. Create the Main Structure

-   Set up a single-column table that spans the full page width
-   Remove table borders for a clean, professional appearance

### 2\. Configure Content Styles

-   Create separate rows for each content type (headers, paragraphs, lists, etc.)
-   Set up formatting for each style using Carbone tags (e.g., `{d.blocks[i].data.text}`):
    -   Font settings
    -   Spacing and alignment

### 3\. Add Conditional Display Logic

-   Use the [:ifEQ](/documentation/design/conditions/overview.md#ifeq-value) and [:keep](/documentation/design/conditions/smart-conditions.md#drop-keep-element) formatters to control row visibility based on content type.
-   Example: `{d.blocks[i].type:ifEQ('paragraph'):keep(row)}`
-   This ensures each content type displays correctly

By following these steps, you'll create an efficient template that converts EditorJS content into well-formatted PDF documents.

## Related Examples

Explore these similar templates to learn more:

[![factur-x thumbnail example](/examples/factur-x/thumb-result.webp)](/examples/factur-x/index.md)

## Trusted by 800+ paid customers in 40+ countries

## Related topics

- [Transport ticket](/examples/ticket/index.md)
- [Summary](/examples/summary/index.md)
- [Stock inventory spreadsheet](/examples/stock-inventory-spreadsheet/index.md)
- [Store Inventory](/examples/shoes/index.md)
- [Sensor readings](/examples/sensor-readings/index.md)
- [Real estate property document](/examples/real-estate-property-description/index.md)
