From bf638b9202d8e34083a71236563af2097100171f Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Fri, 20 Jan 2017 13:36:16 -0800 Subject: [PATCH] Fix PDF syntax error: "XObject" instead of "/XObject" when textonly_pdf=false --- api/pdfrenderer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/pdfrenderer.cpp b/api/pdfrenderer.cpp index ebb4922d55..5f23b49e5c 100644 --- a/api/pdfrenderer.cpp +++ b/api/pdfrenderer.cpp @@ -852,7 +852,7 @@ bool TessPDFRenderer::AddImageHandler(TessBaseAPI* api) { double width = pixGetWidth(pix) * 72.0 / ppi; double height = pixGetHeight(pix) * 72.0 / ppi; - snprintf(buf2, sizeof(buf2), "XObject << /Im1 %ld 0 R >>\n", obj_ + 2); + snprintf(buf2, sizeof(buf2), "/XObject << /Im1 %ld 0 R >>\n", obj_ + 2); const char *xobject = (textonly_) ? "" : buf2; // PAGE