Hi,
 
I was using IText java API with sucess for several months. I have to concatenate a lot of pdf files and I'm getting
an error I can't resolve :
 
I have got to scan several folders which contains pdf files and I have to concatenate all the pdf files for each folder. After some concat-pdf were sucessfull
created I'm randomly get the following exception (but it seems to be after around 1000 concatenations) :
 
java.io.FileNotFoundException : folder100/afile.pdf (too many open files)
    at java.io.RandomAccessFile.open(Native Method)
    at java.io.RandomAccessFile.<init> (RandomAccessFile.java : 200)
    at java.io.RandomAccessFile.<init> (RandomAccessFile.java : 94)
    at com.lowagie.text.pdf.RandomAcessFileOrArray.<init> (Unknown Source)
    at com.lowagie.text.pdf.PRTokeniser.<init> (Unknown Source)
    at com.lowagie.text.pdf.PdfReader.<init> (Unknown Source)
    at com.lowagie.text.pdf.PdfReader.<init> (Unknown Source)
    at com.test.PDF.concatPDF (MyFile.java : 200)
 
I tried to release my IText object by several ways (obj.close(), obj = null, System.gc()), but without any results.
 
Is there a limit with the concat ? (I don't think ...) but are the files opened by the PdfReader object closed correctly ?
 
Any ideas?
Thanks - J�r�me

Reply via email to