Skip to content

Commit c7e8d30

Browse files
committed
Fix value for PHYSICAL_IMG_NR in ALTO output
Signed-off-by: Stefan Weil <sw@weilnetz.de>
1 parent e398601 commit c7e8d30

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/api/altorenderer.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ char* TessBaseAPI::GetAltoText(ETEXT_DESC* monitor, int page_number) {
124124
return nullptr;
125125

126126
int lcnt = 0, bcnt = 0, wcnt = 0;
127-
int page_id = page_number;
128127

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

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

0 commit comments

Comments
 (0)