# hyperref: Height of page (\paperheight) is invalid (0.0pt) [closed]

I am getting the following annoying warning from hyperref:

hyperref.sty: [hyperref] Height of page (\paperheight) is invalid (0.0pt), usi
ng 11in. (page 1)


I am using a thesis class (thesis.cls) and some packages like fancyhdr etc. I compile using pdflatex.

I tried to fix the warning with this:

\special{papersize=11in,8.5in}


but it didn't help. Any suggestions? Thanks!

• Perhaps post a small compilable code example (reduce a copy), see minimalbeispiel.de/mini-en.html it would make helping easier. – Stefan Kottwitz Aug 25 '10 at 23:47
• Where did you get thesis.cls from? – Charles Stewart Aug 26 '10 at 10:00
• Since the OP hasn't returned since Aug '11 and the thesis class used doesn't seem to be the one on CTAN, I voted to close as too localized. – doncherry Jan 8 '12 at 18:32
• I had the same error from a custom beamer style I tried to make (not using thesis.cls). This question was the first thing that came up on google. It would be useful to have general tips on resolving this type of error. – EL_DON Jul 5 '18 at 20:15

With this minimal example, containing all information of your post, the error cannot be produced:

\documentclass{thesis}
\usepackage{fancyhdr}
\usepackage{hyperref}
\begin{document}
text
\end{document}


So, there may be information missing. I also assume you mean the thesis class that we can find on CTAN.

Instead of manually adjusting lengths, I strongly recommand to use the geometry package for that purpose:

\usepackage[papersize={8.5in,11in}]{geometry}


You may also specify margins and various other page dimensions using the key=value option interface. geometry calculates missing dimensions. Otherwise the user has to ensure that text width, left margin, right margin, binding offset and perhaps margin note width all sum up to the correct page width.

geometry autodetects the driver like pdftex or dvips.

Okay, I found the solution. It it is broken in the thesis.cls that I'm using. But just setting it manually fixed it:

\setlength{\paperheight}{11in}