From b20c6ad3ed930977990f3812b25b80d2ce282d79 Mon Sep 17 00:00:00 2001 From: yzrh Date: Thu, 31 Dec 2020 18:58:52 +0000 Subject: Handle binary data in dictionary. --- src/cnki_pdf.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/cnki_pdf.c') diff --git a/src/cnki_pdf.c b/src/cnki_pdf.c index d8eabff..8c9fbb8 100644 --- a/src/cnki_pdf.c +++ b/src/cnki_pdf.c @@ -110,7 +110,7 @@ cnki_pdf(cnki_t **param) strcat(dictionary, " "); } snprintf(buf, 64, - "]\n/Count %d\n>>\n", + "]\n/Count %d\n>>", pdf_get_kid_count(&pdf, parent[i])); strcat(dictionary, buf); @@ -198,7 +198,7 @@ cnki_pdf(cnki_t **param) snprintf(buf, 64, "/Count %d\n", (*param)->file_stat->page); strcat(dictionary, buf); - strcat(dictionary, ">>\n"); + strcat(dictionary, ">>"); pdf_obj_prepend(&pdf, root, NULL, dictionary, NULL); @@ -238,10 +238,10 @@ cnki_pdf(cnki_t **param) if (catalog != 0) { if ((*param)->stat > 0) - printf("catalog object is %d.\n", catalog); + printf("Catalog object is %d.\n", catalog); } else { if ((*param)->stat > 0) - printf("catalog object is missing\n"); + printf("Catalog object is missing\n"); if ((*param)->stat > 1) printf("Generating catalog object\n"); @@ -258,7 +258,7 @@ cnki_pdf(cnki_t **param) strcat(dictionary, buf); } - strcat(dictionary, ">>\n"); + strcat(dictionary, ">>"); pdf_obj_append(&pdf, 0, NULL, dictionary, NULL); @@ -273,7 +273,7 @@ cnki_pdf(cnki_t **param) if (xref != 0) { if ((*param)->stat > 0) - printf("xref object is %d.\n", xref); + printf("Xref object is %d.\n", xref); if ((*param)->stat > 1) printf("Deleting xref object\n"); @@ -284,7 +284,7 @@ cnki_pdf(cnki_t **param) printf("Deleted xref object\n"); } else { if ((*param)->stat > 0) - printf("xref object is missing\n"); + printf("Xref object is missing\n"); } free(dictionary); -- cgit v1.2.3