Skip to content

Commit

Permalink
Fix value for PHYSICAL_IMG_NR in ALTO output
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Dec 16, 2018
1 parent e398601 commit c7e8d30
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/api/altorenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ char* TessBaseAPI::GetAltoText(ETEXT_DESC* monitor, int page_number) {
return nullptr;

int lcnt = 0, bcnt = 0, wcnt = 0;
int page_id = page_number;

if (input_file_ == nullptr) SetInputName(nullptr);

Expand All @@ -149,9 +148,8 @@ char* TessBaseAPI::GetAltoText(ETEXT_DESC* monitor, int page_number) {
alto_str
<< "\t\t<Page WIDTH=\"" << rect_width_ << "\" HEIGHT=\""
<< rect_height_
// TODO: next line is buggy because rect_height is not an image number.
<< "\" PHYSICAL_IMG_NR=\"" << rect_height_ << "\""
<< " ID=\"page_" << page_id << "\">\n"
<< "\" PHYSICAL_IMG_NR=\"" << page_number << "\""
<< " ID=\"page_" << page_number << "\">\n"
<< "\t\t\t<PrintSpace HPOS=\"0\" VPOS=\"0\""
<< " WIDTH=\"" << rect_width_ << "\""
<< " HEIGHT=\"" << rect_height_ << "\">\n";
Expand Down

0 comments on commit c7e8d30

Please sign in to comment.