# [OS X TeX] Re: XeTeX and pdfpages: no dice?

Andreas Matthias amat at kabsi.at
Thu Apr 19 13:10:42 EDT 2007

```Jonathan Kew wrote:

> I'd guess there are some kinds of PDF file that the clever macro
> code  for counting pages can't quite understand.

I found a bug concerning line breaks and have fixed that. Nevertheless
there is still one problem. The macro uses the following loop:

\@whilenum\count@<256 \do{%
\catcode\count@=9
}%

And it seems that I am missing a lot of characters concerning XeTeX.
How many character codes does XeTeX have? I have found

@d biggest_char=65535 {the largest allowed character number;

but such a big number causes a TeX capacity exceeded error.

What is the correct number in the above loop to ignore all
characters?

Ciao
Andreas