17.05.2014 Views

PDFlib Text Extraction Toolkit (TET) Manual

PDFlib Text Extraction Toolkit (TET) Manual

PDFlib Text Extraction Toolkit (TET) Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3.4 COM Binding<br />

Installing the <strong>TET</strong> COM edition. <strong>TET</strong> can be deployed in all environments that support<br />

COM components. Installing <strong>TET</strong> is an easy and straight-forward process. Please note<br />

the following:<br />

> If you install on an NTFS partition all <strong>TET</strong> users must have read permission for the<br />

installation directory, and execute permission for<br />

...\<strong>TET</strong> 3.0\bind\COM\bin\tet_com.dll.<br />

> The installer must have write permission for the system registry. Administrator or<br />

Power Users group privileges will usually be sufficient.<br />

Exception Handling. Exception handling for the <strong>TET</strong> COM component is done according<br />

to COM conventions: when a <strong>TET</strong> exception occurs, a COM exception will be raised<br />

and furnished with a clear-text description of the error. In addition the memory allocated<br />

by the <strong>TET</strong> object is released. The COM exception can be caught and handled in the<br />

<strong>TET</strong> client in whichever way the client environment supports for handling COM errors.<br />

Using the <strong>TET</strong> COM Edition with .NET. As an alternative to the <strong>TET</strong>.NET edition (see<br />

Section 3.6, ».NET Binding«, page 27) the COM edition of <strong>TET</strong> can also be used with .NET.<br />

First, you must create a .NET assembly from the <strong>TET</strong> COM edition using the tlbimp.exe<br />

utility:<br />

tlbimp tet_com.dll /namespace:tet_com /out:Interop.tet_com.dll<br />

You can use this assembly within your .NET application. If you add a reference to tet_<br />

com.dll from within Visual Studio .NET an assembly will be created automatically. The<br />

following code fragment shows how to use the <strong>TET</strong> COM edition with C#:<br />

using <strong>TET</strong>_com;<br />

...<br />

static <strong>TET</strong>_com.I<strong>TET</strong> tet;<br />

...<br />

tet = New <strong>TET</strong>();<br />

...<br />

All other code works as with the .NET edition of <strong>TET</strong>.<br />

3.4 COM Binding 25

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!