DevExpress Office & PDF File API for Java — Generate PDFs, PowerPoint Presentations, and Barcodes in Java Apps

7 September 2026

Building document-processing solutions on the JVM often means combining specialized libraries for different document formats and workflows.

DevExpress Office & PDF File API for Java gives Java developers API libraries for PDF and PowerPoint file processing and barcode generation. You can create, modify, and export documents directly in Java applications without Microsoft Office or Adobe Acrobat.

The product is available as a Community Technology Preview (CTP). Its API libraries are uploaded on Maven Central and support Maven and Gradle projects.

In this post, I’ll introduce the CTP, explain its cross-platform architecture, and write a sample Java application. I'll also examine an important architectural difference from many Java document libraries: DevExpress libraries use their own drawing primitives instead of java.awt and rely on a Skia-based rendering engine instead of the Java graphics stack.

DevExpress Office & PDF File API for Java is available today as a free Community Technology Preview (CTP). Register to receive technical support throughout the CTP period: Register Online. The commercial release (set for 2027) will be available as a separate subscription. It will not be included in the Office & PDF File API for .NET or Universal subscription.

What's Included in the CTP

Our CTP includes three API libraries:

  • PDF Document API: devexpress-docs-pdf
    Create, modify, secure, and export PDF documents.
  • PowerPoint Presentation API: devexpress-docs-presentation
    Create, modify, and export PPTX presentations.
  • Barcode Generation API: devexpress-docs-barcode
    Generate 1D and 2D barcodes and export them as images or PDF.

All libraries share a consistent API design and cross-platform drawing types. You can use APIs independently or combine them in the same Java application.

DevExpress Office and PDF File API for Java

Built for Cross-Platform Java Development

All three libraries are cross-platform and run across the following operating systems and deployment environments:

  • Operating systems — Windows x64, Linux x64, and macOS ARM64.
  • Containers — Docker images based on supported platforms.
  • Cloud — Microsoft Azure and Amazon Web Services (AWS).

The rendering stack does not depend on standard Java graphics APIs. DevExpress libraries use the Skia graphics engine, with ICU (International Components for Unicode) for text processing. Skia ships as a separate platform-specific dependency and allows you to deploy the same application across supported Windows, Linux, or macOS environments.

Our API libraries use their own cross-platform drawing types instead of java.awt:

  • com.devexpress.system.drawing — drawing primitives such as Color, PointF, SizeF, and RectangleF.
  • com.devexpress.drawing — imaging types such as DXImage and DXImageFormat.

The shared drawing model provides a consistent API across supported platforms, while the Skia-based rendering stack performs underlying graphics operations. This separation allows the same document-processing code to run in a desktop application, a headless Linux container, or a cloud service.

DevExpress resource-owning types (such as DXImage, PdfDocument, Presentation, and BarcodeGenerator) implement Java's Closeable. Use these objects with try-with-resources when your application no longer needs them:

import com.devexpress.system.drawing.*; 
import com.devexpress.drawing.*;        

try (PdfDocument document = new PdfDocument();
     DXImage image = DXImage.fromStream(inputStream)) {
    // Work with the document and image...
}

Get Started

For complete project setup, including all required dependencies and complete PDF, PowerPoint, and Barcode generation examples, please review the following: Get Started documentation.

Prerequisites

  • JDK 21 or later
  • Maven 3.9+ or Gradle 8.14+
  • IntelliJ IDEA, Eclipse, or VS Code with the Extension Pack for Java

Confirm your toolchain before you create a project. The following command displays the installed version of Java:

java -version

Add DevExpress Dependencies

Maven Central hosts all libraries under the com.devexpress group. Add each necessary dependency to your build file.

Maven

