Quote:
Originally Posted by Kolenka
How are UDS plugins expected to handle integrating document metadata into main DB? Are we just expected to use the (deprecated) libermetadb to push it in ourselves?
|
No, plugins are not supposed to access the database directly. UDS queries metadata through the document attributes. An example of this is indeed missing in the Poppler PDF plugin. You should do something like this:
Code:
doc_attr_map.insert(std::make_pair("title", "TITLE GOES HERE"));
doc_attr_map.insert(std::make_pair("author", "AUTHOR GOES HERE"));
// For the next release:
doc_attr_map.insert(std::make_pair("publisher", "PUBLISHER GOES HERE"));
Search for make_pair("fixed-page", "yes") in the example code (PDF/IMAGES) for an example of how to create document attributes.