[NTG-pdftex] Is there a limit to the size of PDF files?

David Kastrup dak at gnu.org
Wed Oct 17 15:49:01 CEST 2007

Akira Kakuto <kakuto at fsci.fuk.kindai.ac.jp> writes:

>> Could it be that PDFTeX (as in TeXlive2007 for win32) aborts with an
>> obscure error message when the size of the generated PDF file exceeds
>> 2GB?
> The prototype of fseek() in my old MSVC++ reads
> int fseek(FILE *stream, long offset, int origin)
> and long (the same as int) is signed 32 bit integer.
> Therefore I think 2GB is the limit in the TL win32 pdfTeX.
>> If yes, is there a chance to work around this in some way?
> I cannot find a workaround.

In Linux/glibc, I find

	The fseeko() and ftello() functions are identical to fseek()
	and  ftell() (see fseek(3)),  respectively, except  that the
	offset argument of fseeko() and the return value of ftello()
	is of type off_t instead of long.

	On many architectures both  off_t and long are 32-bit types,
	but compilation with
		#define _FILE_OFFSET_BITS 64
	will turn off_t into a 64-bit type.

Is there something like this to be had in MSVC++?  Is MSVC++
obligatory for compiling PDFTeX in win32?

David Kastrup

More information about the ntg-pdftex mailing list