[tex-live] Supplied a custom PDF trailer ID with XeLaTeX/xdvipdfmx
Osipov, Michael
michael.osipov at siemens.com
Thu Jan 3 16:20:21 CET 2019
Hi Hirata,
Am 2018-12-23 um 08:30 schrieb Shunsaku Hirata:
> Hi Michael,
>
> Support for custom PDF trailer ID is added to dvipdfmx.
> It is already available in TeX Live development source repository.
>
> IDs must be supplied as an array of two PDF string objects as
>
> \special{pdf:trailerid [(0123456789abcdef) (0123456789abcdef)]}
>
> Or IDs can be specified in hexadecimal form
>
> \special{pdf:trailerid [
> <30313233343536373839616263646566>
> <30313233343536373839616263646566>
> ]}
>
> It must appear on the first page, otherwise it will be ignored.
thanks for making this happen so quickly. Got finally back to my work
machine after holidays and gave it a spin:
> $ xdvipdfmx --version
> This is xdvipdfmx Version 20181221 by the DVIPDFMx project team,
> modified for TeX Live,
> an extended version of DVIPDFMx, which in turn was
> an extended version of dvipdfm-0.13.2c developed by Mark A. Wicks.
>
> Copyright (C) 2002-2018 the DVIPDFMx project team
> Copyright (C) 2006-2018 SIL International.
>
> This is free software; you can redistribute it and/or modify
> it under the terms of the GNU General Public License as published by
> the Free Software Foundation; either version 2 of the License, or
> (at your option) any later version.
>
> $ file $(which xdvipdfmx)
> /usr/local/texlive/2018/bin/i386-freebsd/xdvipdfmx: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 11.2 (1102504), FreeBSD-style, with debug_info, not stripped
then added to our settings.tex which comes before \begin{document}:
> \hypersetup{
> pdfsource={584dc556-5abf-4b5e-aa16-8cf70743b243-src.zip},
> pdfdocumentid={uuid:584dc556-5abf-4b5e-aa16-8cf70743b243},
> pdfinstanceid={uuid:584dc556-5abf-4b5e-aa16-8cf70743b243},
> pdfinfo={
> Creator={\pdfcreator},
> Producer={SiTeX with XeTeX 3.14159265-2.6-0.99999 (TeX Live 2018) on FreeBSD 11.2-STABLE},
> }
> }
>
> \special{pdf:trailerid [<584dc5565abf4b5eaa168cf70743b243><584dc5565abf4b5eaa168cf70743b243>]}
(hypersetup existed already before)
ran xelatex and checked the PDF:
> osipovmi at blnn719x:/tmp/584dc556-5abf-4b5e-aa16-8cf70743b243/src
> $ grep -a /ID ../build/index.pdf
> <</Type/XRef/Root 1 0 R/Info 2 0 R/ID[<584dc5565abf4b5eaa168cf70743b243><584dc5565abf4b5eaa168cf70743b243>]/Size
Looks very good so far. I have made a negative test also by adding a
17th byte 0xaa, but I did not receive an error, just:
> osipovmi at blnn719x:/tmp/584dc556-5abf-4b5e-aa16-8cf70743b243/src
> $ grep -a /ID ../build/index.pdf
> <</Type/XRef/Root 1 0 R/Info 2 0 R/ID[<288ced1ae4f09aac705a2b516bb89703><288ced1ae4f09aac705a2b516bb89703>]/Size
That feels a bit awkward not failing here.
Anyway, do we have to wait for TL2019 for make use of this?
Best regards and my thanks again,
Michael
More information about the tex-live
mailing list