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.6 .NET Binding<br />

Note Detailed information about the various flavors and options for using <strong>TET</strong> with the .NET Framework<br />

can be found in the <strong>PDFlib</strong>-in-.NET-HowTo.pdf document which is contained in the distribution<br />

packages and also available on the <strong>PDFlib</strong> Web site.<br />

The .NET edition of <strong>TET</strong> supports all relevant .NET concepts. In technical terms, the<br />

<strong>TET</strong>.NET edition is a C++ class (with a managed wrapper for the unmanaged <strong>TET</strong> core library)<br />

which runs under control of the .NET framework. It is packaged as a static assembly<br />

with a strong name. The <strong>TET</strong> assembly (<strong>TET</strong>_dotnet.dll) contains the actual library<br />

plus meta information.<br />

Installing the <strong>TET</strong> Edition for .NET. Install <strong>TET</strong> with the supplied Windows MSI Installer.<br />

The <strong>TET</strong>.NET MSI installer will install the <strong>TET</strong> assembly plus auxiliary data files, documentation<br />

and samples on the machine interactively. The installer will also register <strong>TET</strong><br />

so that it can easily be referenced on the .NET tab in the Add Reference dialog box of Visual<br />

Studio .NET.<br />

Error handling. <strong>TET</strong>.NET supports .NET exceptions, and will throw an exception with a<br />

detailed error message when a runtime problem occurs. The client is responsible for<br />

catching such an exception and properly reacting on it. Otherwise the .NET framework<br />

will catch the exception and usually terminate the application.<br />

In order to convey exception-related information <strong>TET</strong> defines its own exception<br />

class <strong>TET</strong>_dotnet.<strong>TET</strong>Exception with the members get_errnum, get_errmsg, and get_apiname.<br />

Using <strong>TET</strong> with C++ and CLI. .NET applications written in C++ (based on the Common<br />

Language Infrastructure CLI) can directly access the <strong>TET</strong>.NET DLL without using the <strong>TET</strong><br />

C++ binding. The source code must reference <strong>TET</strong> as follows:<br />

using namespace <strong>TET</strong>_dotnet;<br />

3.6 .NET Binding 31

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

Saved successfully!

Ooh no, something went wrong!