iTextpdf-5.4.1.jar works good for pdf extraction but impacted other part of my application. Now I can NOT rename my file using java.io.File. It fails. Which works with iText2.1.5
File afile =new File(INPUT_DIR+"/"+pdf.getName()); if(afile.renameTo(new File(ARCHIVE_DIR +"/"+ pdf.getName()))){ <<<<<< false with iTextpdf5.4.1 logger.info("File is moved successful!"); }else{ logger.info("File is failed to move!"); } -----Original Message----- From: Chandrashekhar Pandhare Sent: Wednesday, May 15, 2013 8:54 AM To: itext-questions@lists.sourceforge.net Subject: RE: [iText-questions] [SPAM] Re: getTextFromPage(n) gives java.lang.ArithmeticException: / by zero Thanks. Mkl and others for your help and suggestions. -----Original Message----- From: mkl [mailto:m...@wir-sind-cool.org] Sent: Wednesday, May 15, 2013 4:19 AM To: itext-questions@lists.sourceforge.net Subject: [iText-questions] [SPAM] Re: getTextFromPage(n) gives java.lang.ArithmeticException: / by zero Chandrashekhar Pandhare, Chandrashekhar Pandhare wrote > I have attached the pdf causing the / 0 exception through > getTextFromPage(n). > > Test_BCCA.pdf (192K) > <http://itext-general.2136553.n4.nabble.com/attachment/4658266/0/Te > st_BCCA.pdf> I've just tried it, the current iText extracts the text from your example document without any problems. Thus, you have run into one of the issues of the old iText version which meanwhile have been fixed or improved. I've tried extraction both using the LocationTextExtractionStrategy and the SimpleTextExtractionStrategy. For the example document the latter one might be preferable as the content stream (and, therefore, the output of the simple strategy) keeps related parts together while the former one is strictly top-to-bottom, left-to-right, and, therefore, intermingles unrelated parts which accidentally are positioned at the same height on the page. Even better, of course, would be creating a custom strategy which like the simple one is guided by the order of text in the content stream but has even more information at hand to properly parse the data into a meaningful dataset. Regards, Michael -- View this message in context: http://itext-general.2136553.n4.nabble.com/getTextFromPage-n-gives-java-lang-ArithmeticException-by-zero-tp4658260p4658268.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ AlienVault Unified Security Management (USM) platform delivers complete security visibility with the essential security capabilities. Easily and efficiently configure, manage, and operate all of your security controls from a single console and one unified framework. Download a free trial. http://p.sf.net/sfu/alienvault_d2d _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php ------------------------------------------------------------------------------ AlienVault Unified Security Management (USM) platform delivers complete security visibility with the essential security capabilities. Easily and efficiently configure, manage, and operate all of your security controls from a single console and one unified framework. Download a free trial. http://p.sf.net/sfu/alienvault_d2d _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php