Skip to content
This repository has been archived by the owner on Mar 17, 2022. It is now read-only.

Commit

Permalink
Merge pull request #207 from Robyer/fixBeginDocument
Browse files Browse the repository at this point in the history
Fix return value of BeginDocument (fixes #103)
  • Loading branch information
rmtheis authored May 14, 2017
2 parents 98995d4 + 00d093d commit 615586c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tess-two/jni/com_googlecode_tesseract_android/tessbaseapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -647,15 +647,11 @@ jboolean Java_com_googlecode_tesseract_android_TessBaseAPI_nativeBeginDocument(J
const char *c_title = env->GetStringUTFChars(title, NULL);
tesseract::TessPDFRenderer* pdfRenderer = (tesseract::TessPDFRenderer*) jRenderer;

jboolean res = JNI_TRUE;

if (pdfRenderer->BeginDocument(c_title)) {
res = JNI_FALSE;
}
bool res = pdfRenderer->BeginDocument(c_title);

env->ReleaseStringUTFChars(title, c_title);

return res;
return (jboolean) (res ? JNI_TRUE : JNI_FALSE);
}

jboolean Java_com_googlecode_tesseract_android_TessBaseAPI_nativeEndDocument(JNIEnv *env,
Expand Down

0 comments on commit 615586c

Please sign in to comment.