Logo

dev-resources.site

for different kinds of informations.

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

Published at
11/13/2023
Categories
devexpress
webapi
documentprocessing
officefileapi
Author
guemja_lee
Author
10 person written this
guemja_lee
open
Create a Web API Application with our Office File API (Powered by the platform-agnostic DevExpress.Drawing Graphics Engine)

In our summer v23.1 major release, our new DevExpress Drawing graphics library was released to manufacturing (RTM).
This new engine is available for the following DevExpress products:

  1. Office File API
  2. Reporting
  3. BI Dashboard

I am starting a new blog post series where I’ll describe how to use our cross-platform engine and maximize its full potential. In this particular blog post, I'll show you how to integrate Office File API functionality in Web API applications. But first, let me give a brief explanation of what the DevExpress.Drawing library is.

DevExpress.Drawing Library: Backstory

Microsoft attributed System.Drawing.Common as a Windows-specific library in .NET 6 and higher: System.Drawing.Common only supported on Windows. This breaking change affected the DevExpress cross-platform products - components that use System.Drawing.Common as a rendering/text measurement engine - including Reporting, Office File API and BI Dashboards.

To address issues with the System.Drawing.Common package, we introduced a new DevExpress.Drawing assembly in our v22.1 release cycle. This assembly contains custom implementations of all System.Drawing classes not supported for non-Windows systems. We made a series of enhancements during the 22.1 and 23.1 release cycles, and the library reached its final state in v23.1.

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.

Our new approach allows our cross-platform products to work as expected across all supported platforms/target frameworks. And this change has opened up numerous opportunities in other areas.

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 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, I 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)

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

web api main view

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.

web api conversion

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

web api result

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.

web api merge

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 the basic implementation of conversion, split, and merge operations. You can download and modify the project based on specific requirements. Refer to the following articles for additional information in this regard:

documentprocessing Article's
21 articles in total
Favicon
Introducing the Syncfusion® Document Viewer Extension for Visual Studio Code
Favicon
What’s New in Document Processing Libraries: 2024 Volume 4
Favicon
Easily Convert Excel to HTML in 3 Steps With C#
Favicon
How to Effectively Use Formulas in Excel Using C#
Favicon
Easily Create Dynamic Charts in Excel Using C#
Favicon
6 Effective Ways to Merge PDF Files Using C#
Favicon
Top Intelligent Document Processing Software for 2024
Favicon
What’s New in Document Processing Libraries: 2024 Volume 3
Favicon
AI-driven OCR Revolutionizes Intelligent Layout Analysis with 24+ Labels
Favicon
Syncfusion Essential Studio 2024 Volume 3 Is Here!
Favicon
3 Easy Steps to Add Watermarks to Your Excel Document Using C#
Favicon
4 Simple Ways to Split Word Documents Using C#
Favicon
How to Integrate Intelligent Document Processing into Your Business Workflow?
Favicon
What’s New in 2024 Volume 2: Document Processing Libraries
Favicon
Syncfusion Essential Studio 2024 Volume 2 Is Here!
Favicon
How BoldSign Improved HR Operations at Syncfusion
Favicon
Easily Create an Excel Pivot Table in Just 3 Steps Using C#
Favicon
Create a Web API Application with our Office File API (Powered by the platform-agnostic DevExpress.Drawing Graphics Engine)
Favicon
From pixels to information with Document AI
Favicon
Automate identity document processing with Document AI
Favicon
Scalable Processing of Swiss PDF Documents using 2D Barcodes on AWS

Featured ones: