What is WordGlue .NET?

Convert MS Word documents into formats like XPS and PDF

WordGlue .NET

WordGlue is a generic layout engine which supports DOC and DOCX conversion and rendering for converting Office formats.

  • 100% managed, 100% thread safe and 100% independent of applications like MS Word and OpenOffice.org.
  • Designed to convert semantic formats like DOC and DOCX documents to XPS, PDF (using ABCpdf) and also to raster formats like PNG and JPEG.
  • The DOC and DOCX rendering engine is general purpose so it can be easily extended to support other formats like SVG, VML and HTML.
  • In the future we expect that it will also extend to support the import of other semantic formats like HTML. If you have a particular document format you are interested in please do contact us with your requests.

What's wrong with Microsoft Office and OpenOffice.org?


Office applications are designed for interactive use which tends to mean single process, single thread models. Automated systems need to take advantage of multiple threads and multiple processes. This is just not possible using MS Office or OpenOffice.org because they were never designed for it. The result is a system that does not scale in a simple and predictable way.

Secure Processing

Automated conversions often run from reduced permission accounts like those associated with ASP.NET. However applications like MS Office and OpenOffice.org are designed to run from user level accounts. As such setting up the permissions for them to work in these environments can be extremely difficult and time consuming. The final result is often a compromise between practicality and security.

Also on the security side, Office applications are frequent targets for viruses, trojans and other malware. A security problem on a client machine is easily contained and has limited impact. However a security problem on a server is potentially much more serious and difficult to contain. For this reason it is important that code that interacts with DOC and DOCX formats is contained in a secure environment using trusted code designed to cope with potential security issues.

Why Compromise?

Products like ABCpdf do amazing things to work with helper applications like MS Office and OpenOffice.org and allow them to convert to formats like PDF. However whenever you involve an external application there is always an element of compromise involved.

WordGlue .NET is our 100% compromise free solution to this problem.

So how does it work?

We designed this from the ground up as a new DOC and DOCX rendering engine. Our aims were

  • 100% Managed AnyCPU
  • Fast and light on memory
  • Small, self-contained and easy to deploy
  • Multi-threaded and thread-safe for scalability
  • Output to vector formats like XPS and PDF
  • Output to raster formats like PNG and JPG
  • Easily extensible to other formats like SVG, HTML, VML etc

WordGlue comes with a viewer application for opening, viewing and converting documents. So it's easy for you to test. Just open your test documents, see what they look like, save them in an appropriate format.

The code for the viewing application comes included with WordGlue and is extremely compact. So once you're happy with the basic functionality it's simple to create your own conversions. In fact so simple it's trivial.

How trivial?

First we create a document object. We read in the existing file and then we save as XPS.

using(Doc doc = new Doc("test.docx"))

That's all there is to it! How much simpler could you get?

Of course there is more code you can add in - features designed to make the whole process more flexible. However ultimately this is the basis of the whole process.