Skip to content

Commit

Permalink
fix tesseract-ocr#665 process file list
Browse files Browse the repository at this point in the history
  • Loading branch information
jbreiden authored and zdenop committed Jan 19, 2017
1 parent 170573f commit a979494
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion api/baseapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,15 @@ bool TessBaseAPI::ProcessPagesInternal(const char* filename,

// Maybe we have a filelist
if (r != 0 || format == IFF_UNKNOWN) {
STRING s(buf.c_str());
STRING s;
if (stdInput) {
s = buf.c_str();
} else {
std::ifstream t(filename);
std::string u((std::istreambuf_iterator<char>(t)),
std::istreambuf_iterator<char>());
s = u.c_str();
}
return ProcessPagesFileList(NULL, &s, retry_config,
timeout_millisec, renderer,
tesseract_->tessedit_page_number);
Expand Down

0 comments on commit a979494

Please sign in to comment.