[XeTeX] hyperref 6.79n breaks xetex's (xdvipdfmx) ability to set proper page dimensions (and overrides page dimensions on pdftex)

Vladimir Volovich vvv at vsu.ru
Mon Dec 14 11:28:55 CET 2009

Hi Ulrike,

"UF" == Ulrike Fischer writes:

 UF> I don't think that the "unicode" option should be used with xetex.
 UF> As far as I know it is similar to inputenc and tries to translate
 UF> 8-bit-input.

option "unicode" tells hyperref to use UTF16-encoded PDF strings
(which are used e.g. in bookmarks or in pdf title, etc), instead of the
default PD1 encoding (since PD1 is an 8-bit encoding which is not
capable of storing anything beyond some accented latin characters).

OTOH, as far as i know, hyperref relies on active characters
(i.e. inputenc) to convert strings to unicode, so i'm not sure how it
is supposed to work with xetex, where inputenc is usually not used.

Does hyperref (with unicode bookmarks) work with xetex?

BTW, a couple of other observations:

1) When i use xetex and xdvipdfmx binaries from TeX Live 2009, but with
old version of hyperref (6.75r), the test file works just fine with
xetex, i.e. the page dimensions are 300x300 pts.

same as if i generate the test.xdv file (using -no-pdf
option passed to xelatex) on TeX Live 2007, then running "xdvipdfmx
test.xdv" gives correct page size in test.pdf on both TL2007 and TL2009.
i.e. the bug seems to be triggered by a new version of hyperref.

looking inside test.xdv generated using old hyperref (6.75r) i see some
extra code inserted via specials compared to test.xdv generated using
current hyperref (6.79n).

2) strangely, "xelatex test.tex" on TL2007 doesn't show the warning
"Failed to convert input string to UTF16", unlike TL2009; but "xdvipdfmx
test.xdv" shows this warning on both TL2007 and TL2009. was xetex
"hiding" some xdvipdfmx warnings on TL2009?

 UF> And if you are using a package or commands to set the page size you
 UF> should disable the settings of hyperref by using the hyperref
 UF> option "setpagesize=false"

ok, that would explain why hyperref is resetting the page dimensions
with pdftex (though i'm not sure why hyperref goes into business of
setting page dimensions). But why is it not resetting them with xetex?


More information about the XeTeX mailing list