diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2014-06-21 06:30:40 +0000 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2014-06-21 06:30:40 +0000 |
commit | 784b0639f1700bdc841a68ad8174806494db3c2f (patch) | |
tree | 81d2b271b1ad33f3fce0c5051eba4edf86e27c7d | |
parent | 78dc512b5a69e0ac3246afc2ccc43e6b8c0cba65 (diff) |
[dvipdfm-x] Respect pdf:docinfo's /Producer
git-svn-id: svn://tug.org/texlive/trunk@34343 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Build/source/texk/dvipdfm-x/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/pdfdoc.c | 17 |
2 files changed, 15 insertions, 7 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog index e351ffa3a87..2fa43f5c491 100644 --- a/Build/source/texk/dvipdfm-x/ChangeLog +++ b/Build/source/texk/dvipdfm-x/ChangeLog @@ -1,3 +1,8 @@ +2014-06-21 Khaled Hosny <khaledhosny@eglug.org> + + * pdfdoc.c: Set PDF Docinfo's /Producer string from pdf:docinfo if + supplied (http://sourceforge.net/p/xetex/bugs/93/). + 2014-06-20 Akira Kakuto <kakuto@fuk.kindai.ac.jp> * xbb.c: Check kpse_in_name_ok and kpse_out_name_ok in extractbb. diff --git a/Build/source/texk/dvipdfm-x/pdfdoc.c b/Build/source/texk/dvipdfm-x/pdfdoc.c index 1690d94aec5..e102bcb33ac 100644 --- a/Build/source/texk/dvipdfm-x/pdfdoc.c +++ b/Build/source/texk/dvipdfm-x/pdfdoc.c @@ -514,7 +514,6 @@ pdf_doc_close_docinfo (pdf_doc *p) NULL }; pdf_obj *value; - char *banner; int i; for (i = 0; keys[i] != NULL; i++) { @@ -531,12 +530,16 @@ pdf_doc_close_docinfo (pdf_doc *p) } } - banner = NEW(strlen(my_name)+strlen(VERSION)+4, char); - sprintf(banner, "%s (%s)", my_name, VERSION); - pdf_add_dict(docinfo, - pdf_new_name("Producer"), - pdf_new_string(banner, strlen(banner))); - RELEASE(banner); + if (!pdf_lookup_dict(docinfo, "Producer")) { + char *banner; + + banner = NEW(strlen(my_name)+strlen(VERSION)+4, char); + sprintf(banner, "%s (%s)", my_name, VERSION); + pdf_add_dict(docinfo, + pdf_new_name("Producer"), + pdf_new_string(banner, strlen(banner))); + RELEASE(banner); + } if (!pdf_lookup_dict(docinfo, "CreationDate")) { char now[32]; |