Created
March 5, 2017 14:46
-
-
Save mcs07/fa0ade14709f55d4523c9454a193f824 to your computer and use it in GitHub Desktop.
Patch osra lib v2.1.0
This file contains hidden or 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
diff --git a/src/osra_lib.cpp b/src/osra_lib.cpp | |
index 4262e83..48979ae 100644 | |
--- a/src/osra_lib.cpp | |
+++ b/src/osra_lib.cpp | |
@@ -635,7 +635,7 @@ int osra_process_image( | |
if (type.empty() || type == "PDF" || type == "PS") | |
{ | |
#ifdef OSRA_LIB | |
- poppler_doc = load_from_raw_data(image_data, image_length); | |
+ poppler_doc = poppler::document::load_from_raw_data(image_data, image_length); | |
#else | |
poppler_doc = poppler::document::load_from_file(input_file); | |
#endif | |
@@ -649,10 +649,12 @@ int osra_process_image( | |
{ | |
type.clear(); | |
} | |
+#ifndef OSRA_LIB | |
else if (!type.empty() && type != "PDF") | |
{ | |
page = count_pages(input_file); | |
} | |
+#endif | |
// dup2(stderr_copy, 2); | |
//close(stderr_copy); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment