Office File API – .NET Core (Beta, v19.1)

We’re happy to announce the immediate availability of the DevExpress Office File API library for .NET Core (Beta 1).

With our Office File API for .NET Core, you can create web, console and desktop applications that run across multiple platforms (Windows, Mac, and Linux). Create, load, edit and export rich-text documents and spreadsheets, generate and modify PDF files, and convert different units of measurement for all projects that target .NET Standard 2.0+ / .NET Core 2.1+ platforms.

Primary Features

The DevExpress Office File API for .NET Core allows you to address multiple document-processing requirements:

  • Convert documents to various file formats (Word, Excel, PDF, and HTML). Convert PDF documents to multi-page TIFF.
  • Use mail merge to automatically generate a batch of documents (workbooks or text documents) based on a single document template.
  • Merge documents, workbooks or PDF files into a single file. Split a document or extract its content into multiple files.
  • Protect workbooks, text documents and PDF files. Encrypt your documents with a password and lock-down PDF files by using a digital signature.

Please review our online demo to learn more about common usage scenarios or check out documentation for a complete feature list and additional information.

Try It Now

Visit nuget.devexpress.com to obtain DevExpress NuGet feed URL and install the Office File API packages.

The DevExpress.Document.Processor package includes all Office File API products. Register your DevExpress NuGet feed as a package source and install this package from the Visual Studio's NuGet Package Manager.

If you already have our Office File API components installed on your machine, you can obtain this package from the DevExpress Local package source in the NuGet Package Manager.

Important Note: To use this package in production code, you will need an active license for the DevExpress Office File API Subscription or the DevExpress Universal Subscription.

If you own a license to any other DevExpress subscription, you can install one of the following DevExpress packages to process rich-text documents and generate spreadsheets within your .NET Core application:

These packages are not available in the NuGet Package Manager dialog, but you can install them from the Package Manager console, dotnet CLI, or NuGet CLI.

We have prepared simple examples that demonstrate how to use our Office File API components in your .NET Core application.

Word Processing Document API

Convert a DOCX document to PDF:

using DevExpress.XtraRichEdit;
// ...
RichEditDocumentServer documentProcessor = new RichEditDocumentServer();
// Load a document from a file.
documentProcessor.LoadDocument("Document.docx", DocumentFormat.OpenXml);
// Export the document to PDF.
documentProcessor.ExportToPdf("PdfDocument.pdf");

Spreadsheet Document API

Convert a spreadsheet document to PDF:

using DevExpress.Spreadsheet;
// ...
Workbook workbook = new Workbook();
// Load a document from a file.
workbook.LoadDocument("Document.xlsx", DocumentFormat.Xlsx);
// Export the document to PDF.
workbook.ExportToPdf("PdfDocument.pdf");

PDF Document API

Merge two PDF files into a single document:

using DevExpress.Pdf;
// ...
using (PdfDocumentProcessor pdfProcessor = new PdfDocumentProcessor())
{
   // Create an empty document. 
   pdfProcessor.CreateEmptyDocument("Result.pdf");
   // Append the first PDF file to the created document.
   pdfProcessor.AppendDocument("Document1.pdf");
   // Append the second PDF file to the created document.
   pdfProcessor.AppendDocument("Document2.pdf");
}

Limitations

The following features are currently unavailable (these features are available in our Office File API version for .NET Framework):

  • Ability to print PDF files or export PDF content to an image (Linux and macOS).
  • All PDF features related to DirectX rendering (all operating systems):
    • Stroke and Clip rendering modes
    • Advanced transparency and blend modes
    • CJK fonts support
  • Embedded font support for PDF export (Linux and macOS).

What Do You Think?

As always, we are interested in your feedback. Please feel free to leave comments below or open Support Center ticket. In addition, we would appreciate your responses to this quick survey:

4 comment(s)
Jeff Stiegler
Jeff Stiegler

Your examples seem to be for ASP.Net which we do not use.  Do you have some for C# or VB.net.

19 June, 2019
Ben_Hayat
Ben_Hayat

Hi Team;

Is this the *"Office File API Complete"* which is only available as part of the "Universal" Plan?

www.devexpress.com/.../net

Thanks!

..Ben

19 June, 2019
Damon (DevExpress)
Damon (DevExpress)

@Jeff: You can use the same code on any platform, not only for ASP.NET. Note that you can also find the WinForms version of the Office File API demo for .NET Framework in our installation.

@Ben_Hayat: The 'Office File API (Complete)' library can be also purchased as a separate Office File API subscription. Please refer to the DevExpress Subscription page for pricing information.

20 June, 2019
Ben_Hayat
Ben_Hayat

Thank you Damon;

I had missed that offering. Glad I asked. :-)

..Ben

20 June, 2019

Please login or register to post comments.