[\immediate]\pdfximage
Hi, in an application of ours, we have the situation that quite a number of graphics files are checked for their size and stuff, and then a decision is made whether to use them in the resulting PDF. If we do the checks using \pdfximage, the resulting file handle (and internal data structures) are kept open until the end of the TeX run, waiting to see whether actually a \pdfrefximage will ever occur. Bad. We actually run out of file handles on some platforms because of that. If we do the checks using \immediate\pdfximage, then the graphics file will be written out to the PDF even though it will never get displayed or used. Since probably only one of five files actually _is_ supposed to be printed, this will blow up the PDF completely unnecessarily. Any idea how to deal with this? How about something like [\immediate]\pdfcloseximage which makes PDFTeX forget all about a previously included file, freeing the resources? Or is there something I don't understand? -- David Kastrup
David Kastrup wrote:
Hi,
in an application of ours, we have the situation that quite a number of graphics files are checked for their size and stuff, and then a decision is made whether to use them in the resulting PDF.
If we do the checks using \pdfximage, the resulting file handle (and internal data structures) are kept open until the end of the TeX run, waiting to see whether actually a \pdfrefximage will ever occur. Bad. We actually run out of file handles on some platforms because of that.
If we do the checks using \immediate\pdfximage, then the graphics file will be written out to the PDF even though it will never get displayed or used. Since probably only one of five files actually _is_ supposed to be printed, this will blow up the PDF completely unnecessarily.
Any idea how to deal with this? How about something like [\immediate]\pdfcloseximage which makes PDFTeX forget all about a previously included file, freeing the resources?
Or is there something I don't understand?
as martin said ... just script a solution .. running pdfinfo and collecting the info of 10.000 pdf files is not much slower than letting pdftex open them, close them, clean up mem etc etc Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (2)
-
David Kastrup
-
Hans Hagen