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

Gerben Wierda Sherlock at rna.nl
Fri Sep 6 15:37:19 CEST 2002


On Friday, September 6, 2002, at 11:40 , Fabrice Popineau wrote:

>> 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)
> 	delete_document(pdf_doc);
> #endif
> }
>
> Change the '#if 0' to '#if 1' or remove the matchine #if/#endif pair.

Given that this optimization results in a broken pdfTeX (some artificial 
limit on the number of pdf images you can include), I would suggest 
making this optimization not default.

G




More information about the pdftex mailing list