I have a problem with *reader.selectPages(String range);* I read the PDF file like this: try { reader = new PdfReader(new RandomAccessFileOrArray(filePath), null); reader.selectPages("1-20"); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); }
Pages Count: 20. but if i call the *reader.selectPages(String range); AGAIN* without instantiating *reader = new PdfReader(new RandomAccessFileOrArray(filePath), null);* the reader will only read "fromPage" in *reader.selectPages("1-20");*. Example of selectPages Again: try { reader = new PdfReader(new RandomAccessFileOrArray(filePath), null); reader.selectPages("1-20"); reader.selectPages("21-30"); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } Pages Count: 1. I do not want to call *reader = new PdfReader(new RandomAccessFileOrArray(filePath), null);* because it reads the pdf again and it takes time. -- View this message in context: http://itext-general.2136553.n4.nabble.com/Reader-Select-Page-tp4657399.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_122712 _______________________________________________ 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