diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-04-03 23:16:04 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-04-03 23:16:04 +0000 |
commit | 97d03159fd78ed23db6984ba6432436f0982456c (patch) | |
tree | e52d903a409b8107bab1bb545d8790cae1a68157 /Build/source/texk/web2c/luatexdir/pdf/pdfgen.w | |
parent | 3eb9ea53b1a3c87c7e718b2d3680006f9df04c9e (diff) |
web2c/luatexdir: revert
git-svn-id: svn://tug.org/texlive/trunk@40228 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/pdf/pdfgen.w')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/pdf/pdfgen.w | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w b/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w index 5f6756b1e7d..c5db4c71413 100644 --- a/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w +++ b/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w @@ -1427,25 +1427,17 @@ difficult, we start with a simpler implementation using just the first two items @c - -/* - A user supplied trailerid had better be an array! So maybe we need to check - for [] and error otherwise. -*/ - static void print_ID(PDF pdf) { if ((pdf_suppress_optional_info & 512) == 0) { - const char *p = NULL; - pdf_add_name(pdf, "ID"); - p = get_pdf_table_string("trailerid"); - if (p && strlen(p) > 0) { - pdf_puts(pdf,p); - } else if (pdf_trailer_id != 0) { - /* user provided one */ - pdf_print_toks(pdf, pdf_trailer_id); + if (pdf_trailer_id != 0) { + char *s = NULL; + int len; + s = tokenlist_to_cstring(pdf_trailer_id, true, &len); + /* this had better be an array! sp maybe we need to check for [] and error otherwise */ + pdf_add_name(pdf, "ID"); + pdf_out_block(pdf,s,len); } else { - /* system provided one */ time_t t; size_t size; char time_str[32]; @@ -1481,6 +1473,7 @@ static void print_ID(PDF pdf) md5_finish(&state, digest); /* write the IDs */ convertStringToHexString((char *) digest, id, 16); + pdf_add_name(pdf, "ID"); pdf_begin_array(pdf); pdf_printf(pdf, "<%s> <%s>", id, id); pdf_end_array(pdf); |