Word Cleaner .NET API Library Help

Install instructions

The API version will work on any Windows Desktop (with .NET 2.0 Sp2 framework installed) or Server and Linux (with the Mono framework installed).

To install Word Cleaner all you need to do is unzip the files and copy them into a folder of your choosing. Then add a reference to WCApi.dll in your project.

We have our own built in converter so MS Word does not need to be installed on the system. If you prefer to use the MS Word engine you can do by selecting this option in the template editor but we advise testing our internal converter first as it should cover most needs.


Word Cleaner should work fine on most versions of Windows operating systems. The one thing that needs to be installed is the .NET Framework version 2 SP2 or version 3.5. Windows 7 will have it installed by default (it might be listed as .net 3.5 but this will work), on Windows 8+ it has to be enabled in Windows Features. For older systems you can download it for free from the Microsoft Website.

On Linux you have to install the Mono framework. For instance, on Ubuntu to install Mono please run following commands:
sudo apt-get update
sudo apt-get install mono-complete

Limitations of the trial

  • We add a trial message to the top and bottom of the html file
  • We only convert 75% of a file
  • Images are watermarked with “Word Cleaner”

These limitations are lifted once you purchase a copy of Word Cleaner API.

How does it work?

The API version of Word Cleaner uses the same template files as the desktop version; therefore what you need to do is use the desktop version of Word Cleaner to prepare your template and do any testing.

We give you one free copy of the Word Cleaner Desktop Business version with every API license sold.

On your desktop test the various templates that ship with Word Cleaner or create your own to suit your needs. Please refer to the help file that comes with the desktop version of Word Cleaner for specific instructions.

Once you have your template all you need to do is copy the template file into the template folder on the server.

How to use

Add WCApi.dll as a reference to you project:


This method activates internals of Word Cleaner API conversion engine and it has to be called at least one time on application start (in Global.asax.cs startup code for ASP .NET web apps for instance), before first conversion code is run. Please note if you deploy your solution to a cloud with many instances this method have to be executed before each conversion is done.

WordCleanerApi.WordCleaner wc = new WordCleanerApi.WordCleaner(“serial”, “email”, “code”);

wc.LogToFile = true; //optionally log all messages to a log-file.txt

bool converted = wc.ProcessDocumentWithTemplate(“input.docx”,“output.html”, “Convert to HTML.wc”);

if (!converted)


   string errors = “”;

   foreach (string error in wc.Errors) errors += error + “; “;

   Console.WriteLine(“Not converted – “ + errors);


WordCleanerApi.WordCleaner.GenerateActivationFile(“c:\Temp”); // method that will generate activation license file under c:\Temp folder

Please note that if you got a web solution (IIS web app) you have to run this method on your fully configured production server. Activation license will be tied to domain of web app in this situation, otherwise license is tied to hardware of your machine (desktop apps). You don’t have to get activation API code for development/test

Sample application

Please download sample application for Visual Studio 2010/2013 with C# source code to see how easy it is to use Word Cleaner API: http://wordcleaner.com/custom/WordCleaner7APITestApp.zip

How to get an Word Cleaner API code?

In order to fully activate the WC API version, you have to set 3 parameters:  an API serial (1), serial email (2) and API code (3) that is generated for a given deployment machine or domain if WC API is being used in a web solution under IIS web server. Once you buy the Word Cleaner API you will get a serial code (1) for an email (2) you specify during purchase. In order to get the API code (3) you have to generate an activation license file called serverlicense.dat by executing a method from the API called WordCleanerApi.WordCleaner.GenerateActivationFile(“folderName”); on your deployment machine. Once you have the serverlicense.dat file you then go to http://activate.wordcleaner.com/ to get your API code. Please enter your name, email (2) and serial (1), select WC7 API version, select serverlicense.dat file as License File and click Submit.

If all goes OK, you will see the API code that is generated for your deployment machine. Please copy the code and paste it into the code parameter of the Word Cleaner object constructor.

Please note that you don’t have to generate WC API code to develop or test it. By default, API works in trial mode with limitations mentioned earlier. This should be enough to test your solution on a development or test machine.

Need help?

We welcome any feedback or suggestions you have about the Word Cleaner program. We will keep the program up to date with new releases, so do let us know your ideas for future versions. We actively respond to customer feedback, bugs are fixed within a few days of users informing us about them and if we like your feature suggestions then we usually implement these within a few weeks. Please send all comments to: info@wordcleaner.com

Thank you

We really appreciate the time you have taken to try our software. We really hope you like it.

© Freshideas.ie Ltd