Created
August 11, 2015 04:14
-
-
Save rmtheis/19965abdfca5c2c9eb26 to your computer and use it in GitHub Desktop.
JNI code for setting PDF title
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jboolean Java_com_googlecode_tesseract_android_TessBaseAPI_nativeBeginDocument(JNIEnv *env, | |
jobject thiz, jstring title, jlong jRenderer) { | |
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; | |
} | |
//env->ReleaseStringUTFChars(title, c_title); | |
return res; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment