Skip to content

Commit

Permalink
rint error message when pdf.ttf is not found.
Browse files Browse the repository at this point in the history
  • Loading branch information
zdenop committed May 15, 2015
1 parent e7b087f commit e98849b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/pdfrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -614,8 +614,10 @@ bool TessPDFRenderer::BeginDocumentHandler() {
n = snprintf(buf, sizeof(buf), "%s/pdf.ttf", datadir_);
if (n >= sizeof(buf)) return false;
FILE *fp = fopen(buf, "rb");
if (!fp)
if (!fp) {
fprintf(stderr, "Can not open file \"%s\"!\n", buf);
return false;
}
fseek(fp, 0, SEEK_END);
long int size = ftell(fp);
fseek(fp, 0, SEEK_SET);
Expand Down

0 comments on commit e98849b

Please sign in to comment.