From 1f62c53da6edc5a82a1e0eceb401b2274cd4a0d1 Mon Sep 17 00:00:00 2001 From: yzrh Date: Wed, 30 Dec 2020 17:06:55 +0000 Subject: Produce PDF directly from KDH. --- src/pdf_writer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pdf_writer.c') diff --git a/src/pdf_writer.c b/src/pdf_writer.c index 8d5fc16..cda998a 100644 --- a/src/pdf_writer.c +++ b/src/pdf_writer.c @@ -27,10 +27,10 @@ pdf_dump_obj(pdf_object_t **pdf, FILE **fp) fprintf(*fp, "%d 0 obj\n", ptr->id); if (ptr->dictionary != NULL) { - fputs(ptr->dictionary, *fp); + fwrite(ptr->dictionary, ptr->dictionary_size, 1, *fp); fputs("\n", *fp); } else if (ptr->object != NULL) { - fputs(ptr->object, *fp); + fwrite(ptr->object, ptr->object_size, 1, *fp); fputs("\n", *fp); } else if (ptr->stream == NULL) { fputs("null\n", *fp); -- cgit v1.2.3