KeyView 24.1

# Obtain Format Information

The KeyView format detection module (`kwad`) detects a file's format, and reports the information to your application.

You can detect the format of a file by using the info method on a document object. For example:

Copy

    auto myinput = keyview::io::InputFile{ std::string("InputFile.docx") };
    auto doc = session.open(myinput);

    std::cout << "Format:\t" << static_cast<int>(doc.info().format()) << "\n";
    std::cout << "Description:\t" << doc.info().description() << "\n";
    std::cout << "Version:\t" << doc.info().version() << "\n";
    std::cout << "Category:\t" << static_cast<int>(doc.info().category()) << "\n";
    std::cout << "Category Name:\t" << doc.info().category_name() << "\n";
    std::cout << "Encrypted:\t" << std::boolalpha << doc.info().encrypted() << "\n";

For information about mapping detected formats to document readers, see File Formats and Document Readers.

Copyright 2016-2023 Open Text
Version 24.1 | Last updated December 2023

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: IDOL KeyView 24.1

Topic Title: Obtain Format Information