Fix PDF object check.
Signed-off-by: yzrh <yzrh@noema.org>
This commit is contained in:
parent
226f16ddf4
commit
1d899d934d
1 changed files with 4 additions and 4 deletions
|
@ -328,7 +328,9 @@ cnki_pdf(cnki_t **param)
|
||||||
printf("Root object is %d.\n", root);
|
printf("Root object is %d.\n", root);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pdf_get_obj(&pdf, root, NULL) != 0) {
|
pdf_object_t *tmp;
|
||||||
|
|
||||||
|
if (pdf_get_obj(&pdf, root, &tmp) != 0) {
|
||||||
if ((*param)->stat > 0)
|
if ((*param)->stat > 0)
|
||||||
printf("Root object is missing\n");
|
printf("Root object is missing\n");
|
||||||
|
|
||||||
|
@ -423,8 +425,6 @@ cnki_pdf(cnki_t **param)
|
||||||
if ((*param)->stat > 1)
|
if ((*param)->stat > 1)
|
||||||
printf("Deleting xref object\n");
|
printf("Deleting xref object\n");
|
||||||
|
|
||||||
pdf_object_t *tmp;
|
|
||||||
|
|
||||||
pdf_get_obj(&pdf, xref, &tmp);
|
pdf_get_obj(&pdf, xref, &tmp);
|
||||||
pdf_obj_del(&pdf, xref);
|
pdf_obj_del(&pdf, xref);
|
||||||
|
|
||||||
|
@ -1106,7 +1106,7 @@ cnki_pdf_hn(cnki_t **param)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
pdf_object_t *tmp = NULL;
|
pdf_object_t *tmp;
|
||||||
|
|
||||||
/* Add /Parent to page object */
|
/* Add /Parent to page object */
|
||||||
for (int i = 0; i < (*param)->file_stat->page; i++) {
|
for (int i = 0; i < (*param)->file_stat->page; i++) {
|
||||||
|
|
Loading…
Reference in a new issue