Add error message for JBIG.
Signed-off-by: yzrh <yzrh@noema.org>
This commit is contained in:
parent
3550095959
commit
63728e1340
2 changed files with 9 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2020-2021, yzrh <yzrh@noema.org>
|
* Copyright (c) 2020-2022, yzrh <yzrh@noema.org>
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
@ -600,10 +600,16 @@ cnki_pdf_hn(cnki_t **param)
|
||||||
free(dictionary);
|
free(dictionary);
|
||||||
free(stream);
|
free(stream);
|
||||||
} else if (ret == 1) {
|
} else if (ret == 1) {
|
||||||
|
if ((*param)->stat > 2)
|
||||||
|
printf("Failed\n");
|
||||||
|
|
||||||
free(dictionary);
|
free(dictionary);
|
||||||
|
|
||||||
pdf_obj_append(&pdf, ids[i], NULL, NULL, NULL, 0);
|
pdf_obj_append(&pdf, ids[i], NULL, NULL, NULL, 0);
|
||||||
} else {
|
} else {
|
||||||
|
if ((*param)->stat > 2)
|
||||||
|
printf("Unsupported format\n");
|
||||||
|
|
||||||
free(dictionary);
|
free(dictionary);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2020-2021, yzrh <yzrh@noema.org>
|
* Copyright (c) 2020-2022, yzrh <yzrh@noema.org>
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
@ -24,7 +24,7 @@ strdec_jbig(char **bitmap, int *bitmap_size,
|
||||||
int ret;
|
int ret;
|
||||||
if ((ret = jbg_dec_in(&sd, (unsigned char *) data_ptr,
|
if ((ret = jbg_dec_in(&sd, (unsigned char *) data_ptr,
|
||||||
data_size, NULL)) != JBG_EOK) {
|
data_size, NULL)) != JBG_EOK) {
|
||||||
printf("%s\n", jbg_strerror(ret));
|
printf("[%s] ", jbg_strerror(ret));
|
||||||
jbg_dec_free(&sd);
|
jbg_dec_free(&sd);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue