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.

HKLM\SOFTWARE\<strong>PDFlib</strong>\<strong>TET</strong>4\4.2\resourcefile<br />

The value of this key (which will be created with the value /tet.upr by the<br />

<strong>TET</strong> installer, but can also be created by other means) will be taken as the name of the<br />

resource file to be used. If this file cannot be read an exception will be thrown.<br />

> The client can force <strong>TET</strong> to read a resource file at runtime by explicitly setting the<br />

resourcefile option:<br />

set_option("resourcefile=/path/to/tet.upr");<br />

This call can be repeated arbitrarily often; the resource entries will be accumulated.<br />

Configuring resources at runtime. In addition to using a UPR file for the configuration,<br />

it is also possible to directly configure individual resources at runtime via <strong>TET</strong>_set_<br />

option( ). This function takes a resource category name and pairs of corresponding resource<br />

names and values as it would appear in the respective section of this category in<br />

a UPR resource file, for example:<br />

set_option("glyphlist={myglyphnames=/usr/local/glyphnames.gl}");<br />

Multiple resource names can be configured in a single option list for a resource category<br />

option (but the same resource category option cannot be repeated in a single call to <strong>TET</strong>_<br />

set_option( )). Alternatively, multiple calls can be used to accumulate resource settings.<br />

Escape sequences for text files. Escape sequences are supported in all text files except<br />

UPR files and CMap files. Special character sequences can be used to include unprintable<br />

characters in text files. All sequences start with a backslash ’\’ character:<br />

> \x introduces a sequence of two hexadecimal digits (0-9, A-F, a-f), e.g. \x0D<br />

> \nnn denotes a sequence of three octal digits (0-7), e.g. \015. The sequence \000 will be<br />

ignored.<br />

> The sequence \\ denotes a single backslash.<br />

> A backslash at the end of a line will cancel the end-of-line character.<br />

64 Chapter 5: Configuration

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

Saved successfully!

Ooh no, something went wrong!