using namespace EBook;
Pdf::Pdf(std::string path, std::unique_ptr<IRunnable> runner)
- : runner(std::move(runner))
+ : _runner(std::move(runner))
{
if (path.empty()) {
LOGE("invalid path");
LOGD("%s", path.c_str());
try {
+ PoDoFo::PdfError::EnableLogging(false);
+
pdf.Load(path.c_str());
loaded = true;
} catch (const PoDoFo::PdfError& e) {
return false;
for (int n = 0; n < pdf.GetPageCount(); ++n)
- if (runner->run(parseTextFromPage(n)))
+ if (_runner->run(parseTextFromPage(n)))
return true;
return false;
return;
for (int n = 0; n < pdf.GetPageCount(); ++n)
- runner->run(parseTextFromPage(n));
+ _runner->run(parseTextFromPage(n));
}
std::string Pdf::parseTextFromPage(unsigned int index)