BCL easyConverter SDK
easyConverter SDK Usermanual
PDF-to-Word Programming API  |  Download Free Trial  |  Contact Us to Purchase

Using the Loader Service

The Loader Service is available from all APIs, including COM, .NET and Java. However, the usage is completely different depending on the programming environment.

Loader is only necessary for server-side Microsoft Word automation. The majority of customers will not have to use Loader, because easyConverter can produce DOC and DOCX files without Word automation most of the time.

Note that the Loader Service is not working properly unless it is configured first. Please read easyConverter SDK Loader Setup for more information.

Loader is not working properly unless a desktop user is assigned to the service, and it is constantly running!

The Loader Service also requires the purchase of a special server license. Without this license server-side Word automation is impossible.

COM Objects

If you are using the COM objects, the Loader Service is accessible via the Loader object. This is also true for the .NET COM Interop, as well as the Java COM Bridge.

VBScript Example:

Set oLoader = Server.CreateObject("EasyConverter.Loader.5")
Set oPDF2Word = oLoader.LoadObject("EasyConverter.PDF2Word.5")
oPDF2Word.ConvertToWord InputFileName, OutputFileName

C# COM Interop Example:

Loader loader = new Loader();
PDF2Word pdf2word = (PDF2Word)loader.LoadObject("EasyConverter.PDF2Word.5");
pdf2word.ConvertToWord(inputFileName, outputFileName);

Error Codes for COM: ldrResult Enumeration

LDR_R_UNKNOWN = 0x8004FFFF

Unknown error

LDR_R_INTERNAL = 0x80050000

Internal error

LDR_R_INVALID_PARAM = 0x80050001

Invalid parameter(s)

LDR_R_SETUP_INVALID = 0x80050002

This product is not setup correctly

LDR_R_LICENSE_INVALID = 0x80050003

Invalid license key

LDR_R_LICENSE_EXPIRED = 0x80050004

License key expired

LDR_R_OUT_OF_MEMORY = 0x80050005

Not enough memory to continue

LDR_R_FEATURE_NOT_ENABLED = 0x80050006

The Loader feature is not enabled with the supplied license key

LDR_R_SUCCESS = 0

Success

Native .NET API

By default, Loader is not used. In order to use Loader, you must explicitly request it. This needs to be done as first thing, immediately after the PDF2Word object is created:

using(PDF2Word pdf2word = new PDF2Word())
{
   pdf2word.LoaderSettings.UseLoader = true; // use Loader
   pdf2word.ConvertToWord(inputFileName, outputFileName);
}

If you do anything at all with the PDF2Word object, changing LoaderSettings has no effect whatsoever anymore. That also means you can't change LoaderSettings in the middle. LoaderSettings should be treated as if it were part of the constructor.

If Loader is requested and it is not running, PDF2Word will fail with an exception.

Native Java API

By default, Loader is not used. In order to use Loader, you must explicitly request it. This needs to be done as first thing, immediately after the PDF2Word object is created:

PDF2Word pdf2word = new PDF2Word();
pdf2word.useLoader = false; // use Loader
try
{
   pdf2word.ConvertToWord("c:\\test\\input.pdf", "c:\\test\\output.docx");
}
catch(PDF2WordException e)
{
   System.out.println(e);
}
finally
{
   pdf2word.dispose();
}

If you do anything at all with the PDF2Word object, changing useLoader has no effect whatsoever anymore. That also means you can't change useLoader in the middle. useLoader should be treated as if it were part of the constructor.

If Loader is requested but not running, PDF2Word will fail with an exception.