brilliant. It's down to 30 seconds. Thanks a lot Paulo
On 5/15/07, Paulo Soares <[EMAIL PROTECTED]> wrote: > PdfReader reader = new PdfReader(new > RandomAccessFileOrArray(inputFileName), null); > > and PdfStamper in append mode should help. > > Paulo > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On > > Behalf Of Gerrit Germis > > Sent: Tuesday, May 15, 2007 3:33 PM > > To: itext-questions@lists.sourceforge.net > > Subject: [iText-questions] iText extremely slow on large PDF files > > > > Hi all, > > > > We have a PDF file that has approximately 50.000 pages in it. It is > > about 35 MB in size. The file needs to be digitally signed and > > timestamped. I understand that there will be some slow down for bigger > > files, but this seems to be a bit extreme (from 30 to 45 minutes per > > document). Here are the bottlenecks of the code: > > > > PdfReader reader = new PdfReader(inputFileName); // takes > > about 10 minutes > > ... > > sap.preclose(excl); // takes about 20 minutes > > ... > > sap.close(dic); // takes about another 5 to 10 minutes > > > > Is there anything I can do to speed up the processing? Splitting the > > input file is not an option (since our customer needs the single large > > file). The files could actually grow much bigger if for example some > > images are incorporated on the pages in the PDF. So might need to be > > able to handle 100MB or even 200MB files in the future too. > > > > Any help would be greatly appreciated. > > thanks in advance, > > > > Gerrit Germis > > > Aviso Legal: > Esta mensagem é destinada exclusivamente ao destinatário. Pode conter > informação confidencial ou legalmente protegida. A incorrecta transmissão > desta mensagem não significa a perca de confidencialidade. Se esta mensagem > for recebida por engano, por favor envie-a de volta para o remetente e > apague-a do seu sistema de imediato. É proibido a qualquer pessoa que não o > destinatário de usar, revelar ou distribuir qualquer parte desta mensagem. > > Disclaimer: > This message is destined exclusively to the intended receiver. It may contain > confidential or legally protected information. The incorrect transmission of > this message does not mean the loss of its confidentiality. If this message > is received by mistake, please send it back to the sender and delete it from > your system immediately. It is forbidden to any person who is not the > intended receiver to use, distribute or copy any part of this message. > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > iText-questions mailing list > iText-questions@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/itext-questions > Buy the iText book: http://itext.ugent.be/itext-in-action/ > > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/