Target Platform/Framework: Desktop, Web, Mobile DevExpress Product Libraries Used: .NET Office File API (https://www.devexpress.com/officefileapi) Available in the following DevExpress Subscription(s): Universal, Office File API
$ dotnet add package DevExpress.Document.ProcessorDocumentation | Demo | What's New | Blog | Support & Feedback
This cross-platform .NET library allow you to generate and manage documents and barcodes in code:
DevExpress Document Processing APIs are compatible with the following operating systems and platforms:
The DevExpress Word Processing Document API allows you to manage rich text documents:
Get Started with DevExpress Word Processing Document API
//Load a Word file, add text watermark, and export to PDF
using var wordProcessor = new RichEditDocumentServer();
wordProcessor.LoadDocument("wordFile.docx");
wordProcessor.Document.WatermarkManager.SetText("CONFIDENTIAL");
MemoryStream pdfStream = new MemoryStream();
wordProcessor.ExportToPdf(pdfStream);
The DevExpress PDF Document API allows you to manage PDF documents in code:
//Load a PDF file, encrypt it, and specify access permissions
using var pdfProcessor = new PdfDocumentProcessor();
pdfProcessor.LoadDocument("pdfDocument.pdf");
PdfEncryptionOptions encryptionOptions = new PdfEncryptionOptions();
encryptionOptions.DataExtractionPermissions = PdfDocumentDataExtractionPermissions.NotAllowed;
encryptionOptions.OwnerPasswordString = "OwnerPassword";
encryptionOptions.UserPasswordString = "UserPassword";
encryptionOptions.Algorithm = PdfEncryptionAlgorithm.AES256;
MemoryStream pdfEncryptedStream = new MemoryStream();
pdfProcessor.SaveDocument(pdfEncryptedStream, new PdfSaveOptions() { EncryptionOptions = encryptionOptions });
The DevExpress Spreadsheet Document API allows you to manage Excel files in code:
//Load an Excel workbook, calculate formulas, and export to PDF
using var workbook = new Workbook();
workbook.LoadDocument("spreadsheetFile.xlsx");
workbook.Calculate();
MemoryStream pdfStream = new MemoryStream();
workbook.ExportToPdf(pdfStream);
The DevExpress Barcode Generation API allows you to generate barcodes:
dotnet add package DevExpress.Document.Processor
//Load a Word file and export to PDF
using var wordProcessor = new RichEditDocumentServer();
wordProcessor.LoadDocument("wordFile.docx");
MemoryStream docStream1 = new MemoryStream();
wordProcessor.ExportToPdf(docStream1);
docStream1.Position = 0;
//Load an Excel workbook and export to PDF
using var workbook = new Workbook();
workbook.LoadDocument("spreadsheetFile.xlsx");
MemoryStream docStream2 = new MemoryStream();
workbook.ExportToPdf(docStream2);
docStream2.Position = 0;
//Merge two PDF documents into a single file
using var pdfProcessor = new PdfDocumentProcessor();
pdfProcessor.CreateEmptyDocument();
pdfProcessor.AppendDocument(docStream1);
pdfProcessor.AppendDocument(docStream2);
MemoryStream mergedPdfStream = new MemoryStream();
pdfProcessor.SaveDocument(mergedPdfStream);
mergedPdfStream.Position = 0;
DevExpress Document Processing APIs are included in the following DevExpress subscriptions:
Free 30-day evaluation period is available.
DevExpres.Docs.Presentation - DevExpress Document Processing APIs for PowerPoint presentations.
dotnet add package DevExpress.Docs.Presentation
DevExpress.AIIntegration.Docs - AI-powered Extensions for DevExpress Document Processing APIs.
dotnet add package DevExpress.AIIntegration.Docs