---
title: "PowerPoint to PDF/UA | Nutrient Java SDK"
canonical_url: "https://www.nutrient.io/guides/java/templates/presentation-template-to-pdf-ua/"
md_url: "https://www.nutrient.io/guides/java/templates/presentation-template-to-pdf-ua.md"
last_updated: "2026-08-10T00:00:00.000Z"
description: "Generate presentations from PowerPoint templates with JSON data and convert to accessible PDF/UA format in Nutrient Java SDK."
---

# Generating PDF/UA from PowerPoint templates

This guide explains how to generate a PowerPoint presentation from a template and convert the generated file to PDF/UA with Nutrient Java SDK.

PDF/UA supports accessible PDF output for assistive technologies such as screen readers. Use it when generated documents have to align with standards and policies such as Section 508, ADA, or EN 301 549.

Use this workflow for the following presentation types:

- Pitch decks and sales presentations.

- Résumés and candidate profiles.

- Reports and status updates.

- Repeated presentations with structured template data.

[Download sample](https://www.nutrient.io/downloads/samples/java/presentation-template-to-pdf-ua.zip)

## Using the Java SDK for template-to-PDF/UA generation

Use one PowerPoint template, apply JSON data, and export accessible PDF output.

Template generation helps you separate the following parts of the document workflow:

- Slide design and layout in the PowerPoint template.

- Variable content in the JSON data model.

- Output generation in the Java application.

- PDF/UA conformance in the export settings.

## Preparing the project

Define a package and import the classes required for template processing and PDF/UA conversion:

```java

package io.nutrient.Sample;

import io.nutrient.sdk.Document;
import io.nutrient.sdk.editors.PresentationEditor;
import io.nutrient.sdk.enums.PdfConformance;
import io.nutrient.sdk.exceptions.NutrientException;
import io.nutrient.sdk.settings.PdfSettings;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;

public class PresentationTemplateToPDFUA
{

```

Create a `main` method and declare the exceptions used in this sample:

```java

    public static void main(String[] args) throws NutrientException, IOException
    {

```

Then add the template processing and export workflow.

## Processing the PowerPoint template

Use a [try-with-resources statement](https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html) to close resources correctly.

Open the PowerPoint template document:

```java

        try (Document document = Document.open("input_presentation.pptx"))
        {

```

Create a `PresentationEditor` instance for template operations:

```java

            PresentationEditor editor = PresentationEditor.edit(document);

```

## Loading and applying the template data

Load the JSON model that populates the template placeholders:

```java

            String model = Files.readString(Path.of("input_presentation_model.json"));

```

Apply the model to replace placeholders with data:

```java

            editor.applyTemplateModel(model);

```

This call handles the following template processing tasks:

- Parse placeholders and merge fields.

- Replace content while preserving formatting.

- Handle repeating or conditional slide sections.

- Maintain slide structure and styles.

Save the processed presentation as an intermediate PowerPoint file:

```java

            editor.saveWithModelAs("output.pptx");
            editor.close();
        }

```

At this point, `output.pptx` contains the populated presentation.

## Converting to accessible PDF/UA format

Open the processed document before configuring the PDF export settings:

```java

        try (Document processedDoc = Document.open("output.pptx"))
        {

```

Set PDF settings for PDF/UA conformance:

```java

            PdfSettings pdfSettings = processedDoc.getSettings().getPdfSettings();
            pdfSettings.setConformance(PdfConformance.PDF_UA_1);

```

Export the document as an accessible PDF:

```java

            processedDoc.exportAsPdf("output.pdf");
        }
    }
}

```

The workflow creates an intermediate PowerPoint presentation (`output.pptx`) and a final PDF/UA file (`output.pdf`).

## Understanding the complete workflow

This sample uses the following workflow:

- **Template design** — Create a PowerPoint template with placeholders for dynamic content.

- **Data preparation** — Structure JSON data to match the template fields.

- **Template processing** — Apply JSON data to generate PowerPoint output.

- **Accessibility conversion** — Convert PowerPoint output to PDF/UA.

- **Compliance check** — Validate output against your accessibility requirements.

This approach enables template authors to work in PowerPoint while developers generate consistent, accessible output programmatically.

## Error handling

The SDK uses exceptions for error handling. The methods in this guide throw the following exceptions:

- `NutrientException` for SDK-related errors during template processing or PDF conversion.

- `IOException` for file-reading errors when loading the JSON model.

Handle these exceptions in your app for logging, retries, or fallback logic.

## Conclusion

You now have a template-to-PDF/UA workflow for PowerPoint presentations. Use this pattern to:

- Process PowerPoint templates with dynamic data.

- Generate intermediate PowerPoint presentations for review.

- Produce accessible PDF/UA documents for distribution.

- Check generated files against accessibility requirements.

- Maintain consistency across generated presentations.

Download the [sample package](https://www.nutrient.io/downloads/samples/java/presentation-template-to-pdf-ua.zip) to run this example as-is.
---

## Related pages

- [Nutrient Java SDK template guides](/guides/java/templates.md)
- [Generating PDF/UA from Excel templates](/guides/java/templates/spreadsheet-template-to-pdf-ua.md)
- [Word template generation and processing](/guides/java/templates/word-template-generation.md)
- [Word template processing-to-PDF/UA conversion](/guides/java/templates/word-template-to-pdf-ua.md)

