aboutsummaryrefslogtreecommitdiffstats
path: root/src/cnki_pdf.c
diff options
context:
space:
mode:
authoryzrh <yzrh@noema.org>2020-12-31 18:58:52 +0000
committeryzrh <yzrh@noema.org>2020-12-31 20:38:02 +0000
commitb20c6ad3ed930977990f3812b25b80d2ce282d79 (patch)
tree26b96fce5d8765b2dd07aec40a286b44a0c93dce /src/cnki_pdf.c
parent3bd7ea7520e13f5fabcfadb1a7630398bc1dca6d (diff)
downloadmelon-b20c6ad3ed930977990f3812b25b80d2ce282d79.tar.gz
melon-b20c6ad3ed930977990f3812b25b80d2ce282d79.tar.zst
Handle binary data in dictionary.
Diffstat (limited to 'src/cnki_pdf.c')
-rw-r--r--src/cnki_pdf.c14
1 files changed, 7 insertions, 7 deletions
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);