[pdftex] 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 02:28:33 CET 2009
Hi Heiko and all,
[first is the xetex-related part of bug report, then follows the
pdftex-related part]
when using hyperref with unicode option, I'm not able to set the proper
page dimensions.
Here is a minimal working example which demonstrates the problem:
\documentclass{article}
\usepackage[unicode,pdftitle={test}]{hyperref}
\pdfpagewidth=300bp
\pdfpageheight=300bp
\begin{document}
%\showthe\pdfpagewidth
This is a test.
\end{document}
when running "xelatex test.tex", i see the following few last lines on
terminal:
[1] (./test.aux)
** WARNING ** Failed to convert input string to UTF16...
)
Output written on test.pdf (1 page).
Transcript written on test.log.
(the WARNING is actually produced by xdvipdfmx, rather than by xetex itself;
the \pdfpagewidth and \pdfpageheight primitives are working in xetex,
and i used them rather than the geometry package to make an example
simpler to debug.)
when i then run "pdfinfo test.pdf", i get:
$ pdfinfo test.pdf
Title: test
Creator: LaTeX with hyperref package
Producer: xdvipdfmx (0.7.7)
CreationDate: Mon Dec 14 04:04:07 2009
Tagged: no
Pages: 1
Encrypted: no
Page size: 612 x 792 pts (letter)
File size: 3087 bytes
Optimized: no
PDF version: 1.4
Notice that the page size is wrong.
If i comment out the line which calls the hyperref package, i get no
warning, and the pdfinfo shows the expected page size:
$ pdfinfo test.pdf
Creator: XeTeX output 2009.12.14:0405
Producer: xdvipdfmx (0.7.7)
CreationDate: Mon Dec 14 04:05:28 2009
Tagged: no
Pages: 1
Encrypted: no
Page size: 300 x 300 pts
File size: 2730 bytes
Optimized: no
PDF version: 1.4
I'm using current subversion snapshot of texlive (same behavior happens in
the released TeX Live 2009):
XeTeX 3.1415926-2.2-0.9995.2 (TeX Live 2009)
pdfTeX 3.1415926-1.40.10-2.2 (TeX Live 2009)
xdvipdfmx-0.7.7
hyperref 6.79n
is this a bug in hyperref (e.g. it produces some malformed UTF16 string
which xdvipdfmx can't handle) or in xdvipdfmx?
Now, the pdftex-related part of the bug report.
If I uncomment the "\showthe\pdfpagewidth" line, i see that the
\pdfpagewidth gets reset after the \begin{document}:
pdflatex shows:
> 614.295pt.
if i comment out hyperref usage, i get the expected result:
> 301.125pt.
in xetex, I'm always getting the 301.125pt result, regardless of
presence of hyperref; but nevertheless because of the WARNING by
xdvipdfmx, the page dimensions appear wrong when using hyperref.
Best,
v.
More information about the pdftex
mailing list