22.03.2015 Views

DLI Implementation and Reference Guide - Datalogics

DLI Implementation and Reference Guide - Datalogics

DLI Implementation and Reference Guide - Datalogics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Multibyte Text Work 5.7<br />

Working With DLPDFTEXT Areas<br />

Once created, a DLPDFTEXT area may not be altered. Users may wish to create a new<br />

DLPDFTEXT area containing a portion of the text in a previously created DLPDFTEXT<br />

area to fit text lines to document boundaries, or to accomplish other tasks. Users may<br />

obtain the text from a DLPDFTEXT area <strong>and</strong> use this as the basis for a new<br />

DLPDFTEXT area, using the dlpdftextstring <strong>and</strong> dlpdftextlength calls:<br />

dlpdftextstring<br />

void *dlpdftextstring(DLPDFTEXT *)<br />

This call returns the text contained in a DLPDFTEXT area, in UTF-16 format. This<br />

text is in host-endian format (little-endian for Win32 <strong>and</strong> Intel/Linux platforms, bigendian<br />

elsewhere) <strong>and</strong> does not include a Unicode byte-order marker. An exception<br />

will be raised if an invalid DLPDFTEXT area is supplied.<br />

dlpdftextlength<br />

ASUns32 dlpdftextlength(DLPDFTEXT *)<br />

This call returns the length of the text in a DLPDFTEXT area, in bytes. The buffer<br />

returned by the dlpdftextstring call will be this length. With the buffer <strong>and</strong> the<br />

length returned by these two calls, a user may make a new DLPDFTEXT area with a<br />

subset of the returned text, using the dlpdftext call <strong>and</strong> the appropriate Unicode<br />

encoding ASAtom.

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

Saved successfully!

Ooh no, something went wrong!