documentReader = new PdfReader(new RandomAccessFileOrArray(document.getData()), null); documentReader.getNumberOfPages(); documentReader.close();
Paulo > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Ricardo Coutinho > Sent: Wednesday, June 07, 2006 4:53 PM > To: itext-questions@lists.sourceforge.net > Subject: [iText-questions] Quickest way to get number of > pages in a PDF file > > Hi all, > > > > Currently I use the following code to get the number of pages > for a PDF..... > > > > .... > > documentReader = new PdfReader(document.getData()); > > documentReader.getNumberOfPages(); > > ... > > > > What I want to know is; Is there a quicker way to get this > information? Part of the processing in my application > involves getting the number of pages for a pdf and profiling > my application reveals that I spend a lot of time in the > above lines..... > > > > Thanks for your comments/suggestions. > > > > Ricardo > > > > > ____________________________________________________________ > > * This email and any files transmitted with it are > CONFIDENTIAL and intended > solely for the use of the individual or entity to which they > are addressed. > * Any unauthorized copying, disclosure, or distribution of > the material within > this email is strictly forbidden. > * Any views or opinions presented within this e-mail are > solely those of the > author and do not necessarily represent those of Odyssey > Asset Management > Systems SA unless otherwise specifically stated. > * An electronic message is not binding on its sender. Any > message referring to > a binding engagement must be confirmed in writing and duly signed. > * If you have received this email in error, please notify the > sender immediately > and delete the original. > > 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.
_______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions