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.

10.7 Image Retrieval Functions<br />

C++ const <strong>TET</strong>_image_info *get_image_info(int page)<br />

C# Java int get_image_info(int page)<br />

Perl PHP object <strong>TET</strong>_image_info <strong>TET</strong>_get_image_info(resource tet, long page)<br />

VB Function get_image_info(int page) As Long<br />

C const <strong>TET</strong>_image_info *<strong>TET</strong>_get_image_info(<strong>TET</strong> *tet, int page)<br />

Retrieve information about the next image on the page (but not the actual pixel data).<br />

page A valid page handle obtained with <strong>TET</strong>_open_page( ).<br />

Returns<br />

Details<br />

Bindings<br />

If no more images are available on the page, a binding-specific value will be returned,<br />

otherwise image details are available in a binding-specific manner. See section Bindings<br />

below for more details.<br />

This function advances to the next image associated with the supplied page handle (or<br />

return 0 or NULL if there are no more images), and provide detailed information for this<br />

image. This function will also return artificial images created by the image merging<br />

mechanism. However, the consumed images used to create artificial images will not be<br />

returned.<br />

The image details in the structure or properties/fields are valid until the next call to<br />

<strong>TET</strong>_get_image_info( ) or <strong>TET</strong>_close_page( ) with the same page handle (whichever occurs<br />

first). Since there is only a single set of image info properties/fields per <strong>TET</strong> object, clients<br />

must retrieve all image info before they call <strong>TET</strong>_get_image_info( ) again for the<br />

same or another page or document.<br />

C and C++ language bindings: If no more images are available on the page a NULL pointer<br />

will be returned. Otherwise, a pointer to a <strong>TET</strong>_image_info structure containing information<br />

about the image. The members of the data structure are detailed in Table 10.11.<br />

COM, Java and .NET language bindings: -1 will be returned if no more images are available<br />

on the page, otherwise 1. Individual image info can be retrieved from the <strong>TET</strong> properties/fields<br />

according to Table 10.11. All properties/fields will contain a value of -1 if<br />

they are accessed although the function returned -1.<br />

Perl language binding: 0 will be returned if no more images are available on the page,<br />

otherwise a hash containing the keys listed in Table 10.11. Individual character info can<br />

be retrieved with the keys in this hash.<br />

PHP language binding: an empty (null) object will be returned if no more images are<br />

available on the page, otherwise an object of type <strong>TET</strong>_image_info. Individual image info<br />

can be retrieved from its fields according to Table 10.11. Integer fields in the image info<br />

object are implemented as long in the PHP language binding.<br />

10.7 Image Retrieval Functions 145

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

Saved successfully!

Ooh no, something went wrong!