Create a Web API Application with our Office File API (Powered by the platform-agnostic DevExpress.Drawing Graphics Engine)

Office-Inspired Products
23 October 2023

As you may already know, the DevExpress.Drawing cross-platform drawing engine was officially released in our v23.1 dev cycle. This new engine is available for the following DevExpress products:

Our DevExpress.Drawing graphics library allowed us to enhance cross-platform capabilities and extend the number of supported platforms/operating systems for the aforementioned products. DevExpress.Drawing is gdiplus-independent and works on DevExpress primitives. This means that you can use supported components within applications that target different operating systems (Linux, macOS) and cloud services (Azure, AWS). Our internal test results demonstrate that the new engine works with the same efficiency as our previous GDI+ engine.

We are starting a new blog post series where we’ll describe how to use our cross-platform engine and maximize its full potential. In this particular blog post, we'll show you how to integrate Office File API functionality in Web API applications.

Organize and Convert Files in a Web API Application

Web API (Application Programming Interface) offers numerous benefits. Web API is platform-agnostic, which means it can be used across various devices and operating systems.

Our Office File API suite allows you to organize Word, Excel, and PDF documents. Each library in the suite ships with a comprehensive set of features, such as PDF/HTML conversion, mail merge, digital signature support, etc.

You can now integrate our DevExpress Office File API into a Web API app and then consume available endpoints from frontend apps built using any programming language. This increases reach and allows you to introduce Excel, Word, and PDF-related document management functionality across platforms.

To help illustrate what's possible, we created an Office File API in Web API apps sample solution. Please refer to the following link for more information: Office File API - Use DevExpress Office File API Libraries (at the backend) for your Web-API Applications

Important Note: You need to purchase a license to use the DevExpress Office File API in production code (either the DevExpress Office File API Subscription or DevExpress Universal Subscription)

Our example uses Swagger UI, but you can change the client-side implementation to suit your specific requirements.

The project contains a set of endpoints for the popular tasks you can address when using the DevExpress Office File API. These pre-built functions and services accelerate the development process so you can focus on the unique aspects of your application rather than building everything from scratch.

Let’s take a look at document conversion and organization (merge and split documents) as an example.

Convert Documents

We prepared conversion endpoints to Word and Excel files. The web request allows you to load a file (file format is detected automatically). The drop-down menu displays available conversion formats.

You can download the result (after successful conversion) in the Response section.

Merge and Split Files

The merge and split endpoints are available for Word, Excel, and PDF files. Load files to merge and select the format of the resulting file. Download the result in the Response section.

As for splitting, the web request splits the loaded file page-by-page and exports results to a zip file with documents in the selected format.

The endpoints described herein illustrate basic implementation of conversion, split, and merge operations. You can download and modify the project based on specific business requirements. Refer to the following articles for additional information in this regard:

As always, your feedback is highly appreciated. Please take a moment to respond to the following survey and tell us what you'd like us to document next.

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.