<dependencies>
    <dependency>
        <groupId>com.devexpress</groupId>
        <artifactId>devexpress-docs-pdf</artifactId>
        <version>26.2.1</version>
    </dependency>
    <dependency>
        <groupId>com.devexpress</groupId>
        <artifactId>devexpress-docs-presentation</artifactId>
        <version>26.2.1</version>
    </dependency>
    <dependency>
        <groupId>com.devexpress</groupId>
        <artifactId>devexpress-docs-barcode</artifactId>
        <version>26.2.1</version>
    </dependency>
</dependencies>

Gradle

dependencies {
    implementation("com.devexpress:devexpress-docs-pdf:26.2.1")
    implementation("com.devexpress:devexpress-docs-presentation:26.2.1")
    implementation("com.devexpress:devexpress-docs-barcode:26.2.1")
}

Add Native Dependencies

To resolve the platform-specific native libraries transitively, add the following native dependencies to your project:

  • Skija
  • LWJGL
  • LWJGL HarfBuzz

The following configuration targets Linux x64. For a platform-specific list of required artifacts, refer to our documentation.

Maven

<dependencies>
    <dependency>
        <groupId>com.devexpress</groupId>
        <artifactId>devexpress-docs-pdf</artifactId>
        <version>26.2.1</version>
    </dependency>
    <dependency>
        <groupId>io.github.humbleui</groupId>
        <artifactId>skija-linux-x64</artifactId>
        <version>0.119.6</version>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.lwjgl</groupId>
        <artifactId>lwjgl</artifactId>
        <version>3.4.2</version>
        <classifier>natives-linux</classifier>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.lwjgl</groupId>
        <artifactId>lwjgl-harfbuzz</artifactId>
        <version>3.4.2</version>
        <classifier>natives-linux</classifier>
        <scope>runtime</scope>
    </dependency>
</dependencies>

Gradle

dependencies {
    implementation 'com.devexpress:devexpress-docs-pdf:26.2.1'

    runtimeOnly 'io.github.humbleui:skija-linux-x64:0.119.6'
    runtimeOnly 'org.lwjgl:lwjgl:3.4.2:natives-linux'
    runtimeOnly 'org.lwjgl:lwjgl-harfbuzz:3.4.2:natives-linux'
}

Code Example — Generate Your First PDF

The following console application creates a Letter page, places a title and a paragraph, and writes the result to disk. It captures core PDF workflows: creates a PdfDocument, adds a page, adds text fragments, and saves the result.

import com.devexpress.docs.pdf.*;
import com.devexpress.drawing.*;
import com.devexpress.system.drawing.*;
import com.devexpress.drawing.printing.*;

import java.io.*;
import java.nio.file.*;
import java.nio.channels.*;

public class CreatePdfDocument {
    public static void main(String[] args) throws Exception {
        try (PdfDocument pdfDocument = new PdfDocument()) {

            // Add a Letter page to the document.
            Page page = pdfDocument.getPages().add(DXPaperKind.LETTER);

            // Add a title to the document.
            TextFragment textFragment = new TextFragment();
            textFragment.setText("Quarterly Sales Report");
            textFragment.setLocation(new PointF(50, 770));
            textFragment.setFont(new TextFont("DejaVu Sans", TextFontStyle.BOLD));
            textFragment.setFontSize(24);
            page.addFragment(textFragment);

            // Add a paragraph to the document.
            ParagraphFragment paragraphFragment = new ParagraphFragment();
            paragraphFragment.setText("This report summarizes sales data for Q1 2026.");
            paragraphFragment.setLocation(new PointF(50, 730));
            paragraphFragment.setWidth(200);
            paragraphFragment.setFont(new TextFont("DejaVu Sans"));
            paragraphFragment.setFontSize(12);
            page.addFragment(paragraphFragment);

            // Save the document to a PDF file.
            try (WritableByteChannel writableByteChannel =
                    FileChannel.open(Path.of("Result.pdf"),
                        StandardOpenOption.CREATE,
                        StandardOpenOption.WRITE,
                        StandardOpenOption.TRUNCATE_EXISTING)) {

                pdfDocument.save(writableByteChannel);
            }
        }
    }
}

