MetadataSearchOptions class

MetadataSearchOptions class

Represents search options for Metadata signatures.

Provides options to configure searching for metadata signatures in a document.

The MetadataSearchOptions type exposes the following members:

Constructors

Constructor Description
init Initializes a new instance of the MetadataSearchOptions class with default values.

Properties

Property Description
data_encryption The implementation of IDataEncryption used to decrypt all metadata signatures within this options collection.
include_builtin_properties The flag indicating whether built‑in document properties such as document statistics and information are included in the search result.
name The metadata signature name to search for and match.
name_match_type The metadata name match type used for searching. It is applied only when the name property is set.
all_pages The flag indicating whether to search on each document page. By default this value is True. (inherited from SearchOptions)
page_number The document page number for searching (optional). (inherited from SearchOptions)
pages_setup The options to specify pages for signature searching. (inherited from SearchOptions)
shape_position The flag indicating whether to return the shape position in the document layout. Available only for Word documents. (inherited from SearchOptions)
skip_external The flag to return only signatures marked as IsSignature. By default the value is False, which indicates that all signatures matching the specified criteria are returned. (inherited from SearchOptions)

Example

from groupdocs.signature import Signature
from groupdocs.signature.domain import TextMatchType
from groupdocs.signature.options import MetadataSearchOptions

with Signature("signed.pdf") as signature:
    options = MetadataSearchOptions()
    options.name = "Author"
    options.name_match_type = TextMatchType.EXACT

    result = signature.search([options])
    print(f"Found {len(result.signatures)} matching metadata signature(s)")
    for metadata in result.signatures:
        print(f"{metadata.name} = {metadata.value}")

See Also