| 90 | }; |
| 91 | |
| 92 | docling_parser::docling_parser(std::string level, int max_concurrent_results): |
| 93 | docling_resources(), |
| 94 | pdf_resources_dir(resource_utils::get_resources_dir(true).string()), |
| 95 | doc_decoders({}), |
| 96 | page_decoders({}), |
| 97 | max_concurrent_results(max_concurrent_results) |
| 98 | { |
| 99 | set_loglevel_with_label(level); |
| 100 | |
| 101 | LOG_S(WARNING) << "pdf_resources_dir: " << pdf_resources_dir; |
| 102 | |
| 103 | auto RESOURCE_DIR_KEY = pdflib::pdf_resource<pdflib::PAGE_FONT>::RESOURCE_DIR_KEY; |
| 104 | |
| 105 | nlohmann::json data = nlohmann::json::object({}); |
| 106 | data[RESOURCE_DIR_KEY] = pdf_resources_dir; |
| 107 | |
| 108 | std::unordered_map<std::string, double> timings = {}; |
| 109 | pdflib::pdf_resource<pdflib::PAGE_FONT>::initialise(data, timings); |
| 110 | } |
| 111 | |
| 112 | void docling_parser::set_loglevel_with_label(std::string level) |
| 113 | { |
nothing calls this directly
no outgoing calls
no test coverage detected