IDocumentMetaExtractor

class IDocumentMetaExtractor

Bases: ImpactCOMWrapperBase

Description:

Represents a document meta-data extractor.

Remarks:

Impact supports a plugin architecture for document meta-data extractors. The IDocumentMetaExtractor object can be used to determine the meta-data keys and data types supported by each meta-data extractor. The extract_meta_data method can be used to extract meta-data from a file. Introduced in Impact 9.0.0.83.

Wraps a COM object or another wrapper instance. Accepts: - A valid impact_object - An existing impact_com_wrapper_base-derived instance

property extender

Gets Extender.

Description:

The document extender which implements this IDocumentMetaExtractor.

Returns:

The value of Extender.

Return type:

extender (IDocumentExtender)

property key

Gets Key.

Description:

A unique meta-data extractor key.

Returns:

The value of Key.

Return type:

key (str)

property meta_count

Gets meta_count.

Description:

The number of meta-data key/type pairs supported by this meta-data extractor.

Returns:

The value of meta_count.

Return type:

meta_count (int)

Examples:

property page_count_meta_key

Gets page_count_meta_key.

Description:

Determines the meta-data key for extracting a page count.

Remarks:

If the meta-data extractor supports determining a page count for the file type then this property contains the meta-data key that can be extract the page count.

Returns:

The value of page_count_meta_key.

Return type:

page_count_meta_key (str)

extract_meta_data(file_name, keys)
Description:

Extracts meta-data key/value pairs from a file.

Remarks:

If you don’t provide a list of Keys to extract, all available meta-data values will be extracted.

Parameters:
  • file_name (str) – The path to a file to extract meta-data from.

  • keys (any) – An optional list of meta-data keys to extract values for.

Examples:

meta_key(index)
Description:

Gets a meta-data key with the specified index.

Remarks:

The meta-data key can be used in the extract_meta_data method to extract meta-data values from files. The corresponding meta_type property can be used to determine the type of the meta-data value extract_meta_data will return.

Parameters:

index (any) – Specifies the index of the meta-data key to get.

meta_type(index)
Description:

Gets the data type for the corresponding meta-data key with the specified index.

Remarks:

The meta-data key can be used in the extract_meta_data method to extract meta-data values from files. The corresponding meta_type property can be used to determine the type of the meta-data value extract_meta_data will return.

Parameters:

index (any) – Specifies the index of the meta-data key to get.

Examples