[pdftex] /pdfinfo {/Producer (foo)} not working

Martin Schröder ms at artcom-gmbh.de
Wed Feb 21 15:50:13 CET 2001


On 2001-02-14 18:47:53 +0100, Heiko Oberdiek wrote:
> It seems that the pdfinfo part is introduced _after_
> the default entry of pdfTeX, so that the resulting
> pdf file will contain
>   \pdfinfo{/Producer(foo)/Creator(bar)}
> ==>
>   /Producer (pdfTeX-0.14g)
>   /Producer(foo)/Creator(bar)
>   /Creator (TeX)
> 
> AR seems to use the first entry, so that "foo"
> is hided.

Dictionaries in PDF have no defined order; the value of a
multiple defined key is undefined per spec -- but most likely the
first entry in the PDF file is taken.

The reason for this misfeature is here:

<quote src=pdftex.ch>
@ @<Output the info object@>=
pdf_new_dict(obj_type_others, 0);
@<Print the Producer key@>;
if pdf_info_toks <> null then begin
    pdf_print_toks_ln(pdf_info_toks);
    delete_toks(pdf_info_toks);
end;
pdf_str_entry_ln("Creator", "TeX");
@<Print the CreationDate key@>;
pdf_end_dict
</quote>

Changing this to

<quote src=pdftex.ch state=patched>
@ @<Output the info object@>=
pdf_new_dict(obj_type_others, 0);
if pdf_info_toks <> null then begin
    pdf_print_toks_ln(pdf_info_toks);
    delete_toks(pdf_info_toks);
end;
@<Print the Producer key@>;
...
</quote>

would solve the problem.

Best regards
    Martin
-- 
                http://www.tm.oneiros.de/calendar/2001/




More information about the pdftex mailing list