[pdftex] Fwd: [OS X TeX] "Too many open files" error - how to fix?

Fabrice Popineau Fabrice.Popineau at supelec.fr
Fri Sep 6 12:40:09 CEST 2002

* Gerben Wierda <Sherlock at rna.nl> writes:

> This question was asked on the Mac OS X TeX list. As I see it, this
> person runs against a 256 open files limit. Which is strange because
> I would guess that inlcuded files release their handles when they
> are included. His pdftex version will be

> pdfTeX (Web2C 7.3.7x) 3.14159-1.00b-pretest-20020211 kpathsea
> version 3.3.7 Copyright (C) 1999 Han The Thanh, Petr Sojka, and Jiri
> Zlatuska.

> Is this a known possible problem? Have the source and/or
> source.development directories of TeX Live been updated since the
> release of TeX Live 7?

Known problem due to an 'optimisation' added in pdftex at some
point. I have removed it for the win32 version.

// Called when an image has been written and it's resources in
// image_tab are freed.  We cannot deallocate the PdfDocument yet, as
// future pages of the same document may be embedded. As an
// optimization, we do delete it if it's a one-page document.
void epdf_delete()

    // Akira Kakuto has suggested to make epdf_delete empty, so
#if 1
    PdfDocument *pdf_doc = (PdfDocument *) epdf_doc;
    xref = pdf_doc->xref;
    if (pdf_doc->doc->getCatalog()->getNumPages() == 1)

Change the '#if 0' to '#if 1' or remove the matchine #if/#endif pair.


More information about the pdftex mailing list