Getting Started with ImageGear Office
Before using the ASP.NET samples, a path to the Office components must be added to the registry. See
Samples for details.
Office Samples and Tutorials
Our suite of Office samples will help you get started using ImageGear’s Office capabilities.
This section also provides a step-by-step Office tutorial, which shows you how to create a new ImageGear project using the Office component:
ImageGear.Formats.Office Namespace
The ImageGear.Formats.Office namespace provides support for PowerPoint, Excel, and Word formats. This allows you to load and display Microsoft Word, Excel, and PowerPoint documents. It also allows you to extract text from Word and PowerPoint documents.
To enable the ImageGear.Formats.Office Namespace in your project, specify the following directive:
C# Example |
Copy Code |
using ImageGear.Formats.Office; |
Converting Office Files to PDF
It is easy to convert all types of Office documents that we support to PDF. See code examples in Microsoft Office Documents to PDF.
Office Dependencies
NuGet packages make it easy to add, remove, and update libraries and tools in Visual Studio projects that use the .NET Framework. See NuGet Packages for more information.
Working with Office Files
When loading extremely complex or large documents, the user interface can occasionally freeze. In order to avoid this, since all calls are thread safe, you can simply load the document in another thread.
When working with ImGearDocument, ImGearExcelBookDocument, ImGearExcelSheetDocument, ImGearPowerPointDocument, or ImGearWordDocument objects, it is necessary to dispose of them after they are no longer being used.
ImageGear .NET does not currently support password-protected Office documents (.doc, .docx, .xls, .xlsx, .ppt, and pptx). If you attempt to load a password-protected Office document, System.NotSupportedException is thrown.
The best way is simply to use a using statement, like this:
Otherwise, you can simply call the object’s Dispose method.
The LibreOffice Instance Manager
If you want to adjust the number of LibreOffice processes ImageGear uses to work with Office documents, you can tweak the settings exposed by the LibreOffice Instance Manager. See LibreOffice Instance Manager (LIM) for more information.