View Single Post
Old 03-02-2010, 06:28 AM   #80
Matthijs
Groupie
Matthijs will become famous soon enoughMatthijs will become famous soon enoughMatthijs will become famous soon enoughMatthijs will become famous soon enoughMatthijs will become famous soon enoughMatthijs will become famous soon enough
 
Matthijs's Avatar
 
Posts: 199
Karma: 666
Join Date: Oct 2006
Location: Eindhoven, the Netherlands
Device: iLiad, DR1000S, DR800SG
Quote:
Originally Posted by Kolenka View Post
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.
Matthijs is offline   Reply With Quote