The example saves the document to disk, but file I/O is optional. Each library reads and writes through java.io streams, NIO channels, or a byte[]. As a result, integration into web applications and services is straightforward:

try (PdfDocument document = new PdfDocument(request.getInputStream())) {
    // Edit the document...
    document.save(response.getOutputStream());
}

PDF Document API for Java

Our PDF Document API is the most extensive library in the CTP. It supports the entire PDF lifecycle. You can create documents from scratch, edit existing PDFs, secure and annotate files, work with interactive forms, and export pages to images. Everything runs in code. As a result, the library suits batch processing, report generation, and web services equally well.

Create Documents from Scratch

Create a PdfDocument, add pages, and populate them with content fragments — self-contained objects positioned with explicit coordinates. A page can contain:

  • Text with font and style formatting
  • Raster and vector images
  • Geometric shapes and paths
  • Embedded file attachments

For recurring layouts (such as invoices, certificates, or reports), create a reusable page template and apply it throughout the document.

One implementation detail is worth noting: PDF uses a coordinate system with its origin at the bottom-left corner of the page. PDF measures coordinates in points (72 points per inch), so larger Y values move content toward the top of the page.

Edit Existing PDFs

Load an existing PDF from a stream, channel, or byte array (optionally with a password) and modify contents. The API allows you to:

  • Merge multiple PDF documents into a single file or split a document across multiple files.
  • Search and replace text (configure search options).
  • Move or scale existing page content.
  • Read and edit bookmarks, form fields, attachments, annotations, comments, and the document structure tree.

Additional Capabilities

Beyond document creation and editing, the library includes APIs for:

  • Page management — insert, remove, duplicate, reorder, rotate, and resize pages.
  • Interactive forms (AcroForms) — create and edit form fields, organize and fill forms, and import or export form data.
  • Annotations — add text markup, links, drawings, file attachments, watermarks, and stamps.
  • Security — encrypt documents, apply user and owner passwords, and restrict printing, copying, or editing.
  • Accessibility & compliance — generate tagged accessible PDFs (both PDF/UA-1 and PDF/UA-2 compatible) and create ZUGFeRD-compliant invoices for electronic invoicing workflows.
  • Metadata & export — read and write document metadata and render PDF pages to images.

PowerPoint Presentation API for Java

Our PowerPoint Presentation API is a cross-platform library that creates, loads, modifies, saves, and exports presentations without an installed copy of PowerPoint. It reads and writes PPTX, PPTM, POTX, and POTM files.

The following example loads a presentation, adds a title slide, sets title text, and saves the file while preserving PowerPoint compatibility:

import com.devexpress.docs.presentation.*;

import java.nio.file.*;
import java.nio.channels.*;

public class UpdatePresentation {
    public static void main(String[] args) throws Exception {
        Path path = Path.of("presentation.pptx");
        try (Presentation presentation = new Presentation(Files.readAllBytes(path))) {

            Slide slide = new Slide(SlideLayoutType.TITLE);
            for (ShapeBase shapeBase : slide.getShapes()) {
                if (shapeBase instanceof Shape shape
                        && shape.getPlaceholderSettings().getType() == PlaceholderType.CENTERED_TITLE) {
                    shape.getTextArea().setText("DevExpress Presentation API for Java");
                }
            }
            presentation.getSlides().add(slide);

            try (WritableByteChannel channel = FileChannel.open(path,
                    StandardOpenOption.WRITE,
                    StandardOpenOption.TRUNCATE_EXISTING)) {
                presentation.saveDocument(channel);
            }
        }
    }
}

The presentation object model gives you programmatic access to the complete document tree:

  • Presentations — create, load from a stream or byte array, and merge multiple files into one.
  • Masters and layouts — apply predefined layouts or define your own for consistent slide structure.
  • Slides — add, reorder, duplicate, and remove slides.
  • Shapes and tables — add, remove, and modify presentation text boxes, images, geometric shapes, and tables with cell merge and split.
  • Themes and formatting — control colors, fonts, effects, sizes, and other appearance settings for all presentation elements.
  • Headers, footers, and notes — metadata, slide numbers, and presenter-only notes.
  • Export — render a presentation to PDF or export to per-slide images.

