Aspose Document Conversion

Aspose Document Conversion

One of the things we do at IBV is handling a lot of documents. These documents can be in a lot of shapes and forms: we handle Microsoft Office Word documents, Powerpoint presentations, PDF documents and so on.

Those documents form the core of our work. We use them in many different ways and on many different platforms. We generate them and we show them. We even need to make thumbnails to show our users a preview.

We investigated building that functionality on our own but found out that doing so on both client systems and in the cloud would require a lot of Microsoft Office proprietary assemblies to be used there. Obviously, this was not going to work. Next to that, we didn’t really think installing Office client applications in our cloud solution would be feasible.

Aspose components saved the day. With the solution Aspose provided, we could simply use the tools we have and know to incorporate the components we need into our solutions.

Using the components turned out to be much easier than we might have hoped for. Generating thumbnails out of a given Microsoft Word document, for instance, could be done in less than a dozen lines of code. The same goes for the Excel, Powerpoint and PDF documents: they are equally simple to extract thumbnails out of.

Of course, there are some drawbacks. For instance, the way each document type generates thumbnails requires a slightly different approach. For instance, for the Word Documents you can use the following code to generate the thumbnail:

var saveOptions = new ImageSaveOptions(SaveFormat.Png)

    {PageCount = 1, PageIndex = pageIndex, Resolution = 300.0f};

var imageSaveStream = new MemoryStream();

doc.Save(imageSaveStream, saveOptions);

This is pretty simple code.

However, if you want to do the same with a Powerpoint document, there are some more hoops you have to jump through.

First, you need to get each individual slide. Then you need to create an image in memory and call the RenderToGraphics method per slide to save the information to that image. After that, you can store the image in a file or memorystream.

The way to do this is slightly different for each file type, but the documentation is substantial enough to figure out how this all works.

The great part is , that all the Nuget packages are cross platform and adhere to the NETSTANDARD standards so you can use them in any environment you choose.

If you have a need for document handling or conversion in your .net based app, no matter if they run on a local device or in the cloud, we can warmly recommend using the Aspose tools to do this. They just work.