[XeTeX] HELP! ** ERROR ** Page number 65536l too large!

Jonathan Kew jfkthame at googlemail.com
Thu Sep 29 22:00:21 CEST 2011


On 29 Sep 2011, at 18:59, Michael Joyner wrote:

> HELP!
> 
> I am getting this on a super-large tex file:
> 
> ** ERROR ** Page number 65536l too large!
> 
> I tried googling it, but did not find any references to this error. :(

This error is reported by xdvipdfmx (the PDF-generating output driver xetex uses) when the output exceeds 65535 pages; see

  http://cvs.ktug.or.kr/viewcvs/dvipdfmx/src/pdfdoc.c?revision=1.76&view=markup#l356

for confirmation of this (it comes from DVIPDFMx, the project xdvipdfmx was based on).

Note that the DVI file format postamble includes a two-byte field for the total number of pages present, so if you try to put more than 64K pages in a DVI file, the postamble (at least) will necessarily be incorrect, even if the file is otherwise well-formed. Clearly Knuth didn't think there was any need for such large numbers of pages in a single file.

It's possible (though I haven't tried) that pdftex in PDF output mode would be able to generate more pages, as this avoids the DVI path altogether.

Otherwise, the solution is to split the job up into chunks of less than 64K pages each.

JK




More information about the XeTeX mailing list