---
source: https://carbone.io/examples/s-certificate-completion/
title: "LMS Certificate Generator with QR Verification | Carbone"
description: "Generate certificates of completion from your LMS data with the Carbone API: learner, skills, distinction, expiry date and a QR code to verify the credential."
generated_at: "2026-11-17"
---

# Certificate of completion

Learner, skills and a verification QR code, as a PDF

[![Certificate of completion: PDF generated from a DOCX template and JSON data](/examples/s-certificate-completion/thumb-result.webp)](/examples/s-certificate-completion/result.pdf "Download the generated document")

[Download template](/examples/s-certificate-completion/template.docx)

[Sample data](/examples/s-certificate-completion/data.json)

[Download the generated PDF](/examples/s-certificate-completion/result.pdf)

- **Template:** DOCX
- **Export as:** PDF, DOCX, ODT, HTML, PNG [+25 more](/documentation/developer/http-api/generate-reports.md#output-file-type)
- **Carbone:** 5.18+

Features

-   [Loop](/documentation/design/repetitions/with-arrays.md)
-   [Condition](/documentation/design/conditions/overview.md)
-   [Barcode](/documentation/design/advanced-features/barcode.md)
-   [Date](/documentation/design/formatters/date.md)

## Generate certificates of completion from your LMS

Learning platforms, corporate academies and training providers issue a certificate each time a learner completes a program. The LMS sends the learner and the credential to the Carbone API as JSON and gets back a PDF, ready to email or to download from the learner's profile. Like a digital badge, the certificate carries a credential ID and a verification link: anyone who scans the QR code can check that it is genuine. In this example, the fictional Emberline Academy certifies a professional program in data engineering.

In this example, you will:

-   Print the learner and the credential with simple tags
-   Repeat the list of skills with a loop
-   Show "With distinction" with an inline condition
-   Format the dates and generate the verification QR code

## How to build a certificate of completion

### 1\. Print the learner and the credential

In a landscape DOCX, a borderless table splits the page into a main column and a narrow side column. Write the [tags](/documentation/design/substitutions/the-basics.md) where the values go: `{d.learner.name}`, `{d.credential.title}`, `{d.credential.level} level`, `{d.credential.hours} hours` and `{d.credential.description}`. Each value takes the font, size and color of its tag in Word.

### 2\. Repeat the skills

The side column lists the skills with a [loop](/documentation/design/repetitions/with-arrays.md): `{d.skills[i].name}` in a first paragraph, `{d.skills[i+1].name}` in the next one. Carbone prints one paragraph, with its hairline border, per skill of the array.

### 3\. Show the distinction

An [inline condition](/documentation/design/conditions/inline-conditions.md) prints a word from the score: `{d.credential.score:ifGTE(90):show('With distinction'):elseShow('Completed')}`. With a score of 92, the certificate shows "With distinction".

### 4\. Format the dates and add the QR code

-   [Format the dates](/documentation/design/formatters/date.md#formatd-patternout-patternin) with `{d.credential.issuedOn:formatD(LL)}` and `{d.credential.expiresOn:formatD(LL)}`: "May 27, 2026" in English.
-   The QR code is a temporary picture with `{d.credential.verifyUrl:barcode(qrcode, scale:6, includetext:false)}` in its alternative text. Carbone replaces the picture with a [QR code](/documentation/design/advanced-features/barcode.md) of the verification link, also printed as text under it with `{d.credential.verifyUrl}`.

Save the template, send the JSON of each learner, and Carbone generates every certificate in the same layout.

## Related Examples

- [Training certificates](/examples/certificat/index.md): ODP template to PDF.
- [Event badge with QR code](/examples/event-badge/index.md): SVG template to PDF.

## Related topics

- [Airline boarding pass](/examples/boarding-pass/index.md)
- [Flight e-ticket](/examples/eticket/index.md)
- [Train e-tickets with QR codes](/examples/ticket/index.md)
- [French rail e-ticket](/examples/billet-de-train-electronique/index.md)
- [Training certificates](/examples/certificat/index.md)
- [Health insurance member ID card](/examples/insurance-member-id-card/index.md)