Barcode Generation API for Java

Our Barcode Generation API produces print-ready 1D and 2D barcodes. It supports common 1D symbologies (EAN, UPC, Code 128) and 2D symbologies (QR Code, DataMatrix, PDF417, Aztec), and exports to PNG, JPEG, SVG, or PDF.

The workflow is consistent across symbologies. Choose a barcode type, configure common settings (colors, DPI, module size), and then apply symbology-specific settings. Export to a stream or file as PNG, JPEG, SVG, or PDF. You can also call exportToImage() to generate a DXImage and embed the barcode directly into a PDF page or a slide. Fluent API builders configure everything with chained calls.

import com.devexpress.drawing.*;
import com.devexpress.docs.barcode.*;

import java.io.*;
import java.nio.file.*;

public class GenerateBarcode {
    public static void main(String[] args) throws Exception {

        byte[] logoBytes = Files.readAllBytes(Path.of("images/devexpress-logo.png"));
        try (DXImage logo = DXImage.fromStream(new ByteArrayInputStream(logoBytes))) {
            QRCodeOptions options = new QRCodeOptionsBuilder()
                .withCompactionMode(QRCodeCompactionMode.BYTE)
                .withVersion(QRCodeVersion.VERSION_10)
                .withErrorCorrectionLevel(QRCodeErrorCorrectionLevel.H)
                .withModuleSize(10)
                .withShowText(false)
                .withIncludeQuietZone(true)
                .withLogo(logo)
                .build();

            try (FileOutputStream pngStream = new FileOutputStream(
                    Path.of("qr-code.png").toFile());
                 BarcodeGenerator generator = new BarcodeGenerator(options)) {
                // Export the QR Code to a PNG image.
                generator.export("https://www.devexpress.com", pngStream, DXImageFormat.getPng());
            }
        }
    }
}

Evaluate the CTP

During the CTP period, all three DevExpress libraries are available on Maven Central. Add dependencies to a test project and evaluate our APIs against your app requirements.

The CTP also includes DevExpress technical support. Visit the product page and follow links to the CTP license registration form. Once registered, you can submit tickets through the DevExpress Support Center. Select Office & PDF File API for Java as the platform, then select the relevant product: Barcode Generation API, PDF Document API, or Presentation API.

Registration also gives you access to a ZIP package with all library JAR files through the DevExpress Download Manager. This option suits environments that use local dependencies instead of Maven Central.

To get started, add DevExpress packages to a new project, run the three examples above, and see whether the model fits your pipeline.

After our official commercial release, you can continue using the CTP version in existing projects at no cost. However, the CTP version will no longer be updated. To access official releases, annual updates, and technical support, you will have to upgrade to a commercial subscription (official release is set for 2027 - pricing has not been set). Should you have questions about the CTP, feel free to submit a support ticket via the DevExpress Support Center.

What's Next

Our Office & PDF File API for Java CTP is just the first step. We are working towards feature parity with our File API libraries for .NET.

More Document APIs

We expect to ship the following API libraries in future release cycles:

  • Word Document API: Create, edit, and export Word (DOCX) documents.
  • Spreadsheet API: Read, calculate, and write Excel (XLSX) workbooks.

Extended PDF and PowerPoint Support

  • PowerPoint Presentation API: Chart API is in active development. With the Chart API, you will be able to create and modify native PowerPoint charts, update chart data, and preserve chart editability in Microsoft PowerPoint without conversion to images.
  • PDF Document API: We plan to add digital signature support (for PDF signing and electronic signature workflows).

Our plans, priorities, and timelines can change. Your feedback during the CTP will help us define future development objectives. Follow our blog for roadmap updates and upcoming milestones.

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.