Hello, On 2021-04-21 17:51, Bruno Le Floch wrote: > On 4/20/21 12:36 PM, Joseph Wright wrote: >> I don't think I've ever seen a test of what happens if \pdffilesize is used on a >> truly massive file. >> > > In an interactive session, with test.dat around 8GB, I get > > *\message{\pdffilesize{test.dat}} > 7733552500 > *\count0=\pdffilesize{test.dat}\relax > ! Number too big. > <inserted text> 7733552500 > > <*> \count0=\pdffilesize{test.dat} > \relax > ? This is the expected behavior. TeX's count registers only accept values from -2^{31} - 1 (-2147483647) to 2^{31} - 1 (2147483647) inclusively. Therefore, \pdfilesize is not implemented as TeX number, but as text string with the usual category codes as the output of the TeX primitives \number or \string. The file size is retrieved via the usual `stat' system call. If the binary is compiled for a 32-bit platform without explicit support for larger file sizes (-D_FILE_OFFSET_BITS=64), the maximum file size is also restricted to 2^{31}-1 (see the stat(2) manual page). If the stat system call fails for some reason (ENOENT, EOVERFLOW, ...), \pdffilesize returns the empty string. Yours sincerely Heiko